summaryrefslogtreecommitdiffstats
path: root/src/shared/creds-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-06-21 17:58:58 +0200
committerLennart Poettering <lennart@poettering.net>2021-07-08 09:30:18 +0200
commit8f860b4df0bf0c92b4b1bca242b70fe0b7ab1d48 (patch)
treecbfb4e4bd72ee19274d7ae3706277034d4db61cd /src/shared/creds-util.h
parenthexdecoct: optionally, line break base64 encoded data (diff)
downloadsystemd-8f860b4df0bf0c92b4b1bca242b70fe0b7ab1d48.tar.xz
systemd-8f860b4df0bf0c92b4b1bca242b70fe0b7ab1d48.zip
util: move src/basic/creds-util.[ch] → src/shared/
This is preparation for adding encryption support to the credentials logic, and we thus would like to add more deps. Let's hence move things from src/basic/ to src/shared, so that we can rely on the OpenSSL utilities already in src/shared.
Diffstat (limited to 'src/shared/creds-util.h')
-rw-r--r--src/shared/creds-util.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/creds-util.h b/src/shared/creds-util.h
new file mode 100644
index 0000000000..7310249424
--- /dev/null
+++ b/src/shared/creds-util.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include <inttypes.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+#include "fd-util.h"
+
+#define CREDENTIAL_NAME_MAX FDNAME_MAX
+
+bool credential_name_valid(const char *s);
+
+int get_credentials_dir(const char **ret);
+
+int read_credential(const char *name, void **ret, size_t *ret_size);