Merge pull request #435 from freedge/groupdelcore
groupdel: fix SIGSEGV when passwd does not exist
This commit is contained in:
commit
02916e9cb2
@ -288,6 +288,9 @@ extern struct passwd* prefix_getpwent()
|
|||||||
if (!passwd_db_file) {
|
if (!passwd_db_file) {
|
||||||
return getpwent();
|
return getpwent();
|
||||||
}
|
}
|
||||||
|
if (!fp_pwent) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
return fgetpwent(fp_pwent);
|
return fgetpwent(fp_pwent);
|
||||||
}
|
}
|
||||||
extern void prefix_endpwent()
|
extern void prefix_endpwent()
|
||||||
|
Loading…
Reference in New Issue
Block a user