svn commit: samba r4822 - in branches/SAMBA_3_0/source: lib rpc_server

jerry at samba.org jerry at samba.org
Tue Jan 18 18:29:28 GMT 2005


Author: jerry
Date: 2005-01-18 18:29:28 +0000 (Tue, 18 Jan 2005)
New Revision: 4822

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4822

Log:
fix return code when you ask for a non-privileged SID via one of the privileges RPC calls
Modified:
   branches/SAMBA_3_0/source/lib/privileges.c
   branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/privileges.c
===================================================================
--- branches/SAMBA_3_0/source/lib/privileges.c	2005-01-18 18:28:34 UTC (rev 4821)
+++ branches/SAMBA_3_0/source/lib/privileges.c	2005-01-18 18:29:28 UTC (rev 4822)
@@ -739,3 +739,12 @@
 	return True;
 }
 
+/*******************************************************************
+*******************************************************************/
+
+BOOL is_privileged_sid( DOM_SID *sid )
+{
+	SE_PRIV mask;
+	
+	return get_privileges( sid, &mask );
+}

Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2005-01-18 18:28:34 UTC (rev 4821)
+++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2005-01-18 18:29:28 UTC (rev 4822)
@@ -967,6 +967,9 @@
 	   
 	if ( !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) )
 		return NT_STATUS_ACCESS_DENIED;
+		
+	if ( is_privileged_sid( &info->sid ) )
+		return NT_STATUS_OBJECT_NAME_COLLISION;
 
 	/* associate the user/group SID with the (unique) handle. */
 	



More information about the samba-cvs mailing list