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

jra at samba.org jra at samba.org
Mon Nov 15 23:03:37 GMT 2004


Author: jra
Date: 2004-11-15 23:03:37 +0000 (Mon, 15 Nov 2004)
New Revision: 3776

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

Log:
Fix for bug #2038 from Johann Hanne <jhml at gmx.net>. Don't check
for no groups after every lookup - move check to the end as we should
only fail if all lookups fail.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2004-11-15 21:54:50 UTC (rev 3775)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2004-11-15 23:03:37 UTC (rev 3776)
@@ -1089,9 +1089,6 @@
 
 			add_gids_from_group_sid(&info3->other_sids[i].sid,
 						&gid_list, &num_gids);
-
-			if (gid_list == NULL)
-				goto done;
 		}
 
 		for (i = 0; i < info3->num_groups2; i++) {
@@ -1103,9 +1100,6 @@
 
 			add_gids_from_group_sid(&group_sid, &gid_list,
 						&num_gids);
-
-			if (gid_list == NULL)
-				goto done;
 		}
 
 		SAFE_FREE(info3);
@@ -1123,12 +1117,13 @@
 		for (i = 0; i < num_groups; i++) {
 			add_gids_from_group_sid(user_grpsids[i],
 						&gid_list, &num_gids);
-
-			if (gid_list == NULL)
-				goto done;
 		}
 	}
 
+	/* We want at least one group... */
+	if (gid_list == NULL)
+		goto done;
+
 	remove_duplicate_gids( &num_gids, gid_list );
 
 	/* Send data back to client */



More information about the samba-cvs mailing list