svn commit: samba r11921 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

vlendec at samba.org vlendec at samba.org
Sat Nov 26 21:35:45 GMT 2005


Author: vlendec
Date: 2005-11-26 21:35:43 +0000 (Sat, 26 Nov 2005)
New Revision: 11921

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

Log:
samr_open_domain can only open "our" domain and BUILTIN.

Volker


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
   trunk/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c	2005-11-26 21:02:48 UTC (rev 11920)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c	2005-11-26 21:35:43 UTC (rev 11921)
@@ -562,6 +562,11 @@
 	if ( !NT_STATUS_IS_OK(status) )
 		return status;
 
+	if (!sid_check_is_domain(&q_u->dom_sid.sid) &&
+	    !sid_check_is_builtin(&q_u->dom_sid.sid)) {
+		return NT_STATUS_NO_SUCH_DOMAIN;
+	}
+
 	/* associate the domain SID with the (unique) handle. */
 	if ((info = get_samr_info_by_sid(&q_u->dom_sid.sid))==NULL)
 		return NT_STATUS_NO_MEMORY;

Modified: trunk/source/rpc_server/srv_samr_nt.c
===================================================================
--- trunk/source/rpc_server/srv_samr_nt.c	2005-11-26 21:02:48 UTC (rev 11920)
+++ trunk/source/rpc_server/srv_samr_nt.c	2005-11-26 21:35:43 UTC (rev 11921)
@@ -562,6 +562,11 @@
 	if ( !NT_STATUS_IS_OK(status) )
 		return status;
 
+	if (!sid_check_is_domain(&q_u->dom_sid.sid) &&
+	    !sid_check_is_builtin(&q_u->dom_sid.sid)) {
+		return NT_STATUS_NO_SUCH_DOMAIN;
+	}
+
 	/* associate the domain SID with the (unique) handle. */
 	if ((info = get_samr_info_by_sid(&q_u->dom_sid.sid))==NULL)
 		return NT_STATUS_NO_MEMORY;



More information about the samba-cvs mailing list