[Pkg-shadow-commits] r1065 - in trunk/debian: . patches

Nicolas FRANCOIS nekral-guest at costa.debian.org
Fri Aug 4 20:58:15 UTC 2006


Author: nekral-guest
Date: 2006-08-04 20:58:15 +0000 (Fri, 04 Aug 2006)
New Revision: 1065

Added:
   trunk/debian/patches/497_non_numerical_identifier
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
Log:
Add patch 497_non_numerical_identifier to fix bugs #381394, #381399,
#381404, #381408, #381448


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-02 12:03:30 UTC (rev 1064)
+++ trunk/debian/changelog	2006-08-04 20:58:15 UTC (rev 1065)
@@ -1,3 +1,14 @@
+shadow (1:4.0.18.1-1) unstable; urgency=low
+
+  * The "Laguiole" release
+  * New upstream version.
+  * Upstream bugs not yet fixed in upstream releases or CVS:
+    - 497_non_numerical_identifier: In useradd and usermod, only numerical
+      group identifiers were supported.
+      Closes: #381394, #381399, #381404, #381408, #381448
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Fri,  4 Aug 2006 18:50:53 +0200
+
 shadow (1:4.0.18-1) unstable; urgency=low
 
   * The "Selles sur Cher" release

Added: trunk/debian/patches/497_non_numerical_identifier
===================================================================
--- trunk/debian/patches/497_non_numerical_identifier	2006-08-02 12:03:30 UTC (rev 1064)
+++ trunk/debian/patches/497_non_numerical_identifier	2006-08-04 20:58:15 UTC (rev 1065)
@@ -0,0 +1,43 @@
+Goal: allow non numerical group identifier to be specified with useradd's
+      and usermod's -g options
+
+Fixes: #381394, #381399, #381404, #381408, #381448
+
+Status wrt upstream: not reported yet.
+
+Index: shadow-4.0.18.1/src/useradd.c
+===================================================================
+--- shadow-4.0.18.1.orig/src/useradd.c	2006-08-04 19:13:34.000000000 +0200
++++ shadow-4.0.18.1/src/useradd.c	2006-08-04 19:13:35.000000000 +0200
+@@ -206,11 +206,8 @@
+ 	char *errptr;
+ 
+ 	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);
+-	}
++	if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0)
++		return getgrgid (gid);
+ 	return getgrnam (grname);
+ }
+ 
+Index: shadow-4.0.18.1/src/usermod.c
+===================================================================
+--- shadow-4.0.18.1.orig/src/usermod.c	2006-08-04 19:13:41.000000000 +0200
++++ shadow-4.0.18.1/src/usermod.c	2006-08-04 19:14:17.000000000 +0200
+@@ -167,11 +167,8 @@
+ 	char *errptr;
+ 
+ 	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);
+-	}
++	if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && val >= 0)
++		return getgrgid (val);
+ 	return getgrnam (grname);
+ }
+ 

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2006-08-02 12:03:30 UTC (rev 1064)
+++ trunk/debian/patches/series	2006-08-04 20:58:15 UTC (rev 1065)
@@ -37,4 +37,4 @@
 508_nologin_in_usr_sbin
 495_salt_stack_smash
 496_login_init_session
-
+497_non_numerical_identifier




More information about the Pkg-shadow-commits mailing list