From b6935e26379d61916e59b0d66009b2352e8ce2e5 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 18 Dec 2008 13:09:36 +0000 Subject: Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2008-12-18 Thorsten Kukuk * modules/pam_pwhistory/pam_pwhistory.c (parse_option): Rename type= option to authtok_type= (because of pam_get_authtok). * modules/pam_pwhistory/pam_pwhistory.8.xml: Likewise. --- modules/pam_pwhistory/pam_pwhistory.8.xml | 15 ++++++++------- modules/pam_pwhistory/pam_pwhistory.c | 6 ++---- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'modules/pam_pwhistory') diff --git a/modules/pam_pwhistory/pam_pwhistory.8.xml b/modules/pam_pwhistory/pam_pwhistory.8.xml index f8c152ad..cc216707 100644 --- a/modules/pam_pwhistory/pam_pwhistory.8.xml +++ b/modules/pam_pwhistory/pam_pwhistory.8.xml @@ -34,7 +34,7 @@ retry=N - type=STRING + authtok_type=STRING @@ -124,15 +124,13 @@ - + - The default action is for the module to use the - following prompts when requesting passwords: - "New UNIX password: " and "Retype UNIX password: ". - The default word UNIX can - be replaced with this option. + See + pam_get_authtok3 + for more details. @@ -231,6 +229,9 @@ password required pam_unix.so use_authtok pam8 + + pam_get_authtok3 + diff --git a/modules/pam_pwhistory/pam_pwhistory.c b/modules/pam_pwhistory/pam_pwhistory.c index c555ac39..0f6ffca3 100644 --- a/modules/pam_pwhistory/pam_pwhistory.c +++ b/modules/pam_pwhistory/pam_pwhistory.c @@ -65,7 +65,6 @@ struct options_t { int enforce_for_root; int remember; int tries; - const char *prompt_type; }; typedef struct options_t options_t; @@ -97,8 +96,8 @@ parse_option (pam_handle_t *pamh, const char *argv, options_t *options) } else if (strcasecmp (argv, "enforce_for_root") == 0) options->enforce_for_root = 1; - else if (strncasecmp (argv, "type=", 5) == 0) - options->prompt_type = &argv[5]; + else if (strncasecmp (argv, "authtok_type=", 13) == 0) + { /* ignore, for pam_get_authtok */; } else pam_syslog (pamh, LOG_ERR, "pam_pwhistory: unknown option: %s", argv); } @@ -118,7 +117,6 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv) /* Set some default values, which could be overwritten later. */ options.remember = 10; options.tries = 1; - options.prompt_type = "UNIX"; /* Parse parameters for module */ for ( ; argc-- > 0; argv++) -- cgit v1.2.3