]> granicus.if.org Git - shadow/commitdiff
* src/passwd.c: Harmonize status report at the end of passwd.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 28 Apr 2009 20:46:35 +0000 (20:46 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 28 Apr 2009 20:46:35 +0000 (20:46 +0000)
Prefix the messages with "passwd: ", only indicate a password
change if the password was actually changed, and password
properties changed otherwise.

ChangeLog
src/passwd.c

index 3f4c1d192181be19b3eb9ede81c63ea91310c460..4880afc6bfdae4405a3d392c81d95805ed8753f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-28  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/passwd.c: Harmonize status report at the end of passwd.
+       Prefix the messages with "passwd: ", only indicate a password
+       change if the password was actually changed, and password
+       properties changed otherwise.
+
 2009-04-28  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/chgpasswd.c, src/newusers.c: There is no need to test for 0
index 3465802de6b7535e9466c0dd8df039c925b5cfa5..3b11480f515b6183440a56c81b2987ec99734255 100644 (file)
@@ -1104,10 +1104,12 @@ int main (int argc, char **argv)
        SYSLOG ((LOG_INFO, "password for '%s' changed by '%s'", name, myname));
        closelog ();
        if (!qflg) {
-               if (!eflg) {
-                       puts (_("Password changed."));
+               if (!anyflag) {
+#ifndef USE_PAM
+                       printf (_("%s: password changed."), Prog);
+#endif                         /* USE_PAM */
                } else {
-                       puts (_("Password set to expire."));
+                       printf (_("%s: password properties changed."), Prog);
                }
        }
        exit (E_SUCCESS);