Date: Fri, 24 Mar 2017 14:39:01 +0000 (UTC) From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315906 - stable/11/contrib/openpam/lib/libpam Message-ID: <201703241439.v2OEd1kK039961@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Fri Mar 24 14:39:00 2017 New Revision: 315906 URL: https://svnweb.freebsd.org/changeset/base/315906 Log: Subset of upstream r902 which fixes custom prompts. PR: 216172 Modified: stable/11/contrib/openpam/lib/libpam/pam_get_authtok.c stable/11/contrib/openpam/lib/libpam/pam_get_user.c Modified: stable/11/contrib/openpam/lib/libpam/pam_get_authtok.c ============================================================================== --- stable/11/contrib/openpam/lib/libpam/pam_get_authtok.c Fri Mar 24 14:27:29 2017 (r315905) +++ stable/11/contrib/openpam/lib/libpam/pam_get_authtok.c Fri Mar 24 14:39:00 2017 (r315906) @@ -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; Modified: stable/11/contrib/openpam/lib/libpam/pam_get_user.c ============================================================================== --- stable/11/contrib/openpam/lib/libpam/pam_get_user.c Fri Mar 24 14:27:29 2017 (r315905) +++ stable/11/contrib/openpam/lib/libpam/pam_get_user.c Fri Mar 24 14:39:00 2017 (r315906) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703241439.v2OEd1kK039961>