* libmisc/find_new_gid.c: Fix find_new_gid() the current group
database was not taken into account.
This commit is contained in:
parent
6aa874a0a0
commit
80135cdc17
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user