From 3c1ed632e0315f0dd006b1c21d32e96e361b9ddb Mon Sep 17 00:00:00 2001 From: Peter Vrabec Date: Tue, 2 Sep 2008 09:00:56 +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 601aa8d..e155d9e 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.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://pkg-shadow.alioth.debian.org/ Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2 @@ -18,6 +18,7 @@ Patch3: shadow-4.1.0-goodname.patch Patch4: shadow-4.1.1-selinux.patch Patch5: shadow-4.1.1-sysAccountDownhill.patch Patch6: shadow-4.1.1-saltSize.patch +Patch7: shadow-4.1.2-gmSEGV.patch License: BSD Group: System Environment/Base @@ -48,6 +49,7 @@ are used for managing group accounts. %patch4 -p1 -b .selinux %patch5 -p1 -b .sysAccountDownhill %patch6 -p1 -b .saltSize +%patch7 -p1 -b .gmSEGV rm po/*.gmo @@ -187,6 +189,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/vigr.8* %changelog +* Thu Sep 02 2008 Peter Vrabec 2:4.1.1-4 +- fix groupmems issues (#459825) + * Mon Jul 28 2008 Peter Vrabec 2:4.1.1-3 - fix configure options (#456748)