svn commit: samba r23730 - in branches/SAMBA_3_0/source/nsswitch: .

jerry at samba.org jerry at samba.org
Thu Jul 5 19:55:43 GMT 2007


Author: jerry
Date: 2007-07-05 19:55:40 +0000 (Thu, 05 Jul 2007)
New Revision: 23730

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

Log:
Squashed commit of the following:

commit 3941269fa01038fca242a197e8d7c1f234d45ea7
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Thu Jul 5 14:52:03 2007 -0500

    Two fixes for "winbind expand groups".

    (a) Update the counter for the number of new groups to resolve else
        we'll only expand one group member per level and drop the rest.
    (b) Don't reset the num_names counter in winbindd_ads.c:lookup_groupmem()
        or we'll drop the SIDs resolved to names via cache from the resulting
        list.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_group.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c	2007-07-05 19:55:25 UTC (rev 23729)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c	2007-07-05 19:55:40 UTC (rev 23730)
@@ -1017,7 +1017,11 @@
 			DEBUG(10,("ads: lookup_groupmem: got sid %s from cache\n",
 				 sid_string_static(&sid)));
 			sid_copy(&(*sid_mem)[*num_names], &sid);
-			(*names)[*num_names] = CONST_DISCARD(char *,name);
+			(*names)[*num_names] = talloc_asprintf(*names, "%s%c%s",
+							       domain_name,
+							       *lp_winbind_separator(),
+							       name );
+
 			(*name_types)[*num_names] = name_type;
 			(*num_names)++;
 		}
@@ -1055,7 +1059,6 @@
 			/* Copy the entries over from the "_nocache" arrays 
 			 * to the result arrays, skipping the gaps the 
 			 * lookup_sids call left. */
-			*num_names = 0;
 			for (i=0; i < num_nocache; i++) {
 				if (((names_nocache)[i] != NULL) && 
 				    ((name_types_nocache)[i] != SID_NAME_UNKNOWN)) 

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2007-07-05 19:55:25 UTC (rev 23729)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2007-07-05 19:55:40 UTC (rev 23730)
@@ -576,6 +576,7 @@
 		/* One more round */
 		TALLOC_FREE(glist);
 		glist = new_glist;
+		n_glist = n_new_glist;
 	}
 	TALLOC_FREE( glist );	
 	 



More information about the samba-cvs mailing list