Merge pull request #435 from freedge/groupdelcore

groupdel: fix SIGSEGV when passwd does not exist
This commit is contained in:
Serge Hallyn 2021-11-18 10:30:46 -06:00 committed by GitHub
commit 02916e9cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -288,6 +288,9 @@ extern struct passwd* prefix_getpwent()
if (!passwd_db_file) {
return getpwent();
}
if (!fp_pwent) {
return NULL;
}
return fgetpwent(fp_pwent);
}
extern void prefix_endpwent()