Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 05:14:26 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r300456 - stable/10/lib/libpam/modules/pam_unix
Message-ID:  <201605230514.u4N5EQfv084346@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Mon May 23 05:14:26 2016
New Revision: 300456
URL: https://svnweb.freebsd.org/changeset/base/300456

Log:
  MFC r299948
  
  Set retval in the empty password case to avoid a path through the
  code that fails to set retval before falling through to the final
  return().
  
  Reported by:	emaste
  Reported by:	Coverity
  CID:		1018711

Modified:
  stable/10/lib/libpam/modules/pam_unix/pam_unix.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libpam/modules/pam_unix/pam_unix.c
==============================================================================
--- stable/10/lib/libpam/modules/pam_unix/pam_unix.c	Mon May 23 05:11:38 2016	(r300455)
+++ stable/10/lib/libpam/modules/pam_unix/pam_unix.c	Mon May 23 05:14:26 2016	(r300456)
@@ -332,6 +332,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
 			 * XXX check PAM_DISALLOW_NULL_AUTHTOK
 			 */
 			old_pass = "";
+			retval = PAM_SUCCESS;
 		} else {
 			retval = pam_get_authtok(pamh,
 			    PAM_OLDAUTHTOK, &old_pass, NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605230514.u4N5EQfv084346>