Ignore:
Timestamp:
Oct 30, 2007, 2:40:23 AM (17 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
fb30cde
Parents:
c2a35a3
Message:

Updated shadow patch. Better Patch

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/shadow-4.0.18.2-useradd_fix-2.patch

    rc2a35a3 r65850c02  
    88diff -Naur shadow-4.0.18.2.orig/src/useradd.c shadow-4.0.18.2/src/useradd.c
    99--- shadow-4.0.18.2.orig/src/useradd.c  2007-10-07 07:36:51.000000000 -0700
    10 +++ shadow-4.0.18.2/src/useradd.c       2007-10-29 23:33:26.000000000 -0700
    11 @@ -203,14 +203,14 @@
     10+++ shadow-4.0.18.2/src/useradd.c       2007-10-30 02:32:55.000000000 -0700
     11@@ -203,6 +203,10 @@
    1212        long gid;
    1313        char *errptr;
     
    1818+
    1919        gid = strtol (grname, &errptr, 10);
    20 -       if (*errptr || errno == ERANGE || gid < 0) {
    21 -               fprintf (stderr,
    22 -                        _("%s: invalid numeric argument '%s'\n"), Prog,
    23 -                        grname);
    24 -               exit (E_BAD_ARG);
    25 -       }
     20        if (*errptr || errno == ERANGE || gid < 0) {
     21                fprintf (stderr,
     22@@ -210,7 +214,7 @@
     23                         grname);
     24                exit (E_BAD_ARG);
     25        }
    2626-       return getgrnam (grname);
    27 +       if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0)
    28 +               return getgrgid (gid);
    2927+       return getgrgid (gid);
    3028 }
     
    3331diff -Naur shadow-4.0.18.2.orig/src/usermod.c shadow-4.0.18.2/src/usermod.c
    3432--- shadow-4.0.18.2.orig/src/usermod.c  2007-10-27 06:01:19.000000000 -0700
    35 +++ shadow-4.0.18.2/src/usermod.c       2007-10-29 23:34:42.000000000 -0700
     33+++ shadow-4.0.18.2/src/usermod.c       2007-10-30 02:32:14.000000000 -0700
    3634@@ -165,10 +165,14 @@
    3735        long val;
     
    5048 
    5149 /*
    52 
Note: See TracChangeset for help on using the changeset viewer.