_cleanup_close_ int fd = -EBADF;
int r;
+ assert(dfd >= 0);
+ assert(id);
+ assert(data || size == 0);
+
r = tempfn_random_child("", "cred", &tmp);
if (r < 0)
return r;
} CredentialSearchPath;
static char **credential_search_path(const ExecParameters *params, CredentialSearchPath path) {
-
_cleanup_strv_free_ char **l = NULL;
assert(params);
size_t add;
int r;
+ assert(dir_fd >= 0);
+ assert(id);
+ assert(left);
+
if (encrypted) {
r = decrypt_credential_and_warn(
id,
static int load_credential_glob(
const char *path,
bool encrypted,
- char **search_path,
+ char * const *search_path,
ReadFullFileFlags flags,
int write_dfd,
uid_t uid,
int r;
+ assert(path);
+ assert(search_path);
+ assert(write_dfd >= 0);
+ assert(left);
+
STRV_FOREACH(d, search_path) {
_cleanup_globfree_ glob_t pglob = {};
_cleanup_free_ char *j = NULL;
_cleanup_free_ char *sub_id = NULL;
int r;
+ assert(path);
+ assert(de);
+
if (event != RECURSE_DIR_ENTRY)
return RECURSE_DIR_CONTINUE;
int r;
assert(context);
+ assert(params);
+ assert(unit);
assert(p);
dfd = open(p, O_DIRECTORY|O_CLOEXEC);
&left);
else
/* Directory */
- r = recurse_dir(
- sub_fd,
+ r = recurse_dir(sub_fd,
/* path= */ lc->id, /* recurse_dir() will suffix the subdir paths from here to the top-level id */
/* statx_mask= */ 0,
/* n_depth_max= */ UINT_MAX,
const char *where;
assert(context);
+ assert(params);
+ assert(unit);
assert(final);
assert(workspace);
assert(context);
assert(params);
+ assert(unit);
if (!exec_context_has_credentials(context))
return 0;