Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 15:32:02 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299948 - head/lib/libpam/modules/pam_unix
Message-ID:  <201605161532.u4GFW2cw030280@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Mon May 16 15:32:02 2016
New Revision: 299948
URL: https://svnweb.freebsd.org/changeset/base/299948

Log:
  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
  MFC after:	1 week

Modified:
  head/lib/libpam/modules/pam_unix/pam_unix.c

Modified: head/lib/libpam/modules/pam_unix/pam_unix.c
==============================================================================
--- head/lib/libpam/modules/pam_unix/pam_unix.c	Mon May 16 15:28:39 2016	(r299947)
+++ head/lib/libpam/modules/pam_unix/pam_unix.c	Mon May 16 15:32:02 2016	(r299948)
@@ -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?201605161532.u4GFW2cw030280>