source:
patches/shadow-4.0.18.2-useradd_fix-1.patch@
5254209
Last change on this file since 5254209 was ed4cc3a, checked in by , 17 years ago | |
---|---|
|
|
File size: 1.4 KB |
-
shadow-4.0.18.2
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2007-10-29 Initial Package Version: 4.0.18.2 Origin: Jim Gifford Upstream Status: Submitted Description: Fixes usersadd issue diff -Naur shadow-4.0.18.2.orig/src/useradd.c shadow-4.0.18.2/src/useradd.c
old new 203 203 long gid; 204 204 char *errptr; 205 205 206 struct group* grp = getgrnam (grname); 207 if (grp) 208 return grp; 209 206 210 gid = strtol (grname, &errptr, 10); 207 if (*errptr || errno == ERANGE || gid < 0) { 208 fprintf (stderr, 209 _("%s: invalid numeric argument '%s'\n"), Prog, 210 grname); 211 exit (E_BAD_ARG); 212 } 213 return getgrnam (grname); 211 if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0) 212 return getgrgid (gid); 213 return getgrgid (gid); 214 214 } 215 215 216 216 static long get_number (const char *numstr) -
shadow-4.0.18.2
diff -Naur shadow-4.0.18.2.orig/src/usermod.c shadow-4.0.18.2/src/usermod.c
old new 165 165 long val; 166 166 char *errptr; 167 167 168 struct group* grp = getgrnam (grname); 169 if (grp) 170 return grp; 171 168 172 val = strtol (grname, &errptr, 10); 169 173 if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && val >= 0) 170 174 return getgrgid (val); 171 return getgr nam (grname);175 return getgrgid (val); 172 176 } 173 177 174 178 /*
Note:
See TracBrowser
for help on using the repository browser.