From 9c592d628cd5ebefb802da3b291be2b5911ea5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 20 Jan 2014 10:48:39 +0000 Subject: [PATCH] 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 --- modules/pam_oath/pam_oath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/pam_oath/pam_oath.c b/modules/pam_oath/pam_oath.c index fea8bca..8ede0ef 100644 --- a/modules/pam_oath/pam_oath.c +++ b/modules/pam_oath/pam_oath.c @@ -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;