diff options
author | truckman <truckman@FreeBSD.org> | 2016-05-16 15:32:02 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2016-05-16 15:32:02 +0000 |
commit | a5da68befe1562b34f51074e50abee8585e74fd1 (patch) | |
tree | 530c6b22d7f96e782455e4e6adf643bc3d4501c5 /lib/libpam/modules/pam_unix/pam_unix.c | |
parent | 77ee692358b84d49d81b84c705673d8fb2939f74 (diff) | |
download | FreeBSD-src-a5da68befe1562b34f51074e50abee8585e74fd1.zip FreeBSD-src-a5da68befe1562b34f51074e50abee8585e74fd1.tar.gz |
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
Diffstat (limited to 'lib/libpam/modules/pam_unix/pam_unix.c')
-rw-r--r-- | lib/libpam/modules/pam_unix/pam_unix.c | 1 |
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 8c6b822..5403d5d 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); |