diff options
Diffstat (limited to 'modules/pam_unix')
-rw-r--r-- | modules/pam_unix/pam_unix_acct.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c index ec47d4b6..69af417c 100644 --- a/modules/pam_unix/pam_unix_acct.c +++ b/modules/pam_unix/pam_unix_acct.c @@ -317,8 +317,13 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, pam_syslog(pamh, LOG_DEBUG, "password for user %s will expire in %d days", uname, daysleft); - snprintf(buf, sizeof (buf), _("Warning: your password will expire in %d day%.2s"), - daysleft, daysleft == 1 ? "" : "s"); + if (daysleft == 1) + snprintf(buf, sizeof (buf), + _("Warning: your password will expire in one day")); + else + snprintf(buf, sizeof (buf), + _("Warning: your password will expire in %d days"), + daysleft); _make_remark(pamh, ctrl, PAM_TEXT_INFO, buf); } |