Changeset 65850c02 for patches/shadow-4.0.18.2-useradd_fix-2.patch
- Timestamp:
- Oct 30, 2007, 2:40:23 AM (17 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- fb30cde
- Parents:
- c2a35a3
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/shadow-4.0.18.2-useradd_fix-2.patch
rc2a35a3 r65850c02 8 8 diff -Naur shadow-4.0.18.2.orig/src/useradd.c shadow-4.0.18.2/src/useradd.c 9 9 --- shadow-4.0.18.2.orig/src/useradd.c 2007-10-07 07:36:51.000000000 -0700 10 +++ shadow-4.0.18.2/src/useradd.c 2007-10- 29 23:33:26.000000000 -070011 @@ -203, 14 +203,14@@10 +++ shadow-4.0.18.2/src/useradd.c 2007-10-30 02:32:55.000000000 -0700 11 @@ -203,6 +203,10 @@ 12 12 long gid; 13 13 char *errptr; … … 18 18 + 19 19 gid = strtol (grname, &errptr, 10); 20 -if (*errptr || errno == ERANGE || gid < 0) {21 -fprintf (stderr,22 - _("%s: invalid numeric argument '%s'\n"), Prog, 23 -grname);24 -exit (E_BAD_ARG);25 -}20 if (*errptr || errno == ERANGE || gid < 0) { 21 fprintf (stderr, 22 @@ -210,7 +214,7 @@ 23 grname); 24 exit (E_BAD_ARG); 25 } 26 26 - return getgrnam (grname); 27 + if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0)28 + return getgrgid (gid);29 27 + return getgrgid (gid); 30 28 } … … 33 31 diff -Naur shadow-4.0.18.2.orig/src/usermod.c shadow-4.0.18.2/src/usermod.c 34 32 --- shadow-4.0.18.2.orig/src/usermod.c 2007-10-27 06:01:19.000000000 -0700 35 +++ shadow-4.0.18.2/src/usermod.c 2007-10- 29 23:34:42.000000000 -070033 +++ shadow-4.0.18.2/src/usermod.c 2007-10-30 02:32:14.000000000 -0700 36 34 @@ -165,10 +165,14 @@ 37 35 long val; … … 50 48 51 49 /* 52
Note:
See TracChangeset
for help on using the changeset viewer.