shadow-utils/shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch
Iker Pedrosa 4b31c38f8e - getsubids: provide system binary and man page
- useradd: generate home and mail directories with selinux user attribute
- useradd: revert fix memleak of grp
- groupdel: fix SIGSEGV when passwd does not exist
- pwck: fix segfault when calling fprintf()
- newgrp: fix segmentation fault
- Clean spec file: organize dependencies and move License location

Resolves: #2013015
Resolves: #1993081
Resolves: #2020238
Resolves: #2024834

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2021-12-02 13:25:52 +01:00

14 lines
530 B
Diff

diff -up shadow-4.9/libmisc/prefix_flag.c.groupdel-fix-sigsegv-when-passwd-does-not-exist shadow-4.9/libmisc/prefix_flag.c
--- shadow-4.9/libmisc/prefix_flag.c.groupdel-fix-sigsegv-when-passwd-does-not-exist 2021-11-19 09:21:36.997091941 +0100
+++ shadow-4.9/libmisc/prefix_flag.c 2021-11-19 09:22:19.001341010 +0100
@@ -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()