summaryrefslogtreecommitdiff
path: root/modules/pam_unix
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2018-06-19 00:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2018-06-19 00:00:00 +0000
commit0fb1f5b701432b6d9f40754b69f2fe0dc6f75103 (patch)
tree551715bbd8aa7a198ec56b1a3065c17bde510fd9 /modules/pam_unix
parent367a7da23e38e08723f12a8b8f4f715167790f25 (diff)
Fix grammar of messages printed via pam_prompt
Turn into proper sentences those messages that are printed without further modifications using pam_prompt in contexts where proper sentences are expected. * libpam/pam_get_authtok.c (pam_get_authtok_internal): Fix grammar of the message passed to pam_error. * modules/pam_limits/pam_limits.c (pam_sm_open_session): Likewise. * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass): Fix grammar of error messages passed to pam_error. * modules/pam_mail/pam_mail.c (report_mail): Fix grammar of a message passed to pam_info. * modules/pam_timestamp/pam_timestamp.c (verbose_success): Likewise. * modules/pam_selinux/pam_selinux.c (config_context, send_text): Fix grammar of messages passed to pam_prompt. * modules/pam_tally/pam_tally.c (tally_check): Fix grammar of messages passed to pam_info. * modules/pam_tally2/pam_tally2.c (tally_check): Likewise. * modules/pam_unix/pam_unix_acct.c (pam_sm_acct_mgmt): Fix grammar of messages passed to _make_remark. * modules/pam_unix/pam_unix_passwd.c (_pam_unix_approve_pass, pam_sm_chauthtok): Likewise. * po/Linux-PAM.pot: Regenerate.
Diffstat (limited to 'modules/pam_unix')
-rw-r--r--modules/pam_unix/pam_unix_acct.c16
-rw-r--r--modules/pam_unix/pam_unix_passwd.c7
2 files changed, 12 insertions, 11 deletions
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index 88331149..fbc84e2f 100644
--- a/modules/pam_unix/pam_unix_acct.c
+++ b/modules/pam_unix/pam_unix_acct.c
@@ -250,7 +250,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
"account %s has expired (account expired)",
uname);
_make_remark(pamh, ctrl, PAM_ERROR_MSG,
- _("Your account has expired; please contact your system administrator"));
+ _("Your account has expired; please contact your system administrator."));
break;
case PAM_NEW_AUTHTOK_REQD:
if (daysleft == 0) {
@@ -258,13 +258,13 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
"expired password for user %s (root enforced)",
uname);
_make_remark(pamh, ctrl, PAM_ERROR_MSG,
- _("You are required to change your password immediately (administrator enforced)"));
+ _("You are required to change your password immediately (administrator enforced)."));
} else {
pam_syslog(pamh, LOG_DEBUG,
"expired password for user %s (password aged)",
uname);
_make_remark(pamh, ctrl, PAM_ERROR_MSG,
- _("You are required to change your password immediately (password expired)"));
+ _("You are required to change your password immediately (password expired)."));
}
break;
case PAM_AUTHTOK_EXPIRED:
@@ -272,7 +272,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
"account %s has expired (failed to change password)",
uname);
_make_remark(pamh, ctrl, PAM_ERROR_MSG,
- _("Your account has expired; please contact your system administrator"));
+ _("Your account has expired; please contact your system administrator."));
break;
case PAM_AUTHTOK_ERR:
retval = PAM_SUCCESS;
@@ -285,19 +285,19 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
#if defined HAVE_DNGETTEXT && defined ENABLE_NLS
snprintf (buf, sizeof (buf),
dngettext(PACKAGE,
- "Warning: your password will expire in %d day",
- "Warning: your password will expire in %d days",
+ "Warning: your password will expire in %d day.",
+ "Warning: your password will expire in %d days.",
daysleft),
daysleft);
#else
if (daysleft == 1)
snprintf(buf, sizeof (buf),
- _("Warning: your password will expire in %d day"),
+ _("Warning: your password will expire in %d day."),
daysleft);
else
snprintf(buf, sizeof (buf),
/* TRANSLATORS: only used if dngettext is not supported */
- _("Warning: your password will expire in %d days"),
+ _("Warning: your password will expire in %d days."),
daysleft);
#endif
_make_remark(pamh, ctrl, PAM_TEXT_INFO, buf);
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index 302cf126..9d0aa733 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -560,7 +560,8 @@ static int _pam_unix_approve_pass(pam_handle_t * pamh
pam_syslog(pamh, LOG_DEBUG, "bad authentication token");
}
_make_remark(pamh, ctrl, PAM_ERROR_MSG, pass_new == NULL ?
- _("No password supplied") : _("Password unchanged"));
+ _("No password has been supplied.") :
+ _("The password has not been changed."));
return PAM_AUTHTOK_ERR;
}
/*
@@ -577,7 +578,7 @@ static int _pam_unix_approve_pass(pam_handle_t * pamh
}
if (off(UNIX__IAMROOT, ctrl)) {
if (strlen(pass_new) < pass_min_len)
- remark = _("You must choose a longer password");
+ remark = _("You must choose a longer password.");
D(("length check [%s]", remark));
if (on(UNIX_REMEMBER_PASSWD, ctrl)) {
if ((retval = check_old_password(user, pass_new)) == PAM_AUTHTOK_ERR)
@@ -714,7 +715,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
if (retval == PAM_AUTHTOK_ERR) {
if (off(UNIX__IAMROOT, ctrl))
_make_remark(pamh, ctrl, PAM_ERROR_MSG,
- _("You must wait longer to change your password"));
+ _("You must wait longer to change your password."));
else
retval = PAM_SUCCESS;
}