]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Hoist the getpwnam() call outside the first if/else block in
authortruckman <truckman@FreeBSD.org>
Mon, 16 May 2016 08:34:17 +0000 (08:34 +0000)
committertruckman <truckman@FreeBSD.org>
Mon, 16 May 2016 08:34:17 +0000 (08:34 +0000)
commit4490b45732f3eef1f1ad1afe160f2b7b7a3fa5b3
tree18b2d757593ad5c7b95ade7facce9d52dd3c0bd8
parent89eb27d42aa97e0f42dc26e1705f8618e00f45cc
Hoist the getpwnam() call outside the first if/else block in
pam_sm_chauthtok().  Set user = getlogin() inside the true
branch so that it is initialized for the following PAM_LOG()
call.  This is how it is done in pam_sm_authenticate().

Reported by: Coverity
CID: 272498
MFC after: 1 week
lib/libpam/modules/pam_unix/pam_unix.c