diff options
Diffstat (limited to 'src/home/homework-password-cache.h')
-rw-r--r-- | src/home/homework-password-cache.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/home/homework-password-cache.h b/src/home/homework-password-cache.h index 6b4de15724..fdfbcfe4e0 100644 --- a/src/home/homework-password-cache.h +++ b/src/home/homework-password-cache.h @@ -5,6 +5,9 @@ #include "user-record.h" typedef struct PasswordCache { + /* Passwords acquired from the kernel keyring */ + char **keyring_passswords; + /* Decoding passwords from security tokens is expensive and typically requires user interaction, * hence cache any we already figured out. */ char **pkcs11_passwords; @@ -17,5 +20,9 @@ static inline bool password_cache_contains(const PasswordCache *cache, const cha if (!cache) return false; - return strv_contains(cache->pkcs11_passwords, p) || strv_contains(cache->fido2_passwords, p); + return strv_contains(cache->pkcs11_passwords, p) || + strv_contains(cache->fido2_passwords, p) || + strv_contains(cache->keyring_passswords, p); } + +void password_cache_load_keyring(UserRecord *h, PasswordCache *cache); |