r2372 - / trunk/patches

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu Aug 31 12:49:42 PDT 2006


Author: jim
Date: 2006-08-31 13:49:41 -0600 (Thu, 31 Aug 2006)
New Revision: 2372

Added:
   trunk/patches/shadow-4.0.18.1-useradd_fix-1.patch
Modified:
   /
Log:
 r5466 at server (orig r2509):  jim | 2006-08-31 10:35:43 -0700
 Added: shadow-4.0.18.1-useradd_fix-1.patch



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - b6734a72-470d-0410-b049-f317dca95413:/:2508
   + b6734a72-470d-0410-b049-f317dca95413:/:2509

Added: trunk/patches/shadow-4.0.18.1-useradd_fix-1.patch
===================================================================
--- trunk/patches/shadow-4.0.18.1-useradd_fix-1.patch	                        (rev 0)
+++ trunk/patches/shadow-4.0.18.1-useradd_fix-1.patch	2006-08-31 19:49:41 UTC (rev 2372)
@@ -0,0 +1,51 @@
+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
+ 
+--- shadow-4.0.18.1.orig/src/useradd.c	2006-07-28 19:42:48.000000000 +0200
++++ shadow-4.0.18.1/src/useradd.c	2006-08-04 09:24:34.000000000 +0200
+@@ -203,13 +203,17 @@
+ 	long gid;
+ 	char *errptr;
+ 
++	struct group* grp = getgrnam (grname);
++	if (grp)
++		return grp;
++
+ 	gid = strtol (grname, &errptr, 10);
+ 	if (*errptr || errno == ERANGE || gid < 0) {
+ 		fprintf (stderr,
+ 			 _("%s: invalid numeric argument '%s'\n"), Prog, grname);
+ 		exit (E_BAD_ARG);
+ 	}
+-	return getgrnam (grname);
++	return getgrgid (gid);
+ }
+ 
+ static long get_number (const char *numstr)
+--- shadow-4.0.18.1.orig/src/usermod.c	2006-07-28 19:42:48.000000000 +0200
++++ shadow-4.0.18.1/src/usermod.c	2006-08-04 09:24:21.000000000 +0200
+@@ -165,13 +165,17 @@
+ 	long val;
+ 	char *errptr;
+ 
++	struct group* grp = getgrnam (grname);
++	if (grp)
++		return grp;
++
+ 	val = strtol (grname, &errptr, 10);
+ 	if (*errptr || errno == ERANGE || val < 0) {
+ 		fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
+ 			 grname);
+ 		exit (E_BAD_ARG);
+ 	}
+-	return getgrnam (grname);
++	return getgrgid (val);
+ }
+ 
+ /*
+
+




More information about the cross-lfs mailing list