1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
8 #include "hash-funcs.h"
10 typedef struct ExecContext ExecContext
;
11 typedef struct ExecParameters ExecParameters
;
12 typedef struct Unit Unit
;
14 /* A credential configured with LoadCredential= */
15 typedef struct ExecLoadCredential
{
20 /* A credential configured with SetCredential= */
21 typedef struct ExecSetCredential
{
28 ExecSetCredential
*exec_set_credential_free(ExecSetCredential
*sc
);
29 DEFINE_TRIVIAL_CLEANUP_FUNC(ExecSetCredential
*, exec_set_credential_free
);
31 ExecLoadCredential
*exec_load_credential_free(ExecLoadCredential
*lc
);
32 DEFINE_TRIVIAL_CLEANUP_FUNC(ExecLoadCredential
*, exec_load_credential_free
);
34 extern const struct hash_ops exec_set_credential_hash_ops
;
35 extern const struct hash_ops exec_load_credential_hash_ops
;
37 bool exec_params_need_credentials(const ExecParameters
*p
);
39 bool exec_context_has_credentials(const ExecContext
*c
);
40 bool exec_context_has_encrypted_credentials(const ExecContext
*c
);
42 int exec_context_get_credential_directory(
43 const ExecContext
*context
,
44 const ExecParameters
*params
,
48 int unit_add_default_credential_dependencies(Unit
*u
, const ExecContext
*c
);
50 int exec_context_destroy_credentials(Unit
*u
);
51 int exec_setup_credentials(
52 const ExecContext
*context
,
53 const ExecParameters
*params
,