source:
patches/shadow-4.0.18.2-useradd_fix-2.patch@
38fecf59
Last change on this file since 38fecf59 was 65850c02, checked in by , 17 years ago | |
---|---|
|
|
File size: 1.3 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 211 if (*errptr || errno == ERANGE || gid < 0) { 208 212 fprintf (stderr, … … 210 214 grname); 211 215 exit (E_BAD_ARG); 212 216 } 213 return getgr nam (grname);217 return getgrgid (gid); 214 218 } 215 219 216 220 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.