source:
patches/shadow-4.0.18.1-useradd_fix-1.patch@
598efa5d
Last change on this file since 598efa5d was e5cfd75, checked in by , 18 years ago | |
---|---|
|
|
File size: 1.2 KB |
-
shadow-4.0.18.1
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2006-08-10 Initial Package Version: 4.0.18.1 Origin: Jim Gifford Upstream Status: Submitted Description: Fixes usersadd issue
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 211 if (*errptr || errno == ERANGE || gid < 0) { 208 212 fprintf (stderr, 209 213 _("%s: invalid numeric argument '%s'\n"), Prog, grname); 210 214 exit (E_BAD_ARG); 211 215 } 212 return getgr nam (grname);216 return getgrgid (gid); 213 217 } 214 218 215 219 static long get_number (const char *numstr) -
shadow-4.0.18.1
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 (*errptr || errno == ERANGE || val < 0) { 170 174 fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog, 171 175 grname); 172 176 exit (E_BAD_ARG); 173 177 } 174 return getgr nam (grname);178 return getgrgid (val); 175 179 } 176 180 177 181 /*
Note:
See TracBrowser
for help on using the repository browser.