diff --git a/shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch b/shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch new file mode 100644 index 0000000..658156a --- /dev/null +++ b/shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch @@ -0,0 +1,13 @@ +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() diff --git a/shadow-utils.spec b/shadow-utils.spec index 1653e7c..e06b327 100644 --- a/shadow-utils.spec +++ b/shadow-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing accounts and shadow password files Name: shadow-utils Version: 4.8.1 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 2 URL: https://github.com/shadow-maint/shadow Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz @@ -61,6 +61,8 @@ Patch44: shadow-4.8.1-check-local-groups.patch Patch45: shadow-4.8.1-commonio-force-lock-file-sync.patch # https://github.com/shadow-maint/shadow/commit/df6ec1d1693c8c80c323b40d6fc82bb549363db3 Patch46: shadow-4.8.1-man-include-lastlog-file-caveat.patch +# https://github.com/shadow-maint/shadow/commit/a757b458ffb4fb9a40bcbb4f7869449431c67f83 +Patch47: shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch License: BSD and GPLv2+ BuildRequires: make @@ -115,6 +117,7 @@ are used for managing group accounts. %patch44 -p1 -b .check-local-groups %patch45 -p1 -b .commonio-force-lock-file-sync %patch46 -p1 -b .man-include-lastlog-file-caveat +%patch47 -p1 -b .groupdel-fix-sigsegv-when-passwd-does-not-exist iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 cp -f doc/HOWTO.utf8 doc/HOWTO @@ -268,6 +271,9 @@ done %{_mandir}/man8/vigr.8* %changelog +* Tue Nov 30 2021 Iker Pedrosa - 2:4.8.1-10 +- groupdel: fix SIGSEGV when passwd does not exist (#1986111) + * Mon Aug 9 2021 Iker Pedrosa - 2:4.8.1-9 - allow all types of groups when modifying supplementary groups (#1975327)