From 87ffe9ce68e0a626129cadf0977ee62d6e31e74a Mon Sep 17 00:00:00 2001 From: Peter Vrabec Date: Tue, 2 Sep 2008 08:46:52 +0000 Subject: [PATCH] fix groupmems issues (#459825) --- shadow-4.1.2-gmSEGV.patch | 30 ++++++++++++++++++++++++++++++ shadow-utils.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 shadow-4.1.2-gmSEGV.patch diff --git a/shadow-4.1.2-gmSEGV.patch b/shadow-4.1.2-gmSEGV.patch new file mode 100644 index 0000000..848dddb --- /dev/null +++ b/shadow-4.1.2-gmSEGV.patch @@ -0,0 +1,30 @@ +diff -up shadow-4.1.2/src/groupmems.c.gmSEGV shadow-4.1.2/src/groupmems.c +--- shadow-4.1.2/src/groupmems.c.gmSEGV 2008-04-22 22:05:11.000000000 +0200 ++++ shadow-4.1.2/src/groupmems.c 2008-09-02 08:30:52.000000000 +0200 +@@ -95,7 +95,7 @@ static char *whoami (void) + } + } + +-static void addtogroup (char *user, char **members) ++static char **addtogroup (char *user, char **members) + { + int i; + +@@ -109,6 +109,8 @@ static void addtogroup (char *user, char + members = (char **) realloc (members, sizeof (char *) * (i+2)); + members[i] = user; + members[i + 1] = NULL; ++ ++ return members; + } + + static void rmfromgroup (char *user, char **members) +@@ -285,7 +287,7 @@ int main (int argc, char **argv) + grp = (struct group *) gr_locate (name); + + if (NULL != adduser) { +- addtogroup (adduser, grp->gr_mem); ++ grp->gr_mem = addtogroup (adduser, grp->gr_mem); + gr_update (grp); + } else if (NULL != deluser) { + rmfromgroup (deluser, grp->gr_mem); diff --git a/shadow-utils.spec b/shadow-utils.spec index a0cdea3..a76b6c8 100644 --- a/shadow-utils.spec +++ b/shadow-utils.spec @@ -5,7 +5,7 @@ Summary: Utilities for managing accounts and shadow password files Name: shadow-utils Version: 4.1.2 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 URL: http://pkg-shadow.alioth.debian.org/ Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2 @@ -16,6 +16,7 @@ Patch0: shadow-4.1.2-redhat.patch Patch1: shadow-4.1.2-goodname.patch Patch2: shadow-4.1.2-selinux.patch Patch3: shadow-4.1.2-sysAccountDownhill.patch +Patch4: shadow-4.1.2-gmSEGV.patch License: BSD Group: System Environment/Base @@ -44,6 +45,7 @@ are used for managing group accounts. %patch1 -p1 -b .goodname %patch2 -p1 -b .selinux %patch3 -p1 -b .sysAccountDownhill +%patch4 -p1 -b .gmSEGV rm po/*.gmo @@ -184,6 +186,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/vigr.8* %changelog +* Thu Sep 02 2008 Peter Vrabec 2:4.1.2-5 +- fix groupmems issues (#459825) + * Mon Jul 28 2008 Peter Vrabec 2:4.1.2-4 - fix configure options (#456748)