summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-08-06 20:59:32 +0200
committerGünther Deschner <gd@samba.org>2009-08-07 09:59:14 +0200
commit5b50e506d010c0c3fc15c1ecaef7aa9e5383691c (patch)
treeeb9f8079906121c8d017e4034a6db25f79df1629 /source3
parent88af0ec6e464a0b42f2b04c3c870c3e73ee1c6fd (diff)
downloadsamba-5b50e506d010c0c3fc15c1ecaef7aa9e5383691c.tar.gz
samba-5b50e506d010c0c3fc15c1ecaef7aa9e5383691c.tar.bz2
samba-5b50e506d010c0c3fc15c1ecaef7aa9e5383691c.zip
s3-wkssvcs: fix check for BUILTIN\Administrators membership in wkssvc_Netr{Join,Unjoin}Domain2.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index acc1fb3b03..ab09e8632f 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -306,7 +306,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
if (!user_has_privileges(token, &se_machine_account) &&
!nt_token_check_domain_rid(token, DOMAIN_GROUP_RID_ADMINS) &&
- !nt_token_check_domain_rid(token, BUILTIN_ALIAS_RID_ADMINS)) {
+ !nt_token_check_sid(&global_sid_Builtin_Administrators, token)) {
DEBUG(5,("_wkssvc_NetrJoinDomain2: account doesn't have "
"sufficient privileges\n"));
return WERR_ACCESS_DENIED;
@@ -377,7 +377,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
if (!user_has_privileges(token, &se_machine_account) &&
!nt_token_check_domain_rid(token, DOMAIN_GROUP_RID_ADMINS) &&
- !nt_token_check_domain_rid(token, BUILTIN_ALIAS_RID_ADMINS)) {
+ !nt_token_check_sid(&global_sid_Builtin_Administrators, token)) {
DEBUG(5,("_wkssvc_NetrUnjoinDomain2: account doesn't have "
"sufficient privileges\n"));
return WERR_ACCESS_DENIED;