Lines Matching refs:target_dir_fd

53         int target_dir_fd;  member
61 c->target_dir_fd = safe_close(c->target_dir_fd); in import_credentials_context_free()
69 if (c->target_dir_fd >= 0) in acquire_encrypted_credential_directory()
70 return c->target_dir_fd; in acquire_encrypted_credential_directory()
76 … c->target_dir_fd = open(ENCRYPTED_SYSTEM_CREDENTIALS_DIRECTORY, O_RDONLY|O_DIRECTORY|O_CLOEXEC); in acquire_encrypted_credential_directory()
77 if (c->target_dir_fd < 0) in acquire_encrypted_credential_directory()
80 return c->target_dir_fd; in acquire_encrypted_credential_directory()
83 static int open_credential_file_for_write(int target_dir_fd, const char *dir_name, const char *n) { in open_credential_file_for_write() argument
86 assert(target_dir_fd >= 0); in open_credential_file_for_write()
90 fd = openat(target_dir_fd, n, O_WRONLY|O_CLOEXEC|O_CREAT|O_EXCL|O_NOFOLLOW, 0400); in open_credential_file_for_write()
141 .target_dir_fd = -1, in import_credentials_boot()
225 …nfd = open_credential_file_for_write(context.target_dir_fd, ENCRYPTED_SYSTEM_CREDENTIALS_DIRECTORY… in import_credentials_boot()
233 (void) unlinkat(context.target_dir_fd, n, 0); in import_credentials_boot()
260 if (c->target_dir_fd >= 0) in acquire_credential_directory()
261 return c->target_dir_fd; in acquire_credential_directory()
279 c->target_dir_fd = open(SYSTEM_CREDENTIALS_DIRECTORY, O_RDONLY|O_DIRECTORY|O_CLOEXEC); in acquire_credential_directory()
280 if (c->target_dir_fd < 0) in acquire_credential_directory()
283 return c->target_dir_fd; in acquire_credential_directory()
324 nfd = open_credential_file_for_write(c->target_dir_fd, SYSTEM_CREDENTIALS_DIRECTORY, n); in proc_cmdline_callback()
332 (void) unlinkat(c->target_dir_fd, n, 0); in proc_cmdline_callback()
428 … nfd = open_credential_file_for_write(c->target_dir_fd, SYSTEM_CREDENTIALS_DIRECTORY, d->d_name); in import_credentials_qemu()
436 (void) unlinkat(c->target_dir_fd, d->d_name, 0); in import_credentials_qemu()
451 .target_dir_fd = -1, in import_credentials_trusted()