]> granicus.if.org Git - linux-pam/commit
pam_get_authtok_verify: Avoid duplicate password verification
authorTomas Mraz <tmraz@fedoraproject.org>
Wed, 7 Aug 2019 10:22:55 +0000 (12:22 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Wed, 7 Aug 2019 10:22:55 +0000 (12:22 +0200)
commit27d04a849fd9f9cfd4b35eb80d687817830183df
tree27a5af79e9be90d084a40a1bc2117671f1d00e0e
parent9c56cb040ed3b1c1169e2de18f7c69c856fb7b2d
pam_get_authtok_verify: Avoid duplicate password verification

If password was already verified by previous modules in the stack
it does not need to be verified by pam_get_authtok_verify either.

* libpam/pam_get_authtok.c (pam_get_authtok_internal): Set the authtok_verified
  appropriately.
  (pam_get_authtok_verify): Do not prompt if authtok_verified is set and
  set it when the password is verified.
* libpam/pam_private.h: Add authtok_verified to the pam handle struct.
* libpam/pam_start.c (pam_start): Initialize authtok_verified.
libpam/pam_get_authtok.c
libpam/pam_private.h
libpam/pam_start.c