diff --git a/ChangeLog b/ChangeLog index 8ced1f33..ee561d60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-15 Nicolas François + + * libmisc/find_new_gid.c: Fix find_new_gid() the current group + database was not taken into account. + 2009-03-15 Nicolas François * libmisc/addgrps.c: Fix compilation warnings. diff --git a/libmisc/find_new_gid.c b/libmisc/find_new_gid.c index 1f2de5fd..e7a072b0 100644 --- a/libmisc/find_new_gid.c +++ b/libmisc/find_new_gid.c @@ -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; }