[Pkg-shadow-commits] r1360 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Nov 17 14:21:05 UTC 2007


Author: nekral-guest
Date: 2007-11-17 14:21:05 +0000 (Sat, 17 Nov 2007)
New Revision: 1360

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/usermod.c
Log:
Make usermod -d and -m work independant of the argument order. Thanks to
Justin Pryzby <jpryzby+d at quoininc.com> for the patch. This fixes Debian's
bug #451518.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2007-11-17 14:04:05 UTC (rev 1359)
+++ upstream/trunk/ChangeLog	2007-11-17 14:21:05 UTC (rev 1360)
@@ -1,5 +1,11 @@
 2007-11-17  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/usermod.c: Make usermod -d and -m work independant of the
+	argument order. Thanks to Justin Pryzby <jpryzby+d at quoininc.com>
+	for the patch. This fixes Debian's bug #451518.
+
+2007-11-17  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
 	glibc socket to flush the nscd tables. This comes from the RedHat
 	patch shadow-4.0.16-nscd.c.

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2007-11-17 14:04:05 UTC (rev 1359)
+++ upstream/trunk/src/usermod.c	2007-11-17 14:21:05 UTC (rev 1360)
@@ -987,9 +987,6 @@
 				Lflg++;
 				break;
 			case 'm':
-				if (!dflg)
-					usage ();
-
 				mflg++;
 				break;
 			case 'o':
@@ -1059,6 +1056,14 @@
 		exit (E_USAGE);
 	}
 
+	if (mflg && !dflg) {
+		fprintf (stderr,
+			 _("%s: -m flag is ONLY allowed with the -d flag\n"),
+			 Prog);
+		usage ();
+		exit (E_USAGE);
+	}
+
 	if (dflg && strcmp (user_home, user_newhome) == 0)
 		dflg = mflg = 0;
 




More information about the Pkg-shadow-commits mailing list