diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2018-06-19 00:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2018-06-19 00:00:00 +0000 |
commit | 0fb1f5b701432b6d9f40754b69f2fe0dc6f75103 (patch) | |
tree | 551715bbd8aa7a198ec56b1a3065c17bde510fd9 | |
parent | 367a7da23e38e08723f12a8b8f4f715167790f25 (diff) | |
download | linux-pam-git-0fb1f5b701432b6d9f40754b69f2fe0dc6f75103.tar.gz |
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.
-rw-r--r-- | libpam/pam_get_authtok.c | 4 | ||||
-rw-r--r-- | modules/pam_cracklib/pam_cracklib.c | 3 | ||||
-rw-r--r-- | modules/pam_limits/pam_limits.c | 3 | ||||
-rw-r--r-- | modules/pam_mail/pam_mail.c | 2 | ||||
-rw-r--r-- | modules/pam_selinux/pam_selinux.c | 13 | ||||
-rw-r--r-- | modules/pam_tally/pam_tally.c | 4 | ||||
-rw-r--r-- | modules/pam_tally2/pam_tally2.c | 4 | ||||
-rw-r--r-- | modules/pam_timestamp/pam_timestamp.c | 3 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_acct.c | 16 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_passwd.c | 7 | ||||
-rw-r--r-- | po/Linux-PAM.pot | 82 |
11 files changed, 74 insertions, 67 deletions
diff --git a/libpam/pam_get_authtok.c b/libpam/pam_get_authtok.c index 9bfbdf0f..800c6e54 100644 --- a/libpam/pam_get_authtok.c +++ b/libpam/pam_get_authtok.c @@ -161,7 +161,7 @@ pam_get_authtok_internal (pam_handle_t *pamh, int item, { /* We want to abort */ if (chpass) - pam_error (pamh, _("Password change aborted.")); + pam_error (pamh, _("Password change has been aborted.")); return PAM_AUTHTOK_ERR; } @@ -233,7 +233,7 @@ pam_get_authtok_verify (pam_handle_t *pamh, const char **authtok, { /* We want to abort the password change */ pam_set_item (pamh, PAM_AUTHTOK, NULL); - pam_error (pamh, _("Password change aborted.")); + pam_error (pamh, _("Password change has been aborted.")); return PAM_AUTHTOK_ERR; } diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c index 45c02aba..29d3a616 100644 --- a/modules/pam_cracklib/pam_cracklib.c +++ b/modules/pam_cracklib/pam_cracklib.c @@ -692,7 +692,8 @@ static int _pam_unix_approve_pass(pam_handle_t *pamh, if (ctrl & PAM_DEBUG_ARG) pam_syslog(pamh, LOG_DEBUG, "bad authentication token"); pam_error(pamh, "%s", pass_new == NULL ? - _("No password supplied"):_("Password unchanged")); + _("No password has been supplied.") : + _("The password has not been changed.")); return PAM_AUTHTOK_ERR; } diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index 4bc4ae71..cac36999 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -1088,7 +1088,8 @@ out: retval = setup_limits(pamh, pwd->pw_name, pwd->pw_uid, ctrl, pl); if (retval & LOGIN_ERR) - pam_error(pamh, _("Too many logins for '%s'."), pwd->pw_name); + pam_error(pamh, _("There were too many logins for '%s'."), + pwd->pw_name); if (retval != LIMITED_OK) { return PAM_PERM_DENIED; } diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c index 0022f6d6..703c93cb 100644 --- a/modules/pam_mail/pam_mail.c +++ b/modules/pam_mail/pam_mail.c @@ -294,7 +294,7 @@ report_mail(pam_handle_t *pamh, int ctrl, int type, const char *folder) switch (type) { case HAVE_NO_MAIL: - retval = pam_info (pamh, "%s", _("No mail.")); + retval = pam_info (pamh, "%s", _("You have no mail.")); break; case HAVE_NEW_MAIL: retval = pam_info (pamh, "%s", _("You have new mail.")); diff --git a/modules/pam_selinux/pam_selinux.c b/modules/pam_selinux/pam_selinux.c index 348cdd40..9b3fe22e 100644 --- a/modules/pam_selinux/pam_selinux.c +++ b/modules/pam_selinux/pam_selinux.c @@ -207,7 +207,7 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre char *type=NULL; char resp_val = 0; - pam_prompt (pamh, PAM_TEXT_INFO, NULL, _("Default Security Context %s\n"), defaultcon); + pam_prompt (pamh, PAM_TEXT_INFO, NULL, _("The default security context is %s."), defaultcon); while (1) { if (query_response(pamh, @@ -227,7 +227,8 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre if (query_response(pamh, _("role:"), context_role_get(new_context), &response, debug) == PAM_SUCCESS && response[0]) { if (get_default_type(response, &type)) { - pam_prompt (pamh, PAM_ERROR_MSG, NULL, _("No default type for role %s\n"), response); + pam_prompt(pamh, PAM_ERROR_MSG, NULL, + _("There is no default type for role %s."), response); _pam_drop(response); continue; } else { @@ -292,7 +293,7 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre } else { send_audit_message(pamh, 0, defaultcon, context_str(new_context)); - send_text(pamh,_("Not a valid security context"),debug); + send_text(pamh,_("This is not a valid security context."),debug); } context_free(new_context); /* next time around allocates another */ } @@ -541,7 +542,7 @@ compute_exec_context(pam_handle_t *pamh, module_data_t *data, if (!data->exec_context) { pam_syslog(pamh, LOG_ERR, "Unable to get valid context for %s", username); pam_prompt(pamh, PAM_ERROR_MSG, NULL, - _("Unable to get valid context for %s"), username); + _("A valid context for %s could not be obtained."), username); } if (getexeccon(&data->prev_exec_context) < 0) @@ -660,7 +661,7 @@ set_context(pam_handle_t *pamh, const module_data_t *data, char msg[PATH_MAX]; snprintf(msg, sizeof(msg), - _("Security Context %s Assigned"), data->exec_context); + _("Security context %s has been assigned."), data->exec_context); send_text(pamh, msg, debug); } #ifdef HAVE_SETKEYCREATECON @@ -676,7 +677,7 @@ set_context(pam_handle_t *pamh, const module_data_t *data, char msg[PATH_MAX]; snprintf(msg, sizeof(msg), - _("Key Creation Context %s Assigned"), data->exec_context); + _("Key creation context %s has been assigned."), data->exec_context); send_text(pamh, msg, debug); } #endif diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c index 66a515c2..0e51693c 100644 --- a/modules/pam_tally/pam_tally.c +++ b/modules/pam_tally/pam_tally.c @@ -538,7 +538,7 @@ tally_check (time_t oldtime, pam_handle_t *pamh, uid_t uid, { if (!(opts->ctrl & OPT_SILENT)) pam_info (pamh, - _("Account temporary locked (%ld seconds left)"), + _("Account is temporary locked (%ld seconds left)."), oldtime+lock_time-time(NULL)); if (!(opts->ctrl & OPT_NOLOGNOTICE)) @@ -563,7 +563,7 @@ tally_check (time_t oldtime, pam_handle_t *pamh, uid_t uid, ( ((opts->ctrl & OPT_DENY_ROOT) || uid) ) /* even_deny stops uid check */ ) { if (!(opts->ctrl & OPT_SILENT)) - pam_info (pamh, _("Account locked due to %u failed logins"), + pam_info (pamh, _("Account is locked due to %u failed logins."), (unsigned int)tally); if (!(opts->ctrl & OPT_NOLOGNOTICE)) diff --git a/modules/pam_tally2/pam_tally2.c b/modules/pam_tally2/pam_tally2.c index da1c0481..9a24d881 100644 --- a/modules/pam_tally2/pam_tally2.c +++ b/modules/pam_tally2/pam_tally2.c @@ -577,7 +577,7 @@ tally_check (tally_t oldcnt, time_t oldtime, pam_handle_t *pamh, uid_t uid, #endif if (!(opts->ctrl & OPT_QUIET)) { - pam_info(pamh, _("Account locked due to %u failed logins"), + pam_info(pamh, _("Account is locked due to %u failed logins."), (unsigned int)tally->fail_cnt); } loglevel = LOG_NOTICE; @@ -594,7 +594,7 @@ tally_check (tally_t oldcnt, time_t oldtime, pam_handle_t *pamh, uid_t uid, tally->fail_time = oldtime; if (!(opts->ctrl & OPT_QUIET)) { - pam_info(pamh, _("Account temporary locked (%ld seconds left)"), + pam_info(pamh, _("Account is temporary locked (%ld seconds left)."), oldtime+opts->lock_time-time(NULL)); } if (!(opts->ctrl & OPT_NOLOGNOTICE)) { diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c index e29ce6e9..5da7575d 100644 --- a/modules/pam_timestamp/pam_timestamp.c +++ b/modules/pam_timestamp/pam_timestamp.c @@ -354,7 +354,8 @@ get_timestamp_name(pam_handle_t *pamh, int argc, const char **argv, static void verbose_success(pam_handle_t *pamh, long diff) { - pam_info(pamh, _("Access granted (last access was %ld seconds ago)."), diff); + pam_info(pamh, _("Access has been granted" + " (last access was %ld seconds ago)."), diff); } int 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; } diff --git a/po/Linux-PAM.pot b/po/Linux-PAM.pot index 74778010..25a59788 100644 --- a/po/Linux-PAM.pot +++ b/po/Linux-PAM.pot @@ -1,6 +1,6 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Linux-PAM Project -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the Linux-PAM package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Linux-PAM 1.3.1\n" "Report-Msgid-Bugs-To: http://sourceforge.net/projects/pam\n" -"POT-Creation-Date: 2018-05-18 12:58+0200\n" +"POT-Creation-Date: 2018-06-19 00:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -61,7 +61,7 @@ msgid "Retype %s" msgstr "" #: libpam/pam_get_authtok.c:164 libpam/pam_get_authtok.c:236 -msgid "Password change aborted." +msgid "Password change has been aborted." msgstr "" #: libpam/pam_item.c:311 @@ -247,17 +247,17 @@ msgid "contains the user name in some form" msgstr "" #: modules/pam_cracklib/pam_cracklib.c:695 -#: modules/pam_unix/pam_unix_passwd.c:568 -msgid "No password supplied" +#: modules/pam_unix/pam_unix_passwd.c:563 +msgid "No password has been supplied." msgstr "" -#: modules/pam_cracklib/pam_cracklib.c:695 -#: modules/pam_unix/pam_unix_passwd.c:568 -msgid "Password unchanged" +#: modules/pam_cracklib/pam_cracklib.c:696 +#: modules/pam_unix/pam_unix_passwd.c:564 +msgid "The password has not been changed." msgstr "" -#: modules/pam_cracklib/pam_cracklib.c:715 -#: modules/pam_cracklib/pam_cracklib.c:797 +#: modules/pam_cracklib/pam_cracklib.c:716 +#: modules/pam_cracklib/pam_cracklib.c:798 #, c-format msgid "BAD PASSWORD: %s" msgstr "" @@ -326,11 +326,11 @@ msgstr "" #: modules/pam_limits/pam_limits.c:1091 #, c-format -msgid "Too many logins for '%s'." +msgid "There were too many logins for '%s'." msgstr "" #: modules/pam_mail/pam_mail.c:297 -msgid "No mail." +msgid "You have no mail." msgstr "" #: modules/pam_mail/pam_mail.c:300 @@ -376,7 +376,7 @@ msgid "Unable to create and initialize directory '%s'." msgstr "" #: modules/pam_pwhistory/pam_pwhistory.c:217 -#: modules/pam_unix/pam_unix_passwd.c:589 +#: modules/pam_unix/pam_unix_passwd.c:585 msgid "Password has been already used. Choose another." msgstr "" @@ -386,7 +386,7 @@ msgstr "" #: modules/pam_selinux/pam_selinux.c:210 #, c-format -msgid "Default Security Context %s\n" +msgid "The default security context is %s." msgstr "" #: modules/pam_selinux/pam_selinux.c:214 @@ -397,32 +397,32 @@ msgstr "" msgid "role:" msgstr "" -#: modules/pam_selinux/pam_selinux.c:230 +#: modules/pam_selinux/pam_selinux.c:231 #, c-format -msgid "No default type for role %s\n" +msgid "There is no default type for role %s." msgstr "" -#: modules/pam_selinux/pam_selinux.c:262 +#: modules/pam_selinux/pam_selinux.c:263 msgid "level:" msgstr "" -#: modules/pam_selinux/pam_selinux.c:295 -msgid "Not a valid security context" +#: modules/pam_selinux/pam_selinux.c:296 +msgid "This is not a valid security context." msgstr "" -#: modules/pam_selinux/pam_selinux.c:544 +#: modules/pam_selinux/pam_selinux.c:545 #, c-format -msgid "Unable to get valid context for %s" +msgid "A valid context for %s could not be obtained." msgstr "" -#: modules/pam_selinux/pam_selinux.c:663 +#: modules/pam_selinux/pam_selinux.c:664 #, c-format -msgid "Security Context %s Assigned" +msgid "Security context %s has been assigned." msgstr "" -#: modules/pam_selinux/pam_selinux.c:679 +#: modules/pam_selinux/pam_selinux.c:680 #, c-format -msgid "Key Creation Context %s Assigned" +msgid "Key creation context %s has been assigned." msgstr "" #: modules/pam_selinux/pam_selinux_check.c:99 @@ -442,12 +442,12 @@ msgstr "" #: modules/pam_tally/pam_tally.c:541 modules/pam_tally2/pam_tally2.c:597 #, c-format -msgid "Account temporary locked (%ld seconds left)" +msgid "Account is temporary locked (%ld seconds left)." msgstr "" #: modules/pam_tally/pam_tally.c:566 modules/pam_tally2/pam_tally2.c:580 #, c-format -msgid "Account locked due to %u failed logins" +msgid "Account is locked due to %u failed logins." msgstr "" #: modules/pam_tally/pam_tally.c:750 modules/pam_tally2/pam_tally2.c:863 @@ -502,48 +502,50 @@ msgstr "" #: modules/pam_timestamp/pam_timestamp.c:357 #, c-format -msgid "Access granted (last access was %ld seconds ago)." +msgid "Access has been granted (last access was %ld seconds ago)." msgstr "" #: modules/pam_unix/pam_unix_acct.c:253 modules/pam_unix/pam_unix_acct.c:275 -msgid "Your account has expired; please contact your system administrator" +msgid "Your account has expired; please contact your system administrator." msgstr "" #: modules/pam_unix/pam_unix_acct.c:261 msgid "" -"You are required to change your password immediately (administrator enforced)" +"You are required to change your password immediately (administrator " +"enforced)." msgstr "" #: modules/pam_unix/pam_unix_acct.c:267 -msgid "You are required to change your password immediately (password expired)" +msgid "" +"You are required to change your password immediately (password expired)." msgstr "" #: modules/pam_unix/pam_unix_acct.c:288 modules/pam_unix/pam_unix_acct.c:295 #, c-format -msgid "Warning: your password will expire in %d day" -msgid_plural "Warning: your password will expire in %d days" +msgid "Warning: your password will expire in %d day." +msgid_plural "Warning: your password will expire in %d days." msgstr[0] "" msgstr[1] "" #. TRANSLATORS: only used if dngettext is not supported #: modules/pam_unix/pam_unix_acct.c:300 #, c-format -msgid "Warning: your password will expire in %d days" +msgid "Warning: your password will expire in %d days." msgstr "" -#: modules/pam_unix/pam_unix_passwd.c:470 +#: modules/pam_unix/pam_unix_passwd.c:465 msgid "NIS password could not be changed." msgstr "" -#: modules/pam_unix/pam_unix_passwd.c:585 -msgid "You must choose a longer password" +#: modules/pam_unix/pam_unix_passwd.c:581 +msgid "You must choose a longer password." msgstr "" -#: modules/pam_unix/pam_unix_passwd.c:692 +#: modules/pam_unix/pam_unix_passwd.c:688 #, c-format msgid "Changing password for %s." msgstr "" -#: modules/pam_unix/pam_unix_passwd.c:722 -msgid "You must wait longer to change your password" +#: modules/pam_unix/pam_unix_passwd.c:718 +msgid "You must wait longer to change your password." msgstr "" |