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);
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to