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

jerry at samba.org jerry at samba.org
Wed Feb 15 18:24:18 GMT 2006


Author: jerry
Date: 2006-02-15 18:24:16 +0000 (Wed, 15 Feb 2006)
New Revision: 13511

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

Log:
Fix bug in the samr dispinfo enumeration code.
Make sure to associate the DOMAIN dispinfo cache
with a User/Group SAMR handle (not the SID of the user or group).
Ensure that enumeration after deleting a user works.



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	2006-02-15 18:22:00 UTC (rev 13510)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c	2006-02-15 18:24:16 UTC (rev 13511)
@@ -252,6 +252,17 @@
 	TALLOC_CTX *mem_ctx;
 	DISP_INFO *dpi;
 
+	/* There are two cases to consider here:
+	   1) The SID is a domain SID and we look for an equality match, or
+	   2) This is an account SID and so we return the DISP_INFO* for our 
+	      domain */
+
+	if ( psid && sid_check_is_in_our_domain( psid ) ) {
+		DEBUG(10,("get_samr_dispinfo_by_sid: Replacing %s with our domain SID\n",
+			sid_str));
+		psid = get_global_sam_sid();
+	}
+
 	for (dpi = disp_info_list; dpi; dpi = dpi->next) {
 		if (sid_equal(psid, &dpi->sid)) {
 			return dpi;

Modified: trunk/source/rpc_server/srv_samr_nt.c
===================================================================
--- trunk/source/rpc_server/srv_samr_nt.c	2006-02-15 18:22:00 UTC (rev 13510)
+++ trunk/source/rpc_server/srv_samr_nt.c	2006-02-15 18:24:16 UTC (rev 13511)
@@ -252,6 +252,17 @@
 	TALLOC_CTX *mem_ctx;
 	DISP_INFO *dpi;
 
+	/* There are two cases to consider here:
+	   1) The SID is a domain SID and we look for an equality match, or
+	   2) This is an account SID and so we return the DISP_INFO* for our 
+	      domain */
+
+	if ( psid && sid_check_is_in_our_domain( psid ) ) {
+		DEBUG(10,("get_samr_dispinfo_by_sid: Replacing %s with our domain SID\n",
+			sid_str));
+		psid = get_global_sam_sid();
+	}
+
 	for (dpi = disp_info_list; dpi; dpi = dpi->next) {
 		if (sid_equal(psid, &dpi->sid)) {
 			return dpi;



More information about the samba-cvs mailing list