[Pkg-shadow-devel] Bug#451518: passwd: [USERMOD] --move-home has to be specified after --home

Justin Pryzby jpryzby+d at quoininc.com
Fri Nov 16 14:34:54 UTC 2007


Package: passwd
Version: 1:4.0.18.1-7
Tags: patch
User: passwd at packages.debian.org
Usertag: usermod

This worked:
usermod --home /home/x --move-home x

But this did not:
usermod --move-home --home /home/x x

Backwards patch:

--- shadow-4.0.18.2/src/usermod.c
+++ shadow-4.0.18.2.orig/src/usermod.c
@@ -1032,6 +1032,9 @@
 				Lflg++;
 				break;
 			case 'm':
+				if (!dflg)
+					usage ();
+
 				mflg++;
 				break;
 			case 'o':
@@ -1101,14 +1104,6 @@
 		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;
 
diff -u shadow-4.0.18.2/debian/changelog shadow-4.0.18.2/debian/changelog
--- shadow-4.0.18.2/debian/changelog
+++ shadow-4.0.18.2/debian/changelog
@@ -1,10 +1,3 @@
-shadow (1:4.0.18.2-1.1) UNRELEASED; urgency=low
-
-  * Non-maintainer upload.
-  * usermod: make usermod -d and -m work independant of the argument order.
-
- -- Justin Pryzby <jpryzby+d at quoininc.com>  Fri, 16 Nov 2007 08:48:40 -0500
-
 shadow (1:4.0.18.2-1) unstable; urgency=low
 
   * The "Vacherin" release.





More information about the Pkg-shadow-devel mailing list