summaryrefslogtreecommitdiff
path: root/src/home/homework.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-02 23:03:17 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-13 00:22:16 +0100
commit6b945d7031f34a1652d2e6808bfffbd3761e642e (patch)
tree8ca620d74d6f27a6f016d1f53e4c513bc72aa6ff /src/home/homework.h
parent0881991c3236a894378167ea9006dbf15a56ba58 (diff)
downloadsystemd-6b945d7031f34a1652d2e6808bfffbd3761e642e.tar.gz
homework: split out password cache logic into its own .c/.h file
Preparation for extending it further down the line.
Diffstat (limited to 'src/home/homework.h')
-rw-r--r--src/home/homework.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/home/homework.h b/src/home/homework.h
index d7ad6fbdfa..053def6360 100644
--- a/src/home/homework.h
+++ b/src/home/homework.h
@@ -6,8 +6,8 @@
#include "sd-id128.h"
+#include "homework-password-cache.h"
#include "loop-util.h"
-#include "strv.h"
#include "user-record.h"
#include "user-record-util.h"
@@ -43,22 +43,6 @@ typedef struct HomeSetup {
char *temporary_image_path;
} HomeSetup;
-typedef struct PasswordCache {
- /* Decoding passwords from security tokens is expensive and typically requires user interaction,
- * hence cache any we already figured out. */
- char **pkcs11_passwords;
- char **fido2_passwords;
-} PasswordCache;
-
-void password_cache_free(PasswordCache *cache);
-
-static inline bool password_cache_contains(const PasswordCache *cache, const char *p) {
- if (!cache)
- return false;
-
- return strv_contains(cache->pkcs11_passwords, p) || strv_contains(cache->fido2_passwords, p);
-}
-
#define HOME_SETUP_INIT \
{ \
.root_fd = -1, \