summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_tally/pam_tally.c1
-rw-r--r--modules/pam_unix/pam_unix_acct.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c
index 71dc70bd..ffd9b330 100644
--- a/modules/pam_tally/pam_tally.c
+++ b/modules/pam_tally/pam_tally.c
@@ -391,6 +391,7 @@ set_tally(pam_handle_t *pamh, tally_t tally, uid_t uid,
sizeof(struct faillog), 1, *TALLY)==0 ) {
pam_syslog(pamh, LOG_ALERT, "update (fwrite) failed for %s", filename);
retval = PAM_AUTH_ERR;
+ }
}
}
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);
}