/systemd-251/src/import/ |
D | pull-common.c | 224 static bool is_checksum_file(const char *fn) { in is_checksum_file() argument 227 if (!fn) in is_checksum_file() 230 return streq(fn, "SHA256SUMS") || endswith(fn, ".sha256"); in is_checksum_file() 233 static bool is_signature_file(const char *fn) { in is_signature_file() argument 237 if (!fn) in is_signature_file() 240 return streq(fn, "SHA256SUMS.gpg") || endswith(fn, ".sha256"); in is_signature_file() 254 _cleanup_free_ char *fn = NULL; in pull_make_verification_jobs() local 272 r = import_url_last_component(url, &fn); in pull_make_verification_jobs() 279 if (verify != IMPORT_VERIFY_NO && !is_checksum_file(fn) && !is_signature_file(fn)) { in pull_make_verification_jobs() 285 if (fn) in pull_make_verification_jobs() [all …]
|
/systemd-251/src/test/ |
D | test-serialize.c | 16 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-serialize.XXXXXX"; in TEST() 19 assert_se(fmkostemp_safe(fn, "r+", &f) == 0); in TEST() 20 log_info("/* %s (%s) */", __func__, fn); in TEST() 41 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-serialize.XXXXXX"; in TEST() 44 assert_se(fmkostemp_safe(fn, "r+", &f) == 0); in TEST() 45 log_info("/* %s (%s) */", __func__, fn); in TEST() 66 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-serialize.XXXXXX"; in TEST() 69 assert_se(fmkostemp_safe(fn, "r+", &f) == 0); in TEST() 70 log_info("/* %s (%s) */", __func__, fn); in TEST() 93 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-serialize.XXXXXX"; in TEST() [all …]
|
D | test-acl-util.c | 18 char fn[] = "/tmp/test-empty.XXXXXX"; in TEST_RET() local 24 fd = mkostemp_safe(fn); in TEST_RET() 30 cmd = strjoina("ls -l ", fn); in TEST_RET() 33 cmd = strjoina("getfacl -p ", fn); in TEST_RET() 51 cmd = strjoina("ls -l ", fn); in TEST_RET() 54 cmd = strjoina("getfacl -p ", fn); in TEST_RET() 62 cmd = strjoina("ls -l ", fn); in TEST_RET() 65 cmd = strjoina("getfacl -p ", fn); in TEST_RET() 68 (void) unlink(fn); in TEST_RET()
|
D | test-glob-util.c | 40 const char *fn; in TEST() local 54 fn = strjoina(template, "/*"); in TEST() 55 r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); in TEST() 58 fn = strjoina(template, "/.*"); in TEST() 59 r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); in TEST() 67 const char *fn, *fn2, *fname; in TEST() local 74 fn = strjoina(template, "/*"); in TEST() 75 r = safe_glob(fn, 0, &g); in TEST() 85 r = safe_glob(fn, 0, &g); in TEST()
|
D | test-fileio.c | 394 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-write_string_stream-XXXXXX"; in TEST() 399 fd = mkostemp_safe(fn); in TEST() 407 f = fopen(fn, "r+"); in TEST() 417 f = fopen(fn, "w+"); in TEST() 429 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-write_string_file-XXXXXX"; in TEST() 433 fd = mkostemp_safe(fn); in TEST() 436 assert_se(write_string_file(fn, "boohoo", WRITE_STRING_FILE_CREATE) == 0); in TEST() 443 _cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-write_string_file_no_create-XXXXXX"; in TEST() 447 fd = mkostemp_safe(fn); in TEST() 451 assert_se(write_string_file(fn, "boohoo", 0) == 0); in TEST() [all …]
|
D | test-copy.c | 28 char fn[] = "/tmp/test-copy_file.XXXXXX"; in TEST() local 33 fd = mkostemp_safe(fn); in TEST() 41 assert_se(write_string_file(fn, "foo bar bar bar foo", WRITE_STRING_FILE_CREATE) == 0); in TEST() 43 assert_se(copy_file(fn, fn_copy, 0, 0644, 0, 0, COPY_REFLINK) == 0); in TEST() 49 unlink(fn); in TEST() 326 char fn[] = "/var/tmp/test-copy-hole-fd-XXXXXX"; in TEST_RET() local 333 fd = mkostemp_safe(fn); in TEST_RET() 375 unlink(fn); in TEST_RET()
|
D | test-io-util.c | 36 char fn[] = "/tmp/sparseXXXXXX"; in TEST() local 38 fd = mkostemp(fn, O_CLOEXEC); in TEST() 40 unlink(fn); in TEST()
|
/systemd-251/src/basic/ |
D | fileio.h | 58 int write_string_file_ts(const char *fn, const char *line, WriteStringFileFlags flags, const struct… 59 static inline int write_string_file(const char *fn, const char *line, WriteStringFileFlags flags) { in write_string_file() argument 60 return write_string_file_ts(fn, line, flags, NULL); in write_string_file() 63 int write_string_filef(const char *fn, WriteStringFileFlags flags, const char *format, ...) _printf… 85 int verify_file(const char *fn, const char *blob, bool accept_extra_nl); 100 int write_timestamp_file_atomic(const char *fn, usec_t n); 101 int read_timestamp_file(const char *fn, usec_t *ret);
|
D | fileio.c | 213 const char *fn, in write_string_file_atomic() argument 222 assert(fn); in write_string_file_atomic() 228 r = fopen_temporary(fn, &f, &p); in write_string_file_atomic() 240 if (rename(p, fn) < 0) { in write_string_file_atomic() 260 const char *fn, in write_string_file_ts() argument 268 assert(fn); in write_string_file_ts() 275 r = mkdir_parents(fn, 0755); in write_string_file_ts() 283 r = write_string_file_atomic(fn, line, flags, ts); in write_string_file_ts() 292 fd = open(fn, O_CLOEXEC|O_NOCTTY | in write_string_file_ts() 327 …q = verify_file(fn, line, !(flags & WRITE_STRING_FILE_AVOID_NEWLINE) || (flags & WRITE_STRING_FILE… in write_string_file_ts() [all …]
|
D | tmpfile-util.c | 90 _cleanup_free_ char *d = NULL, *fn = NULL, *nf = NULL; in tempfn_xxxxxx() local 107 r = path_extract_filename(p, &fn); in tempfn_xxxxxx() 111 nf = strjoin(".#", strempty(extra), fn, "XXXXXX"); in tempfn_xxxxxx() 130 _cleanup_free_ char *d = NULL, *fn = NULL, *nf = NULL; in tempfn_random() local 147 r = path_extract_filename(p, &fn); in tempfn_random() 153 fn, in tempfn_random()
|
D | stat-util.h | 26 int null_or_empty_path_with_root(const char *fn, const char *root); 29 static inline int null_or_empty_path(const char *fn) { in null_or_empty_path() argument 30 return null_or_empty_path_with_root(fn, NULL); in null_or_empty_path()
|
/systemd-251/src/nspawn/ |
D | nspawn-cgroup.c | 30 FOREACH_STRING(fn, in chown_cgroup_path() 41 if (fchownat(fd, fn, uid_shift, uid_shift, 0) < 0) in chown_cgroup_path() 43 "Failed to chown \"%s/%s\", ignoring: %m", path, fn); in chown_cgroup_path() 84 const char *fn; in sync_cgroup() local 120 fn = strjoina(tree, cgroup); in sync_cgroup() 121 (void) rm_rf(fn, REMOVE_ROOT|REMOVE_ONLY_DIRECTORIES); in sync_cgroup() 123 fn = strjoina(tree, cgroup, "/cgroup.procs"); in sync_cgroup() 126 …r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_075… in sync_cgroup() 132 fn = strjoina(tree, cgroup); in sync_cgroup() 133 r = chown_cgroup_path(fn, uid_shift); in sync_cgroup() [all …]
|
/systemd-251/src/shared/ |
D | lockfile-util.c | 86 const char *fn; in make_lock_file_for() local 92 fn = basename(p); in make_lock_file_for() 93 if (!filename_is_valid(fn)) in make_lock_file_for() 97 stpcpy(stpcpy(stpcpy(mempcpy(t, p, fn - p), ".#"), fn), ".lck"); in make_lock_file_for()
|
D | dlfcn-util.c | 6 void (**fn)(void); in dlsym_many_or_warnv() local 12 while ((fn = va_arg(ap, typeof(fn)))) { in dlsym_many_or_warnv() 23 *fn = tfn; in dlsym_many_or_warnv()
|
D | fileio-label.h | 10 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts); 11 static inline int write_string_file_atomic_label(const char *fn, const char *line) { in write_string_file_atomic_label() argument 12 return write_string_file_atomic_label_ts(fn, line, NULL); in write_string_file_atomic_label()
|
D | fileio-label.c | 9 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts) { in write_string_file_atomic_label_ts() argument 12 r = mac_selinux_create_file_prepare(fn, S_IFREG); in write_string_file_atomic_label_ts() 16 r = write_string_file_ts(fn, line, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC, ts); in write_string_file_atomic_label_ts()
|
D | discover-image.c | 88 const char *fn; in image_settings_path() local 97 fn = strjoina(image->name, ".nspawn"); in image_settings_path() 100 l[i] = path_join(s, fn); in image_settings_path() 107 l[i] = file_in_same_dir(image->path, fn); in image_settings_path() 115 const char *fn; in image_roothash_path() local 119 fn = strjoina(image->name, ".roothash"); in image_roothash_path() 121 return file_in_same_dir(image->path, fn); in image_roothash_path() 709 const char *fn; in rename_auxiliary_file() local 711 fn = strjoina(new_name, suffix); in rename_auxiliary_file() 713 rs = file_in_same_dir(path, fn); in rename_auxiliary_file() [all …]
|
D | cgroup-show.c | 92 char *fn; in show_cgroup_one_by_path() local 99 fn = strjoina(p, "/cgroup.procs"); in show_cgroup_one_by_path() 100 f = fopen(fn, "re"); in show_cgroup_one_by_path() 259 _cleanup_free_ char *fn = NULL, *p1 = NULL, *last = NULL, *p2 = NULL; in show_cgroup_by_path() local 272 r = cg_mangle_path(path, &fn); in show_cgroup_by_path() 276 d = opendir(fn); in show_cgroup_by_path() 283 k = path_join(fn, gn); in show_cgroup_by_path()
|
D | clean-ipc.c | 329 char fn[1+strlen(de->d_name)+1]; in clean_posix_mq() local 350 fn[0] = '/'; in clean_posix_mq() 351 strcpy(fn+1, de->d_name); in clean_posix_mq() 353 if (mq_unlink(fn) < 0) { in clean_posix_mq() 359 fn); in clean_posix_mq() 361 log_debug("Removed POSIX message queue %s", fn); in clean_posix_mq()
|
D | generator.c | 82 const char *fn; in write_fsck_sysroot_service() local 98 fn = strjoina(dir, "/", unit); in write_fsck_sysroot_service() 99 log_debug("Creating %s", fn); in write_fsck_sysroot_service() 105 f = fopen(fn, "wxe"); in write_fsck_sysroot_service() 107 return log_error_errno(errno, "Failed to create unit file %s: %m", fn); in write_fsck_sysroot_service() 135 return log_error_errno(r, "Failed to write unit file %s: %m", fn); in write_fsck_sysroot_service()
|
/systemd-251/src/journal/ |
D | test-journal-flush.c | 18 _cleanup_free_ char *fn = NULL; in main() local 30 fn = path_join(dn, "test.journal"); in main() 32 …r = managed_journal_file_open(-1, fn, O_CREAT|O_RDWR, 0, 0644, 0, NULL, m, NULL, NULL, &new_journa… in main() 71 unlink(fn); in main()
|
D | test-journal-verify.c | 22 static void bit_toggle(const char *fn, uint64_t p) { in bit_toggle() argument 27 fd = open(fn, O_RDWR|O_CLOEXEC); in bit_toggle() 41 static int raw_verify(const char *fn, const char *verification_key) { in raw_verify() argument 49 …r = journal_file_open(-1, fn, O_RDONLY, JOURNAL_COMPRESS|(verification_key ? JOURNAL_SEAL : 0), 06… in raw_verify()
|
D | journald-server.c | 316 const char *fn; in flushed_flag_is_set() local 325 fn = strjoina(s->runtime_directory, "/flushed"); in flushed_flag_is_set() 326 return access(fn, F_OK) >= 0; in flushed_flag_is_set() 330 const char *fn; in system_journal_open() local 347 fn = strjoina(s->system_storage.path, "/system.journal"); in system_journal_open() 348 …r = open_journal(s, true, fn, O_RDWR|O_CREAT, s->seal, &s->system_storage.metrics, &s->system_jour… in system_journal_open() 373 fn = strjoina(s->runtime_storage.path, "/system.journal"); in system_journal_open() 381 … r = open_journal(s, false, fn, O_RDWR, false, &s->runtime_storage.metrics, &s->runtime_journal); in system_journal_open() 396 …r = open_journal(s, true, fn, O_RDWR|O_CREAT, false, &s->runtime_storage.metrics, &s->runtime_jour… in system_journal_open() 1153 const char *fn; in server_flush_to_var() local [all …]
|
/systemd-251/src/modules-load/ |
D | modules-load.c | 27 const char *fn, const char *format, va_list args) { in systemd_kmod_log() argument 30 log_internalv(priority, 0, file, line, fn, format, args); in systemd_kmod_log() 214 STRV_FOREACH(fn, files) { in run() 215 k = apply_file(ctx, *fn, true); in run()
|
/systemd-251/src/sysupdate/ |
D | sysupdate-resource.c | 366 _cleanup_free_ char *fn = NULL; in resource_load_from_web() local 399 fn = strndup(p, e - p); in resource_load_from_web() 400 if (!fn) in resource_load_from_web() 403 if (!filename_is_valid(fn)) in resource_load_from_web() 405 if (string_has_cc(fn, NULL)) in resource_load_from_web() 408 r = pattern_match_many(rr->patterns, fn, &extracted_fields); in resource_load_from_web() 414 r = import_url_append_component(rr->path, fn, &path); in resource_load_from_web()
|