svn commit: samba r9660 - in branches/SAMBA_3_0/source: passdb rpc_parse rpc_server

jerry at samba.org jerry at samba.org
Fri Aug 26 18:57:34 GMT 2005


Author: jerry
Date: 2005-08-26 18:57:32 +0000 (Fri, 26 Aug 2005)
New Revision: 9660

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

Log:
real fix for group enumeration bug in 3.0.20;  only affected the ldapsam code
Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-08-26 18:13:07 UTC (rev 9659)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-08-26 18:57:32 UTC (rev 9660)
@@ -3692,22 +3692,23 @@
 		return False;
 	}
 
+	/* verify that the 'cn' attribute exists */
+
 	vals = ldap_get_values(ld, entry, "cn");
 	if ((vals == NULL) || (vals[0] == NULL)) {
 		DEBUG(5, ("\"cn\" not found\n"));
 		return False;
 	}
-	pull_utf8_talloc(mem_ctx,
-			 CONST_DISCARD(char **, &result->account_name),
-			 vals[0]);
 	ldap_value_free(vals);
 
+	/* display name is the NT group name */
+
 	vals = ldap_get_values(ld, entry, "displayName");
 	if ((vals == NULL) || (vals[0] == NULL))
 		DEBUG(8, ("\"displayName\" not found\n"));
 	else
 		pull_utf8_talloc(mem_ctx,
-				 CONST_DISCARD(char **, &result->fullname),
+				 CONST_DISCARD(char **, &result->account_name),
 				 vals[0]);
 	ldap_value_free(vals);
 

Modified: branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_samr.c	2005-08-26 18:13:07 UTC (rev 9659)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_samr.c	2005-08-26 18:57:32 UTC (rev 9660)
@@ -1720,7 +1720,7 @@
 		DEBUG(11, ("init_sam_dispinfo_3: entry: %d\n",i));
 
 		init_unistr2(&(*sam)->str[i].uni_grp_name,
-			     entries[i].fullname, UNI_FLAGS_NONE);
+			     entries[i].account_name, UNI_FLAGS_NONE);
 		init_unistr2(&(*sam)->str[i].uni_grp_desc,
 			     entries[i].description, UNI_FLAGS_NONE);
 

Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c	2005-08-26 18:13:07 UTC (rev 9659)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c	2005-08-26 18:57:32 UTC (rev 9660)
@@ -670,7 +670,7 @@
 		/*
 		 * JRA. I think this should include the null. TNG does not.
 		 */
-		init_unistr2(&uni_name[i], entries[i].fullname,
+		init_unistr2(&uni_name[i], entries[i].account_name,
 			     UNI_STR_TERMINATE);
 		init_sam_entry(&sam[i], &uni_name[i], entries[i].rid);
 	}



More information about the samba-cvs mailing list