[PATCH] pam_unix: harmonize prompts
by Dmitry V. Levin
Some of prompts issued directly or indirectly by pam_unix that start
with a capital letter are finished with a dot, some are not.
Fix this grammatical inconsistency by changing all these prompts
to finish with a dot.
* modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass):
Harmonize prompts.
* modules/pam_unix/pam_unix_acct.c (pam_sm_acct_mgmt): Likewise.
* modules/pam_unix/pam_unix_passwd.c (_pam_unix_approve_pass,
pam_sm_chauthtok): Likewise.
* po/Linux-PAM.pot: Regenerate.
---
modules/pam_cracklib/pam_cracklib.c | 2 +-
modules/pam_unix/pam_unix_acct.c | 16 ++++++++--------
modules/pam_unix/pam_unix_passwd.c | 6 +++---
po/Linux-PAM.pot | 22 +++++++++++-----------
4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c
index 45c02ab..840ee1f 100644
--- a/modules/pam_cracklib/pam_cracklib.c
+++ b/modules/pam_cracklib/pam_cracklib.c
@@ -692,7 +692,7 @@ 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 supplied."):_("Password unchanged."));
return PAM_AUTHTOK_ERR;
}
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index 8833114..fbc84e2 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 302cf12..3bab510 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -560,7 +560,7 @@ 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 supplied.") : _("Password unchanged."));
return PAM_AUTHTOK_ERR;
}
/*
@@ -577,7 +577,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 +714,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 9082a4c..dc47975 100644
--- a/po/Linux-PAM.pot
+++ b/po/Linux-PAM.pot
@@ -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-05-31 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(a)li.org>\n"
@@ -248,12 +248,12 @@ msgstr ""
#: modules/pam_cracklib/pam_cracklib.c:695
#: modules/pam_unix/pam_unix_passwd.c:568
-msgid "No password supplied"
+msgid "No password supplied."
msgstr ""
#: modules/pam_cracklib/pam_cracklib.c:695
#: modules/pam_unix/pam_unix_passwd.c:568
-msgid "Password unchanged"
+msgid "Password unchanged."
msgstr ""
#: modules/pam_cracklib/pam_cracklib.c:715
@@ -523,29 +523,29 @@ msgid "Access 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
@@ -553,7 +553,7 @@ msgid "NIS password could not be changed."
msgstr ""
#: modules/pam_unix/pam_unix_passwd.c:585
-msgid "You must choose a longer password"
+msgid "You must choose a longer password."
msgstr ""
#: modules/pam_unix/pam_unix_passwd.c:692
@@ -562,5 +562,5 @@ msgid "Changing password for %s."
msgstr ""
#: modules/pam_unix/pam_unix_passwd.c:722
-msgid "You must wait longer to change your password"
+msgid "You must wait longer to change your password."
msgstr ""
--
ldv
5 years, 9 months
[PATCH 2/2] pam_unix: remove obsolete _UNIX_AUTHTOK, _UNIX_OLD_AUTHTOK, and _UNIX_NEW_AUTHTOK macros
by Dmitry V. Levin
The last use of these macros was removed by commit Linux-PAM-1.3.0~5
so their definitions should go as well.
* modules/pam_unix/pam_unix_auth.c (_UNIX_AUTHTOK): Remove.
* modules/pam_unix/pam_unix_passwd.c (_UNIX_OLD_AUTHTOK,
_UNIX_NEW_AUTHTOK): Likewise.
Complements: 7e09188c5dc4 ("pam_unix: Use pam_get_authtok() instead of
direct pam_prompt() calls.")
---
modules/pam_unix/pam_unix_auth.c | 2 --
modules/pam_unix/pam_unix_passwd.c | 5 -----
2 files changed, 7 deletions(-)
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
index fce6bce..9d9f709 100644
--- a/modules/pam_unix/pam_unix_auth.c
+++ b/modules/pam_unix/pam_unix_auth.c
@@ -74,8 +74,6 @@
* onto a normal UNIX authentication
*/
-#define _UNIX_AUTHTOK "-UN*X-PASS"
-
#define AUTH_RETURN \
do { \
D(("recording return code for next time [%d]", \
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index 9fdebef..302cf12 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -106,11 +106,6 @@ extern int getrpcport(const char *host, unsigned long prognum,
Sets it.
*/
-/* data tokens */
-
-#define _UNIX_OLD_AUTHTOK "-UN*X-OLD-PASS"
-#define _UNIX_NEW_AUTHTOK "-UN*X-NEW-PASS"
-
#define MAX_PASSWD_TRIES 3
#ifdef HAVE_NIS
--
ldv
5 years, 10 months
[PATCH 1/2] pam_unix: remove obsolete _unix_read_password prototype
by Dmitry V. Levin
The function was removed by commit Linux-PAM-1.3.0~5
so the function prototype should go as well.
* modules/pam_unix/support.h (_unix_read_password): Remove.
Complements: 7e09188c5dc4 ("pam_unix: Use pam_get_authtok() instead of
direct pam_prompt() calls.")
---
modules/pam_unix/support.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
index b4c279c..543e9b9 100644
--- a/modules/pam_unix/support.h
+++ b/modules/pam_unix/support.h
@@ -164,13 +164,6 @@ extern int _unix_blankpasswd(pam_handle_t *pamh,unsigned int ctrl,
const char *name);
extern int _unix_verify_password(pam_handle_t * pamh, const char *name
,const char *p, unsigned int ctrl);
-extern int _unix_read_password(pam_handle_t * pamh
- ,unsigned int ctrl
- ,const char *comment
- ,const char *prompt1
- ,const char *prompt2
- ,const char *data_name
- ,const void **pass);
extern int _unix_run_verify_binary(pam_handle_t *pamh,
unsigned int ctrl, const char *user, int *daysleft);
--
ldv
5 years, 10 months
Linux-PAM release
by Tomas Mraz
Hello everyone,
given the last release is more than 2 years old now should we do a new
one?
As the www.linux-pam.org is owned by Thorsten Kukuk, it would be best
if he was able to create the release but I do not know if he is still
interested in working on Linux PAM.
If neither Thorsten nor anybody else is interested to create the
release, I'll step up and do it. I'll place it on github.
The release version should be 1.3.1 as there are no major changes.
Regards,
--
Tomáš Mráz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb
[You'll know whether the road is wrong if you carefully listen to your
conscience.]
5 years, 10 months