]> granicus.if.org Git - shadow/commitdiff
* libmisc/find_new_gid.c: Fix find_new_gid() the current group
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 15 Mar 2009 21:12:57 +0000 (21:12 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 15 Mar 2009 21:12:57 +0000 (21:12 +0000)
database was not taken into account.

ChangeLog
libmisc/find_new_gid.c

index 8ced1f33ef13b776cb1f47183c013a037cb991d1..ee561d606bb651c32c7a34ce252e17392391ccd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-15  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/find_new_gid.c: Fix find_new_gid() the current group
+       database was not taken into account.
+
 2009-03-15  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/addgrps.c: Fix compilation warnings.
index 1f2de5fd534e440b66fa2b138793ea68d1d004b5..e7a072b09b56623d3a3a51d82d9657d4c9744362 100644 (file)
@@ -100,7 +100,7 @@ int find_new_gid (bool sys_group, gid_t *gid, gid_t const *preferred_gid)
        }
        endgrent ();
        gr_rewind ();
-       while ((grp = getgrent ()) != NULL) {
+       while ((grp = gr_next ()) != NULL) {
                if ((grp->gr_gid >= group_id) && (grp->gr_gid <= gid_max)) {
                        group_id = grp->gr_gid + 1;
                }