From 59e194795089e962c347bb2e6e7dfb73effa03b3 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Tue, 28 Apr 2009 20:46:35 +0000 Subject: [PATCH] * 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. --- ChangeLog | 7 +++++++ src/passwd.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f4c1d19..4880afc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-04-28 Nicolas François + + * 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 * src/chgpasswd.c, src/newusers.c: There is no need to test for 0 diff --git a/src/passwd.c b/src/passwd.c index 3465802d..3b11480f 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -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); -- 2.40.0