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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Wed Jan 23 20:08:16 UTC 2008


Author: nekral-guest
Date: 2008-01-23 20:08:16 +0000 (Wed, 23 Jan 2008)
New Revision: 1733

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/usermod.c
Log:
user_newname can only be used in WITH_AUDIT code or when lflg is set. This
issue was introduced in the code refactoring of usermod.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-01-22 22:59:06 UTC (rev 1732)
+++ upstream/trunk/ChangeLog	2008-01-23 20:08:16 UTC (rev 1733)
@@ -1,3 +1,9 @@
+2008-01-23  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* src/usermod.c: user_newname can only be used in WITH_AUDIT code
+	or when lflg is set. This issue was introduced in the code
+	refactoring of usermod.
+
 2008-01-22  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* src/groupadd.c: Fix typo in comment: s/find_new_uid/find_new_gid/

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2008-01-22 22:59:06 UTC (rev 1732)
+++ upstream/trunk/src/usermod.c	2008-01-23 20:08:16 UTC (rev 1733)
@@ -319,7 +319,8 @@
 		audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating passwd",
 			      user_newname, user_newid, 0);
 #endif
-		SYSLOG ((LOG_INFO, "lock user `%s' password", user_newname));
+		SYSLOG ((LOG_INFO, "lock user `%s' password",
+		         lflg ? user_newname : user_name));
 		strcpy (buf, "!");
 		strcat (buf, pw_pass);
 		pw_pass = buf;
@@ -338,7 +339,8 @@
 		audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating password",
 			      user_newname, user_newid, 0);
 #endif
-		SYSLOG ((LOG_INFO, "unlock user `%s' password", user_newname));
+		SYSLOG ((LOG_INFO, "unlock user `%s' password",
+		         lflg ? user_newname : user_name));
 		s = pw_pass;
 		while (*s) {
 			*s = *(s + 1);
@@ -349,7 +351,8 @@
 		audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "changing password",
 			      user_newname, user_newid, 1);
 #endif
-		SYSLOG ((LOG_INFO, "change user `%s' password", user_newname));
+		SYSLOG ((LOG_INFO, "change user `%s' password",
+		         lflg ? user_newname : user_name));
 		pw_pass = xstrdup (user_pass);
 	}
 	return pw_pass;




More information about the Pkg-shadow-commits mailing list