Note that saving the keyfile updates a TOTP key's lastused parameter.

git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@753 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2014-01-20 10:48:39 +00:00
parent aa338bce81
commit 9c592d628c
1 changed files with 2 additions and 1 deletions

View File

@ -138,6 +138,7 @@ pam_oath_load_key(const char *keyfile)
/*
* Save the user's key.
* XXX should be a liboath API function.
*/
static int
pam_oath_save_key(const struct oath_key *key, const char *keyfile)
@ -276,7 +277,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
goto done;
}
/* write back (update counter for HOTP etc) */
/* write back the key (update counter for HOTP, lastused for TOTP) */
if (pam_oath_save_key(key, keyfile) != 0) {
pam_err = PAM_SERVICE_ERR;
goto done;