From 5b50e506d010c0c3fc15c1ecaef7aa9e5383691c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 6 Aug 2009 20:59:32 +0200 Subject: [PATCH] s3-wkssvcs: fix check for BUILTIN\Administrators membership in wkssvc_Netr{Join,Unjoin}Domain2. Guenther --- source3/rpc_server/srv_wkssvc_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c index acc1fb3b03c..ab09e8632f5 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; -- 2.11.4.GIT