diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/openpam/lib/libpam/pam_get_authtok.c | 6 | ||||
-rw-r--r-- | contrib/openpam/lib/libpam/pam_get_user.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/contrib/openpam/lib/libpam/pam_get_authtok.c b/contrib/openpam/lib/libpam/pam_get_authtok.c index 36382f5..55f00fd 100644 --- a/contrib/openpam/lib/libpam/pam_get_authtok.c +++ b/contrib/openpam/lib/libpam/pam_get_authtok.c @@ -122,9 +122,11 @@ pam_get_authtok(pam_handle_t *pamh, if ((promptp = openpam_get_option(pamh, prompt_option)) != NULL) prompt = promptp; /* no prompt provided, see if there is one tucked away somewhere */ - if (prompt == NULL) - if (pam_get_item(pamh, pitem, &promptp) && promptp != NULL) + if (prompt == NULL) { + r = pam_get_item(pamh, pitem, &promptp); + if (r == PAM_SUCCESS && promptp != NULL) prompt = promptp; + } /* fall back to hardcoded default */ if (prompt == NULL) prompt = default_prompt; diff --git a/contrib/openpam/lib/libpam/pam_get_user.c b/contrib/openpam/lib/libpam/pam_get_user.c index 2e22e0e..c42de2f 100644 --- a/contrib/openpam/lib/libpam/pam_get_user.c +++ b/contrib/openpam/lib/libpam/pam_get_user.c @@ -78,10 +78,11 @@ pam_get_user(pam_handle_t *pamh, if ((promptp = openpam_get_option(pamh, "user_prompt")) != NULL) prompt = promptp; /* no prompt provided, see if there is one tucked away somewhere */ - if (prompt == NULL) - if (pam_get_item(pamh, PAM_USER_PROMPT, &promptp) && - promptp != NULL) + if (prompt == NULL) { + r = pam_get_item(pamh, PAM_USER_PROMPT, &promptp); + if (r == PAM_SUCCESS && promptp != NULL) prompt = promptp; + } /* fall back to hardcoded default */ if (prompt == NULL) prompt = user_prompt; |