diff options
Diffstat (limited to 'abs/core-testing/shadow/shadow-UID_GID.patch')
-rw-r--r-- | abs/core-testing/shadow/shadow-UID_GID.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/abs/core-testing/shadow/shadow-UID_GID.patch b/abs/core-testing/shadow/shadow-UID_GID.patch new file mode 100644 index 0000000..759b73e --- /dev/null +++ b/abs/core-testing/shadow/shadow-UID_GID.patch @@ -0,0 +1,34 @@ +--- shadow-4.0.18.1.orig/src/useradd.c 2006-08-25 11:57:00.202525241 +0200 ++++ shadow-4.0.18.1/src/useradd.c 2006-08-25 11:57:26.106735752 +0200 +@@ -206,11 +206,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); + } + +Index: shadow-4.0.18.1/src/usermod.c +=================================================================== +--- shadow-4.0.18.1.orig/src/usermod.c 2006-08-25 11:57:18.938677504 +0200 ++++ shadow-4.0.18.1/src/usermod.c 2006-08-25 11:57:26.114735817 +0200 +@@ -167,11 +167,8 @@ + char *errptr; + + 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); +- } ++ if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && val >= 0) ++ return getgrgid (val); + return getgrnam (grname); + } +
\ No newline at end of file |