aboutsummaryrefslogtreecommitdiff
path: root/libpam/pam_private.h
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2019-08-07 12:22:55 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2019-08-07 12:22:55 +0200
commit27d04a849fd9f9cfd4b35eb80d687817830183df (patch)
tree27a5af79e9be90d084a40a1bc2117671f1d00e0e /libpam/pam_private.h
parent9c56cb040ed3b1c1169e2de18f7c69c856fb7b2d (diff)
downloadpam-27d04a849fd9f9cfd4b35eb80d687817830183df.tar.gz
pam-27d04a849fd9f9cfd4b35eb80d687817830183df.tar.bz2
pam-27d04a849fd9f9cfd4b35eb80d687817830183df.zip
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.
Diffstat (limited to 'libpam/pam_private.h')
-rw-r--r--libpam/pam_private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpam/pam_private.h b/libpam/pam_private.h
index 7ff9f758..58a26f58 100644
--- a/libpam/pam_private.h
+++ b/libpam/pam_private.h
@@ -172,6 +172,7 @@ struct pam_handle {
#ifdef HAVE_LIBAUDIT
int audit_state; /* keep track of reported audit messages */
#endif
+ int authtok_verified;
};
/* Values for select arg to _pam_dispatch() */