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
This commit is contained in:
Don Lewis 2016-05-23 05:14:26 +00:00
parent 8368aaffce
commit b77232adfe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=300456

View File

@ -332,6 +332,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
* XXX check PAM_DISALLOW_NULL_AUTHTOK
*/
old_pass = "";
retval = PAM_SUCCESS;
} else {
retval = pam_get_authtok(pamh,
PAM_OLDAUTHTOK, &old_pass, NULL);