From owner-svn-src-all@freebsd.org Fri Mar 24 14:39:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74275D1BF0F; Fri, 24 Mar 2017 14:39:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23C9CD3B; Fri, 24 Mar 2017 14:39:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2OEd1Rq039963; Fri, 24 Mar 2017 14:39:01 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2OEd1kK039961; Fri, 24 Mar 2017 14:39:01 GMT (envelope-from des@FreeBSD.org) Message-Id: <201703241439.v2OEd1kK039961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 24 Mar 2017 14:39:01 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 14:39:02 -0000 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;