/systemd-251/test/ |
D | test-systemctl-enable.sh | 11 unset root 13 [ -n "$root" ] && rm -rf "$root" 16 root=$(mktemp -d --tmpdir systemctl-test.XXXXXX) 24 ( ! "$systemctl" --root="$root" enable test1.service ) 27 mkdir -p "$root/etc/systemd/system" 28 cat >"$root/etc/systemd/system/test1.service" <<EOF 34 "$systemctl" --root="$root" enable test1.service 35 test -h "$root/etc/systemd/system/default.target.wants/test1.service" 36 test -h "$root/etc/systemd/system/special.target.requires/test1.service" 38 "$systemctl" --root="$root" reenable test1.service [all …]
|
D | create-busybox-container | 8 root="${1:?Usage $0 container-root}" 9 mkdir -p "$root" 10 mkdir "$root/bin" 14 cp "$busybox" "$root/bin/busybox" 16 mkdir -p "$root/usr/lib" 17 touch "$root/usr/lib/os-release" 19 ln -s busybox "$root/bin/sh" 20 ln -s busybox "$root/bin/cat" 21 ln -s busybox "$root/bin/tr" 22 ln -s busybox "$root/bin/ps" [all …]
|
D | test-sysusers.sh.in | 52 $SYSUSERS --root=$TESTDIR 61 cat $f | $SYSUSERS --root=$TESTDIR - 71 cat $f | $SYSUSERS --root=$TESTDIR --replace=/etc/sysusers.d/test.conf - 73 cat $SOURCE/test-1.input | $SYSUSERS --root=$TESTDIR --replace=/usr/lib/sysusers.d/test.conf - 83 $SYSUSERS --root=$TESTDIR --inline \ 94 $SYSUSERS --root=$TESTDIR \ 127 $SYSUSERS --root=$TESTDIR 142 $SYSUSERS --root=$TESTDIR 155 $SYSUSERS --root=$TESTDIR 2>&1 | tail -n1 > $TESTDIR/err
|
/systemd-251/src/test/ |
D | test-install-root.c | 16 static char *root = NULL; variable 18 STATIC_DESTRUCTOR_REGISTER(root, rm_rf_physical_and_freep); 26 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "a.service", NULL) == -ENOENT); in TEST() 27 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "b.service", NULL) == -ENOENT); in TEST() 28 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "c.service", NULL) == -ENOENT); in TEST() 29 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "d.service", NULL) == -ENOENT); in TEST() 30 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "e.service", NULL) == -ENOENT); in TEST() 31 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "f.service", NULL) == -ENOENT); in TEST() 33 p = strjoina(root, "/usr/lib/systemd/system/a.service"); in TEST() 38 assert_se(unit_file_get_state(LOOKUP_SCOPE_SYSTEM, root, "a.service", NULL) >= 0); in TEST() [all …]
|
D | test-conf-files.c | 97 static void test_conf_files_insert_one(const char *root) { in test_conf_files_insert_one() argument 100 log_info("/* %s root=%s */", __func__, strempty(root)); in test_conf_files_insert_one() 105 *foo1 = path_join(root, "/dir1/foo.conf"), in test_conf_files_insert_one() 106 *foo2 = path_join(root, "/dir2/foo.conf"), in test_conf_files_insert_one() 107 *bar2 = path_join(root, "/dir2/bar.conf"), in test_conf_files_insert_one() 108 *zzz3 = path_join(root, "/dir3/zzz.conf"), in test_conf_files_insert_one() 109 *whatever = path_join(root, "/whatever.conf"); in test_conf_files_insert_one() 111 assert_se(conf_files_insert(&s, root, dirs, "/dir2/foo.conf") == 0); in test_conf_files_insert_one() 115 assert_se(conf_files_insert(&s, root, dirs, "/dir2/foo.conf") == 0); in test_conf_files_insert_one() 119 assert_se(conf_files_insert(&s, root, dirs, "/dir3/foo.conf") == 0); in test_conf_files_insert_one() [all …]
|
/systemd-251/src/shared/ |
D | specifier.h | 6 typedef int (*SpecifierCallback)(char specifier, const void *data, const char *root, const void *us… 14 int specifier_printf(const char *text, size_t max_length, const Specifier table[], const char *root… 16 int specifier_string(char specifier, const void *data, const char *root, const void *userdata, char… 17 int specifier_real_path(char specifier, const void *data, const char *root, const void *userdata, c… 18 int specifier_real_directory(char specifier, const void *data, const char *root, const void *userda… 20 int specifier_machine_id(char specifier, const void *data, const char *root, const void *userdata, … 21 int specifier_boot_id(char specifier, const void *data, const char *root, const void *userdata, cha… 22 int specifier_hostname(char specifier, const void *data, const char *root, const void *userdata, ch… 23 int specifier_short_hostname(char specifier, const void *data, const char *root, const void *userda… 24 int specifier_pretty_hostname(char specifier, const void *data, const char *root, const void *userd… [all …]
|
D | specifier.c | 37 int specifier_printf(const char *text, size_t max_length, const Specifier table[], const char *root… in specifier_printf() argument 70 r = i->lookup(i->specifier, i->data, root, userdata, &w); in specifier_printf() 114 int specifier_string(char specifier, const void *data, const char *root, const void *userdata, char… in specifier_string() argument 129 int specifier_real_path(char specifier, const void *data, const char *root, const void *userdata, c… in specifier_real_path() argument 137 return chase_symlinks(path, root, 0, ret, NULL); in specifier_real_path() 140 int specifier_real_directory(char specifier, const void *data, const char *root, const void *userda… in specifier_real_directory() argument 146 r = specifier_real_path(specifier, data, root, userdata, &path); in specifier_real_directory() 154 int specifier_machine_id(char specifier, const void *data, const char *root, const void *userdata, … in specifier_machine_id() argument 161 if (root) { in specifier_machine_id() 164 …fd = chase_symlinks_and_open("/etc/machine-id", root, CHASE_PREFIX_ROOT, O_RDONLY|O_CLOEXEC|O_NOCT… in specifier_machine_id() [all …]
|
D | machine-id-setup.c | 30 static int generate_machine_id(const char *root, sd_id128_t *ret) { in generate_machine_id() argument 38 dbus_machine_id = prefix_roota(root, "/var/lib/dbus/machine-id"); in generate_machine_id() 49 if (isempty(root) && running_in_chroot() <= 0) { in generate_machine_id() 85 int machine_id_setup(const char *root, bool force_transient, sd_id128_t machine_id, sd_id128_t *ret… in machine_id_setup() argument 91 etc_machine_id = prefix_roota(root, "/etc/machine-id"); in machine_id_setup() 130 r = generate_machine_id(root, &machine_id); in machine_id_setup() 168 run_machine_id = prefix_roota(root, "/run/machine-id"); in machine_id_setup() 198 int machine_id_commit(const char *root) { in machine_id_commit() argument 220 etc_machine_id = prefix_roota(root, "/etc/machine-id"); in machine_id_commit()
|
D | install-printf.c | 16 static int specifier_prefix_and_instance(char specifier, const void *data, const char *root, const … in specifier_prefix_and_instance() argument 38 static int specifier_name(char specifier, const void *data, const char *root, const void *userdata,… in specifier_name() argument 52 static int specifier_prefix(char specifier, const void *data, const char *root, const void *userdat… in specifier_prefix() argument 58 static int specifier_instance(char specifier, const void *data, const char *root, const void *userd… in specifier_instance() argument 77 static int specifier_last_component(char specifier, const void *data, const char *root, const void … in specifier_last_component() argument 84 r = specifier_prefix(specifier, data, root, userdata, &prefix); in specifier_last_component() 124 return specifier_printf(format, UNIT_NAME_MAX, table, info->root, info, ret); in install_name_printf()
|
/systemd-251/src/libsystemd/sd-bus/ |
D | test-bus-match.c | 39 static int match_add(sd_bus_slot *slots, struct bus_match_node *root, const char *match, int value)… in match_add() argument 54 r = bus_match_add(root, components, n_components, &s->match_callback); in match_add() 70 struct bus_match_node root = { in main() local 87 …assert_se(match_add(slots, &root, "arg2='wal\\'do',sender='foo',type='signal',interface='bar.x',",… in main() 88 …assert_se(match_add(slots, &root, "arg2='wal\\'do2',sender='foo',type='signal',interface='bar.x',"… in main() 89 …assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='signal',interface='bar.x',", 3) … in main() 90 …assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='method_call',interface='bar.x',"… in main() 91 assert_se(match_add(slots, &root, "", 5) >= 0); in main() 92 assert_se(match_add(slots, &root, "interface='quux.x'", 6) >= 0); in main() 93 assert_se(match_add(slots, &root, "interface='bar.x'", 7) >= 0); in main() [all …]
|
/systemd-251/tmpfiles.d/ |
D | systemd.conf.in | 10 d /run/user 0755 root root - 12 F! /run/utmp 0664 root utmp - 15 d /run/systemd/ask-password 0755 root root - 16 d /run/systemd/seats 0755 root root - 17 d /run/systemd/sessions 0755 root root - 18 d /run/systemd/users 0755 root root - 19 d /run/systemd/machines 0755 root root - 20 d /run/systemd/shutdown 0755 root root - 22 d /run/log 0755 root root - 24 z /run/log/journal 2755 root systemd-journal - - [all …]
|
D | x11.conf | 12 D! /tmp/.X11-unix 1777 root root 10d 13 D! /tmp/.ICE-unix 1777 root root 10d 14 D! /tmp/.XIM-unix 1777 root root 10d 15 D! /tmp/.font-unix 1777 root root 10d
|
/systemd-251/src/basic/ |
D | os-util.h | 16 int open_extension_release(const char *root, const char *extension, char **ret_path, int *ret_fd); 17 static inline int open_os_release(const char *root, char **ret_path, int *ret_fd) { in open_os_release() argument 18 return open_extension_release(root, NULL, ret_path, ret_fd); in open_os_release() 21 int fopen_extension_release(const char *root, const char *extension, char **ret_path, FILE **ret_fi… 22 static inline int fopen_os_release(const char *root, char **ret_path, FILE **ret_file) { in fopen_os_release() argument 23 return fopen_extension_release(root, NULL, ret_path, ret_file); in fopen_os_release() 26 int _parse_extension_release(const char *root, const char *extension, ...) _sentinel_; 27 int _parse_os_release(const char *root, ...) _sentinel_; 28 #define parse_extension_release(root, extension, ...) _parse_extension_release(root, extension, __V… argument 29 #define parse_os_release(root, ...) _parse_os_release(root, __VA_ARGS__, NULL) argument [all …]
|
D | os-util.c | 60 int open_extension_release(const char *root, const char *extension, char **ret_path, int *ret_fd) { in open_extension_release() argument 72 r = chase_symlinks(extension_full_path, root, CHASE_PREFIX_ROOT, in open_extension_release() 86 … r = chase_symlinks_and_opendir("/usr/lib/extension-release.d/", root, CHASE_PREFIX_ROOT, in open_extension_release() 89 … return log_debug_errno(r, "Cannot open %s/usr/lib/extension-release.d/, ignoring: %m", root); in open_extension_release() 175 r = chase_symlinks(var, root, 0, in open_extension_release() 180 r = chase_symlinks(path, root, CHASE_PREFIX_ROOT, in open_extension_release() 208 int fopen_extension_release(const char *root, const char *extension, char **ret_path, FILE **ret_fi… in fopen_extension_release() argument 215 return open_extension_release(root, extension, ret_path, NULL); in fopen_extension_release() 217 r = open_extension_release(root, extension, ret_path ? &p : NULL, &fd); in fopen_extension_release() 232 static int parse_release_internal(const char *root, const char *extension, va_list ap) { in parse_release_internal() argument [all …]
|
D | chase-symlinks.c | 67 _cleanup_free_ char *buffer = NULL, *done = NULL, *root = NULL; in chase_symlinks() local 155 r = path_make_absolute_cwd(original_root, &root); in chase_symlinks() 164 delete_trailing_chars(root, "/"); in chase_symlinks() 165 path_simplify(root); in chase_symlinks() 168 buffer = path_join(root, path); in chase_symlinks() 180 fd = open(empty_to_root(root), O_CLOEXEC|O_DIRECTORY|O_PATH); in chase_symlinks() 191 if (root) { in chase_symlinks() 194 todo = path_startswith(buffer, root); in chase_symlinks() 199 path, root); in chase_symlinks() 201 done = strdup(root); in chase_symlinks() [all …]
|
D | conf-files.c | 27 const char *root, in files_add() argument 39 dirpath = prefix_roota(root, path); in files_add() 142 const char *root, in conf_files_list_strv_internal() argument 154 if (!path_strv_resolve_uniq(dirs, root)) in conf_files_list_strv_internal() 168 r = files_add(fh, masked, suffix, root, flags, *p); in conf_files_list_strv_internal() 185 int conf_files_insert(char ***strv, const char *root, char **dirs, const char *path) { in conf_files_insert() argument 211 rdir = path_join(root, *dir); in conf_files_insert() 225 t = path_join(root, path); in conf_files_insert() 242 t = path_join(root, path); in conf_files_insert() 253 int conf_files_list_strv(char ***ret, const char *suffix, const char *root, unsigned flags, const c… in conf_files_list_strv() argument [all …]
|
D | limits-util.c | 15 _cleanup_free_ char *root = NULL, *value = NULL; in physical_memory() local 33 r = cg_get_root_path(&root); in physical_memory() 45 r = cg_get_attribute("memory", root, "memory.max", &value); in physical_memory() 59 r = cg_get_attribute("memory", root, "memory.limit_in_bytes", &value); in physical_memory() 115 _cleanup_free_ char *root = NULL; in system_tasks_max() local 155 r = cg_get_root_path(&root); in system_tasks_max() 159 r = cg_get_attribute_as_uint64("pids", root, "pids.max", &c); in system_tasks_max()
|
D | strbuf.c | 37 .root = new0(struct strbuf_node, 1), in strbuf_new() 41 if (!str->buf || !str->root) { in strbuf_new() 43 free(str->root); in strbuf_new() 63 if (str->root) in strbuf_complete() 64 str->root = strbuf_node_cleanup(str->root); in strbuf_complete() 115 if (!str->root) in strbuf_add_string() 127 node = str->root; in strbuf_add_string()
|
/systemd-251/test/units/ |
D | testsuite-22.08.sh | 12 rm -fr /tmp/root /tmp/user 13 mkdir -p /tmp/root /tmp/user/root 18 test -d /tmp/root/test1 19 echo 'd /test2' | systemd-tmpfiles --root=/tmp/root --create - 20 test -d /tmp/root/test2 27 test ! -e /tmp/user/root/test 28 echo 'd /user/root/test' | systemd-tmpfiles --root=/tmp --create - \ 30 test ! -e /tmp/user/root/test 33 echo 'd /test' | systemd-tmpfiles --root=/tmp/user/root --create - 34 test -d /tmp/user/root/test
|
D | testsuite-65.sh | 22 systemd-analyze verify --root=/tmp/img/ testfile.service \ 26 systemd-analyze verify --recursive-errors=yes --root=/tmp/img/ testfile.service \ 30 systemd-analyze verify --recursive-errors=one --root=/tmp/img/ testfile.service \ 36 systemd-analyze verify --recursive-errors=no --root=/tmp/img/ testfile.service 113 systemd-analyze security --threshold=90 --offline=true --root=/tmp/img/ testfile.service 579 --root=/tmp/img/ testfile.service 585 --root=/tmp/img/ testfile.service 592 --root=/tmp/img/ testfile.service \ 597 --root=/tmp/img/ testfile.service \
|
/systemd-251/test/test-network/conf/ |
D | 25-qdisc-clsact-and-htb.network | 13 Parent=root 19 Parent=root 39 Parent=root 51 Parent=root 71 Parent=root 87 Parent=root 106 Parent=root 122 Parent=root 134 Parent=root 146 Parent=root [all …]
|
/systemd-251/src/core/ |
D | unit-printf.c | 15 static int specifier_prefix_and_instance(char specifier, const void *data, const char *root, const … in specifier_prefix_and_instance() argument 21 static int specifier_prefix(char specifier, const void *data, const char *root, const void *userdat… in specifier_prefix() argument 27 static int specifier_prefix_unescaped(char specifier, const void *data, const char *root, const voi… in specifier_prefix_unescaped() argument 39 static int specifier_instance_unescaped(char specifier, const void *data, const char *root, const v… in specifier_instance_unescaped() argument 45 static int specifier_last_component(char specifier, const void *data, const char *root, const void … in specifier_last_component() argument 57 return specifier_string(specifier, dash + 1, root, userdata, ret); in specifier_last_component() 63 static int specifier_last_component_unescaped(char specifier, const void *data, const char *root, c… in specifier_last_component_unescaped() argument 67 r = specifier_last_component(specifier, data, root, userdata, &p); in specifier_last_component_unescaped() 74 static int specifier_filename(char specifier, const void *data, const char *root, const void *userd… in specifier_filename() argument 87 static int specifier_cgroup(char specifier, const void *data, const char *root, const void *userdat… in specifier_cgroup() argument [all …]
|
/systemd-251/src/tmpfiles/ |
D | offline-passwd.c | 11 static int open_passwd_file(const char *root, const char *fname, FILE **ret_file) { in open_passwd_file() argument 15 fd = chase_symlinks_and_open(fname, root, CHASE_PREFIX_ROOT, O_RDONLY|O_CLOEXEC, &p); in open_passwd_file() 31 static int populate_uid_cache(const char *root, Hashmap **ret) { in populate_uid_cache() argument 45 r = open_passwd_file(root, fname, &f); in populate_uid_cache() 72 static int populate_gid_cache(const char *root, Hashmap **ret) { in populate_gid_cache() argument 83 r = open_passwd_file(root, fname, &f); in populate_gid_cache() 111 const char *root, in name_to_uid_offline() argument 124 r = populate_uid_cache(root, cache); in name_to_uid_offline() 138 const char *root, in name_to_gid_offline() argument 151 r = populate_gid_cache(root, cache); in name_to_gid_offline()
|
/systemd-251/src/systemctl/ |
D | systemctl-switch-root.c | 17 const char *root, *init; in verb_switch_root() local 27 root = argv[1]; in verb_switch_root() 43 root_systemd_path = prefix_roota(root, "/" SYSTEMD_BINARY_PATH); in verb_switch_root() 44 root_init_path = prefix_roota(root, init); in verb_switch_root() 67 log_debug("Switching root - root: %s; init: %s", root, strna(init)); in verb_switch_root() 69 r = bus_call_method(bus, bus_systemd_mgr, "SwitchRoot", &error, NULL, "ss", root, init); in verb_switch_root()
|
/systemd-251/src/cgls/ |
D | cgls.c | 203 _cleanup_free_ char *root = NULL; in run() local 249 if (!root) { in run() 251 r = show_cgroup_get_path_and_warn(arg_machine, NULL, &root); in run() 264 j = path_join(root, p); in run() 271 path = root; in run() 303 _cleanup_free_ char *root = NULL; in run() local 305 r = show_cgroup_get_path_and_warn(arg_machine, NULL, &root); in run() 309 show_cg_info(SYSTEMD_CGROUP_CONTROLLER, root); in run() 312 r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, root, NULL, 0, arg_output_flags); in run()
|