Author: jw Date: 2006-08-04 09:44:42 +0200 (Fri, 04 Aug 2006) New Revision: 1685 Added: crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd-usermod.diff Removed: crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd.diff Modified: crux-2.2/ports/core/shadow/.md5sum crux-2.2/ports/core/shadow/Pkgfile Log: shadow: usermod was also affected Modified: crux-2.2/ports/core/shadow/.md5sum =================================================================== --- crux-2.2/ports/core/shadow/.md5sum 2006-08-04 07:37:48 UTC (rev 1684) +++ crux-2.2/ports/core/shadow/.md5sum 2006-08-04 07:44:42 UTC (rev 1685) @@ -1,7 +1,7 @@ 2b8c303d972cf6fb2a4545dd17262f27 login.defs be8f69c2701118093af3d7f3bc02af16 pwck 9e2f566e29068dc98e42ea94ac788200 shadow-4.0.15-nflg-conflict.diff -01113c9a0b7100ffb3b0538635b8f2f3 shadow-4.0.18.1-useradd.diff +aa1259020b925cd3088cb7a36fbe7753 shadow-4.0.18.1-useradd-usermod.diff e7751d46ecf219c07ae0b028ab3335c6 shadow-4.0.18.1.tar.bz2 a588e277ff49988f0e3787c5b327d10c shadow-fix-useradd-usergroups.patch 75161be083592e2e4e7f9cdcb7369bab useradd-usergroup.diff Modified: crux-2.2/ports/core/shadow/Pkgfile =================================================================== --- crux-2.2/ports/core/shadow/Pkgfile 2006-08-04 07:37:48 UTC (rev 1684) +++ crux-2.2/ports/core/shadow/Pkgfile 2006-08-04 07:44:42 UTC (rev 1685) @@ -5,21 +5,22 @@ name=shadow version=4.0.18.1 -release=2 +release=3 source=(ftp://ftp.pld.org.pl/software/shadow/$name-$version.tar.bz2 pwck login.defs shadow-fix-useradd-usergroups.patch shadow-4.0.15-nflg-conflict.diff - useradd-usergroup.diff - shadow-4.0.18.1-useradd.diff) + useradd-usergroup.diff + shadow-4.0.18.1-useradd-usermod.diff) build() { cd $name-$version patch src/useradd.c $SRC/shadow-fix-useradd-usergroups.patch patch src/useradd.c $SRC/shadow-4.0.15-nflg-conflict.diff patch src/useradd.c $SRC/useradd-usergroup.diff - patch src/useradd.c $SRC/shadow-4.0.18.1-useradd.diff + patch -p1 < $SRC/shadow-4.0.18.1-useradd-usermod.diff + ./configure --prefix=/usr \ --mandir=/usr/man \ --sysconfdir=/etc \ Added: crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd-usermod.diff =================================================================== --- crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd-usermod.diff (rev 0) +++ crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd-usermod.diff 2006-08-04 07:44:42 UTC (rev 1685) @@ -0,0 +1,42 @@ +--- shadow-4.0.18.1.orig/src/useradd.c 2006-07-28 19:42:48.000000000 +0200 ++++ shadow-4.0.18.1/src/useradd.c 2006-08-04 09:24:34.000000000 +0200 +@@ -203,13 +203,17 @@ + long gid; + char *errptr; + ++ struct group* grp = getgrnam (grname); ++ if (grp) ++ return grp; ++ + gid = strtol (grname, &errptr, 10); + if (*errptr || errno == ERANGE || gid < 0) { + fprintf (stderr, + _("%s: invalid numeric argument '%s'\n"), Prog, grname); + exit (E_BAD_ARG); + } +- return getgrnam (grname); ++ return getgrgid (gid); + } + + static long get_number (const char *numstr) +--- shadow-4.0.18.1.orig/src/usermod.c 2006-07-28 19:42:48.000000000 +0200 ++++ shadow-4.0.18.1/src/usermod.c 2006-08-04 09:24:21.000000000 +0200 +@@ -165,13 +165,17 @@ + long val; + char *errptr; + ++ struct group* grp = getgrnam (grname); ++ if (grp) ++ return grp; ++ + val = strtol (grname, &errptr, 10); + if (*errptr || errno == ERANGE || val < 0) { + fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog, + grname); + exit (E_BAD_ARG); + } +- return getgrnam (grname); ++ return getgrgid (val); + } + + /* Deleted: crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd.diff =================================================================== --- crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd.diff 2006-08-04 07:37:48 UTC (rev 1684) +++ crux-2.2/ports/core/shadow/shadow-4.0.18.1-useradd.diff 2006-08-04 07:44:42 UTC (rev 1685) @@ -1,21 +0,0 @@ ---- shadow-4.0.18.1/src/useradd.c.orig 2006-08-04 08:22:46.000000000 +0200 -+++ shadow-4.0.18.1/src/useradd.c 2006-08-04 08:39:49.000000000 +0200 -@@ -203,13 +203,17 @@ - long gid; - char *errptr; - -+ struct group* grp = getgrnam(grname); -+ if (grp) -+ return grp; -+ - gid = strtol (grname, &errptr, 10); - if (*errptr || errno == ERANGE || gid < 0) { - fprintf (stderr, - _("%s: invalid numeric argument '%s'\n"), Prog, grname); - exit (E_BAD_ARG); - } -- return getgrnam (grname); -+ return getgrgid(gid); - } - - static long get_number (const char *numstr)