source: clfs-sysroot/patches/shadow-4.0.18.1-useradd_fix-1.patch@ 58ccb9a

Last change on this file since 58ccb9a was 8f3d581, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Add all of the patches needed for clfs-sysroot.

  • Property mode set to 100644
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  
    203203        long gid;
    204204        char *errptr;
    205205
     206        struct group* grp = getgrnam (grname);
     207        if (grp)
     208                return grp;
     209
    206210        gid = strtol (grname, &errptr, 10);
    207211        if (*errptr || errno == ERANGE || gid < 0) {
    208212                fprintf (stderr,
    209213                         _("%s: invalid numeric argument '%s'\n"), Prog, grname);
    210214                exit (E_BAD_ARG);
    211215        }
    212         return getgrnam (grname);
     216        return getgrgid (gid);
    213217}
    214218
    215219static long get_number (const char *numstr)
  • shadow-4.0.18.1

    old new  
    165165        long val;
    166166        char *errptr;
    167167
     168        struct group* grp = getgrnam (grname);
     169        if (grp)
     170                return grp;
     171
    168172        val = strtol (grname, &errptr, 10);
    169173        if (*errptr || errno == ERANGE || val < 0) {
    170174                fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
    171175                         grname);
    172176                exit (E_BAD_ARG);
    173177        }
    174         return getgrnam (grname);
     178        return getgrgid (val);
    175179}
    176180
    177181/*
Note: See TracBrowser for help on using the repository browser.