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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Feb 10 21:35:17 UTC 2008


Author: nekral-guest
Date: 2008-02-10 21:35:17 +0000 (Sun, 10 Feb 2008)
New Revision: 1772

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/usermod.c
Log:
* Reset oflg with uflg if the new UID is equal to
  the old one.
* Reset mflg with dflg if the new home directory is
  the same as the old one.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-02-10 20:25:39 UTC (rev 1771)
+++ upstream/trunk/ChangeLog	2008-02-10 21:35:17 UTC (rev 1772)
@@ -1,5 +1,12 @@
 2008-02-10  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/usermod.c: Reset oflg with uflg if the new UID is equal to
+	the old one.
+	* src/usermod.c: Reset mflg with dflg if the new home directory is
+	the same as the old one.
+
+2008-02-10  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* NEWS, src/usermod.c: Fix the handling of -a when a user is being
 	renamed (with -l). The new name of the user was used for the new
 	supplementary groups, but not in the existing ones.

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2008-02-10 20:25:39 UTC (rev 1771)
+++ upstream/trunk/src/usermod.c	2008-02-10 21:35:17 UTC (rev 1772)
@@ -967,6 +967,7 @@
 
 	if (user_newid == user_id) {
 		uflg = 0;
+		oflg = 0;
 	}
 	if (user_newgid == user_gid) {
 		gflg = 0;
@@ -985,6 +986,7 @@
 	}
 	if (strcmp (user_newhome, user_home) == 0) {
 		dflg = 0;
+		mflg = 0;
 	}
 	if (strcmp (user_newcomment, user_comment) == 0) {
 		cflg = 0;
@@ -1039,12 +1041,6 @@
 		exit (E_USAGE);
 	}
 
-	if (dflg && strcmp (user_home, user_newhome) == 0)
-		dflg = mflg = 0;
-
-	if (uflg && user_id == user_newid)
-		uflg = oflg = 0;
-
 	/* local, no need for xgetpwnam */
 	if (lflg && getpwnam (user_newname)) {
 		fprintf (stderr, _("%s: user %s exists\n"), Prog, user_newname);




More information about the Pkg-shadow-commits mailing list