summaryrefslogtreecommitdiff
path: root/src/home/homework-password-cache.c
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-password-cache.c
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-password-cache.c')
-rw-r--r--src/home/homework-password-cache.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/home/homework-password-cache.c b/src/home/homework-password-cache.c
new file mode 100644
index 0000000000..87d90c9184
--- /dev/null
+++ b/src/home/homework-password-cache.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "homework-password-cache.h"
+
+void password_cache_free(PasswordCache *cache) {
+ if (!cache)
+ return;
+
+ cache->pkcs11_passwords = strv_free_erase(cache->pkcs11_passwords);
+ cache->fido2_passwords = strv_free_erase(cache->fido2_passwords);
+}