clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 4a0b781 was e5cfd75, checked in by Jim Gifford <clfs@…>, 18 years ago |
Added: shadow-4.0.18.1-useradd_fix-1.patch
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[e5cfd75] | 1 | Submitted By: Jim Gifford (patches at jg555 dot com)
|
---|
| 2 | Date: 2006-08-10
|
---|
| 3 | Initial Package Version: 4.0.18.1
|
---|
| 4 | Origin: Jim Gifford
|
---|
| 5 | Upstream Status: Submitted
|
---|
| 6 | Description: Fixes usersadd issue
|
---|
| 7 |
|
---|
| 8 | --- shadow-4.0.18.1.orig/src/useradd.c 2006-07-28 19:42:48.000000000 +0200
|
---|
| 9 | +++ shadow-4.0.18.1/src/useradd.c 2006-08-04 09:24:34.000000000 +0200
|
---|
| 10 | @@ -203,13 +203,17 @@
|
---|
| 11 | long gid;
|
---|
| 12 | char *errptr;
|
---|
| 13 |
|
---|
| 14 | + struct group* grp = getgrnam (grname);
|
---|
| 15 | + if (grp)
|
---|
| 16 | + return grp;
|
---|
| 17 | +
|
---|
| 18 | gid = strtol (grname, &errptr, 10);
|
---|
| 19 | if (*errptr || errno == ERANGE || gid < 0) {
|
---|
| 20 | fprintf (stderr,
|
---|
| 21 | _("%s: invalid numeric argument '%s'\n"), Prog, grname);
|
---|
| 22 | exit (E_BAD_ARG);
|
---|
| 23 | }
|
---|
| 24 | - return getgrnam (grname);
|
---|
| 25 | + return getgrgid (gid);
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | static long get_number (const char *numstr)
|
---|
| 29 | --- shadow-4.0.18.1.orig/src/usermod.c 2006-07-28 19:42:48.000000000 +0200
|
---|
| 30 | +++ shadow-4.0.18.1/src/usermod.c 2006-08-04 09:24:21.000000000 +0200
|
---|
| 31 | @@ -165,13 +165,17 @@
|
---|
| 32 | long val;
|
---|
| 33 | char *errptr;
|
---|
| 34 |
|
---|
| 35 | + struct group* grp = getgrnam (grname);
|
---|
| 36 | + if (grp)
|
---|
| 37 | + return grp;
|
---|
| 38 | +
|
---|
| 39 | val = strtol (grname, &errptr, 10);
|
---|
| 40 | if (*errptr || errno == ERANGE || val < 0) {
|
---|
| 41 | fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
|
---|
| 42 | grname);
|
---|
| 43 | exit (E_BAD_ARG);
|
---|
| 44 | }
|
---|
| 45 | - return getgrnam (grname);
|
---|
| 46 | + return getgrgid (val);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | /*
|
---|
| 50 |
|
---|
| 51 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.