summaryrefslogtreecommitdiffstats
path: root/abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch')
-rw-r--r--abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch b/abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch
new file mode 100644
index 0000000..d35580d
--- /dev/null
+++ b/abs/core/shadow/shadow-4.0.18.2-useradd-fix-1.patch
@@ -0,0 +1,26 @@
+# DIY Linux Patch
+Date: 2007-11-08
+Author: Greg Schafer <gschafer@zip.com.au>
+Origin: Modelled on the same upstream fix for usermod.
+Maker: Greg Schafer <gschafer@zip.com.au>
+Upstream Status: Submitted, applied.
+Description: Fix -g problems in useradd.
+
+diff -Naur shadow-4.0.18.2.orig/src/useradd.c shadow-4.0.18.2/src/useradd.c
+--- shadow-4.0.18.2.orig/src/useradd.c 2007-10-07 14:36:51.000000000 +0000
++++ shadow-4.0.18.2/src/useradd.c 2007-11-08 06:33:32.433004367 +0000
+@@ -204,12 +204,8 @@
+ char *errptr;
+
+ 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);
+- }
++ if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0)
++ return getgrgid (gid);
+ return getgrnam (grname);
+ }
+