aboutsummaryrefslogtreecommitdiff
path: root/lib/libpam
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2016-05-16 15:32:02 +0000
committerDon Lewis <truckman@FreeBSD.org>2016-05-16 15:32:02 +0000
commit30f648007587ec2612dd1177d932ac41053a42e8 (patch)
tree530c6b22d7f96e782455e4e6adf643bc3d4501c5 /lib/libpam
parent0ab1aa90fa6cdfac63ba895c6862ca2d68ab7719 (diff)
downloadsrc-30f648007587ec2612dd1177d932ac41053a42e8.tar.gz
src-30f648007587ec2612dd1177d932ac41053a42e8.zip
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
Notes
Notes: svn path=/head/; revision=299948
Diffstat (limited to 'lib/libpam')
-rw-r--r--lib/libpam/modules/pam_unix/pam_unix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libpam/modules/pam_unix/pam_unix.c b/lib/libpam/modules/pam_unix/pam_unix.c
index 8c6b822aa743..5403d5d555e2 100644
--- a/lib/libpam/modules/pam_unix/pam_unix.c
+++ b/lib/libpam/modules/pam_unix/pam_unix.c
@@ -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);