/systemd-251/src/basic/ |
D | mkdir.c | 21 mode_t mode, in mkdir_safe_internal() argument 30 assert(mode != MODE_INVALID); in mkdir_safe_internal() 33 if (_mkdirat(AT_FDCWD, path, mode) >= 0) { in mkdir_safe_internal() 34 r = chmod_and_chown(path, mode, uid, gid); in mkdir_safe_internal() 49 return mkdir_safe_internal(p, mode, uid, gid, in mkdir_safe_internal() 61 if ((st.st_mode & ~mode & 0777) != 0) in mkdir_safe_internal() 64 path, st.st_mode & 0777, mode); in mkdir_safe_internal() 82 int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode) { in mkdirat_errno_wrapper() argument 83 return RET_NERRNO(mkdirat(dirfd, pathname, mode)); in mkdirat_errno_wrapper() 86 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags) { in mkdir_safe() argument [all …]
|
D | fs-util.h | 35 int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid); 36 int fchmod_and_chown_with_fallback(int fd, const char *path, mode_t mode, uid_t uid, gid_t gid); 37 static inline int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) { in fchmod_and_chown() argument 38 return fchmod_and_chown_with_fallback(fd, NULL, mode, uid, gid); /* no fallback */ in fchmod_and_chown() 41 int fchmod_umask(int fd, mode_t mode); 49 #define laccess(path, mode) \ argument 50 RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) 52 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); 58 int mknod_atomic(const char *path, mode_t mode, dev_t dev); 59 int mkfifo_atomic(const char *path, mode_t mode); [all …]
|
D | devnum-util.c | 42 int device_path_make_major_minor(mode_t mode, dev_t devnum, char **ret) { in device_path_make_major_minor() argument 47 if (S_ISCHR(mode)) in device_path_make_major_minor() 49 else if (S_ISBLK(mode)) in device_path_make_major_minor() 60 int device_path_make_canonical(mode_t mode, dev_t devnum, char **ret) { in device_path_make_canonical() argument 74 if (S_ISCHR(mode)) in device_path_make_canonical() 76 else if (S_ISBLK(mode)) in device_path_make_canonical() 88 r = device_path_make_major_minor(mode, devnum, &p); in device_path_make_canonical() 96 mode_t mode; in device_path_parse_major_minor() local 105 mode = S_IFCHR; in device_path_parse_major_minor() 108 mode = S_IFBLK; in device_path_parse_major_minor() [all …]
|
D | mkdir.h | 12 int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode); 14 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags); 15 int mkdir_parents(const char *path, mode_t mode); 16 int mkdir_parents_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkd… 17 int mkdir_p(const char *path, mode_t mode); 18 int mkdir_p_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlag… 22 typedef int (*mkdirat_func_t)(int dir_fd, const char *pathname, mode_t mode); 23 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdi… 24 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid,… 25 int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkdir…
|
D | fs-util.c | 198 int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) { in chmod_and_chown() argument 208 return fchmod_and_chown(fd, mode, uid, gid); in chmod_and_chown() 211 int fchmod_and_chown_with_fallback(int fd, const char *path, mode_t mode, uid_t uid, gid_t gid) { in fchmod_and_chown_with_fallback() argument 237 ((mode != MODE_INVALID && ((st.st_mode ^ mode) & 07777) != 0) || in fchmod_and_chown_with_fallback() 241 if (mode == MODE_INVALID) in fchmod_and_chown_with_fallback() 242 …mode = st.st_mode; /* If we only shall do a chown(), save original mode, since chown() might break… in fchmod_and_chown_with_fallback() 243 else if ((mode & S_IFMT) != 0 && ((mode ^ st.st_mode) & S_IFMT) != 0) in fchmod_and_chown_with_fallback() 247 mode_t minimal = st.st_mode & mode; /* the subset of the old and the new mask */ in fchmod_and_chown_with_fallback() 267 r = fchmod_opath(fd, mode & 07777); in fchmod_and_chown_with_fallback() 273 if (chmod(path, mode & 07777) < 0) in fchmod_and_chown_with_fallback() [all …]
|
D | fileio.c | 120 FILE* fmemopen_unlocked(void *buf, size_t size, const char *mode) { in fmemopen_unlocked() argument 121 FILE *f = fmemopen(buf, size, mode); in fmemopen_unlocked() 960 int fopen_mode_to_flags(const char *mode) { in fopen_mode_to_flags() argument 964 assert(mode); in fopen_mode_to_flags() 966 if ((p = startswith(mode, "r+"))) in fopen_mode_to_flags() 968 else if ((p = startswith(mode, "r"))) in fopen_mode_to_flags() 970 else if ((p = startswith(mode, "w+"))) in fopen_mode_to_flags() 972 else if ((p = startswith(mode, "w"))) in fopen_mode_to_flags() 974 else if ((p = startswith(mode, "a+"))) in fopen_mode_to_flags() 976 else if ((p = startswith(mode, "a"))) in fopen_mode_to_flags() [all …]
|
/systemd-251/shell-completion/bash/ |
D | busctl | 33 local mode=$1 35 busctl $mode list --no-legend --no-pager --full 2>/dev/null | 40 local mode=$1 43 busctl $mode tree --list --no-legend --no-pager $busname 2>/dev/null | 48 local mode=$1 52 busctl $mode introspect --list --no-legend --no-pager $busname $path 2>/dev/null | 57 local mode=$1 64 busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | 70 local mode=$1 76 busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | [all …]
|
D | systemctl.in | 9 local mode=$1; shift 1 10 systemctl $mode --full --legend=no --no-pager --plain "$@" 2>/dev/null 26 local mode=$1 properties=$2; shift 2 34 <(__systemctl $mode show --property "Names,$properties" -- "${units[@]}") 124 local i verb comps mode cur_orig 131 [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root 132 … --preset-mode -n --lines -o --output -M --machine --message --timestamp --check-inhibitors' 136 mode=--user 138 mode=--user 140 mode=--system [all …]
|
/systemd-251/src/network/ |
D | networkd-ipv6ll.c | 93 int ipv6ll_addrgen_mode_fill_message(sd_netlink_message *message, IPv6LinkLocalAddressGenMode mode)… in ipv6ll_addrgen_mode_fill_message() argument 97 assert(mode >= 0 && mode < _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_MAX); in ipv6ll_addrgen_mode_fill_message() 107 r = sd_netlink_message_append_u8(message, IFLA_INET6_ADDR_GEN_MODE, mode); in ipv6ll_addrgen_mode_fill_message() 123 uint8_t mode; in link_update_ipv6ll_addrgen_mode() local 148 mode = (uint8_t) link->ipv6ll_address_gen_mode; in link_update_ipv6ll_addrgen_mode() 149 r = sd_netlink_message_read_u8(message, IFLA_INET6_ADDR_GEN_MODE, &mode); in link_update_ipv6ll_addrgen_mode() 161 if (mode == (uint8_t) link->ipv6ll_address_gen_mode) in link_update_ipv6ll_addrgen_mode() 164 if (mode >= _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_MAX) { in link_update_ipv6ll_addrgen_mode() 165 …link_debug(link, "Received invalid IPv6 link-local address generation mode (%u), ignoring.", mode); in link_update_ipv6ll_addrgen_mode() 171 ipv6_link_local_address_gen_mode_to_string(mode)); in link_update_ipv6ll_addrgen_mode() [all …]
|
D | networkd-link-bus.c | 299 ResolveSupport mode; in bus_link_method_set_llmnr() local 315 mode = RESOLVE_SUPPORT_YES; in bus_link_method_set_llmnr() 317 mode = resolve_support_from_string(llmnr); in bus_link_method_set_llmnr() 318 if (mode < 0) in bus_link_method_set_llmnr() 331 if (l->llmnr != mode) { in bus_link_method_set_llmnr() 332 l->llmnr = mode; in bus_link_method_set_llmnr() 345 ResolveSupport mode; in bus_link_method_set_mdns() local 361 mode = RESOLVE_SUPPORT_NO; in bus_link_method_set_mdns() 363 mode = resolve_support_from_string(mdns); in bus_link_method_set_mdns() 364 if (mode < 0) in bus_link_method_set_mdns() [all …]
|
/systemd-251/src/resolve/ |
D | resolved-link-bus.c | 509 ResolveSupport mode; in bus_link_method_set_llmnr() local 525 mode = RESOLVE_SUPPORT_YES; in bus_link_method_set_llmnr() 527 mode = resolve_support_from_string(llmnr); in bus_link_method_set_llmnr() 528 if (mode < 0) in bus_link_method_set_llmnr() 543 if (l->llmnr_support != mode) { in bus_link_method_set_llmnr() 544 l->llmnr_support = mode; in bus_link_method_set_llmnr() 550 … log_link_info(l, "Bus client set LLMNR setting: %s", resolve_support_to_string(mode)); in bus_link_method_set_llmnr() 558 ResolveSupport mode; in bus_link_method_set_mdns() local 574 mode = RESOLVE_SUPPORT_NO; in bus_link_method_set_mdns() 576 mode = resolve_support_from_string(mdns); in bus_link_method_set_mdns() [all …]
|
/systemd-251/src/shared/ |
D | mkdir-label.c | 10 int mkdirat_label(int dirfd, const char *path, mode_t mode) { in mkdirat_label() argument 19 r = mkdirat_errno_wrapper(dirfd, path, mode); in mkdirat_label() 27 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags) { in mkdir_safe_label() argument 28 return mkdir_safe_internal(path, mode, uid, gid, flags, mkdirat_label); in mkdir_safe_label() 31 int mkdir_parents_label(const char *path, mode_t mode) { in mkdir_parents_label() argument 32 return mkdir_parents_internal(NULL, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_label); in mkdir_parents_label() 35 int mkdir_p_label(const char *path, mode_t mode) { in mkdir_p_label() argument 36 return mkdir_p_internal(NULL, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_label); in mkdir_p_label()
|
D | id128-print.c | 51 int id128_pretty_print(sd_id128_t id, Id128PrettyPrintMode mode) { in id128_pretty_print() argument 52 assert(mode >= 0); in id128_pretty_print() 53 assert(mode < _ID128_PRETTY_PRINT_MODE_MAX); in id128_pretty_print() 55 if (mode == ID128_PRINT_ID128) { in id128_pretty_print() 59 } else if (mode == ID128_PRINT_UUID) { in id128_pretty_print() 67 int id128_print_new(Id128PrettyPrintMode mode) { in id128_print_new() argument 75 return id128_pretty_print(id, mode); in id128_print_new()
|
D | mkdir-label.h | 9 int mkdirat_label(int dirfd, const char *path, mode_t mode); 11 static inline int mkdir_label(const char *path, mode_t mode) { in mkdir_label() argument 12 return mkdirat_label(AT_FDCWD, path, mode); in mkdir_label() 15 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags); 17 int mkdir_p_label(const char *path, mode_t mode);
|
D | volatile-util.c | 14 _cleanup_free_ char *mode = NULL; in query_volatile_mode() local 17 r = proc_cmdline_get_key("systemd.volatile", PROC_CMDLINE_VALUE_OPTIONAL, &mode); in query_volatile_mode() 25 if (mode) { in query_volatile_mode() 28 m = volatile_mode_from_string(mode); in query_volatile_mode()
|
/systemd-251/src/systemctl/ |
D | systemctl-start-unit.c | 59 const char *mode, in start_unit_one() argument 71 assert(mode); in start_unit_one() 76 method, name, mode); in start_unit_one() 92 name, job_type, mode); in start_unit_one() 133 r = bus_call_method(bus, bus_systemd_mgr, method, error, &reply, "ss", name, mode); in start_unit_one() 264 const char *method, *job_type, *mode, *one_name, *suffix = NULL; in verb_start() local 292 mode = action_table[action].mode; in verb_start() 299 mode = "isolate"; in verb_start() 305 mode = arg_job_mode(); in verb_start() 307 method = job_type = mode = NULL; in verb_start() [all …]
|
/systemd-251/test/test-umount/ |
D | rhbug-1554943.mountinfo | 3 20 63 0:6 / /dev rw,nosuid shared:19 - devtmpfs devtmpfs rw,size=3549752k,nr_inodes=887438,mode=755 6 23 20 0:20 / /dev/pts rw,nosuid,noexec,relatime shared:21 - devpts devpts rw,gid=5,mode=620,ptmxmod… 7 24 63 0:21 / /run rw,nosuid,nodev shared:22 - tmpfs tmpfs rw,mode=755 8 25 18 0:22 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:4 - tmpfs tmpfs ro,mode=755 29 75 63 0:40 / /usr/share/mysql-test/var rw,noatime shared:29 - tmpfs tmpfs rw,size=4194304k,mode=750… 32 …a/autotest rw,nosuid,noexec,noatime shared:31 - tmpfs tmpfs rw,size=4194304k,mode=700,uid=27,gid=27 34 …s/cms/temp rw,nosuid,noexec,noatime shared:32 - tmpfs tmpfs rw,size=4194304k,mode=770,uid=48,gid=48 37 …s/cms/logs rw,nosuid,noexec,noatime shared:33 - tmpfs tmpfs rw,size=4194304k,mode=770,uid=48,gid=48 40 …d/PHP-PGO/logs rw,nosuid,noatime shared:35 - tmpfs tmpfs rw,size=4194304k,mode=770,uid=5000,gid=50… 41 …d/PHP-PGO/logs rw,nosuid,noatime shared:35 - tmpfs tmpfs rw,size=4194304k,mode=770,uid=5000,gid=50… [all …]
|
/systemd-251/src/boot/efi/ |
D | console.c | 162 static EFI_STATUS change_mode(INT64 mode) { in change_mode() argument 167 mode = CLAMP(mode, CONSOLE_MODE_RANGE_MIN, CONSOLE_MODE_RANGE_MAX); in change_mode() 170 err = ST->ConOut->SetMode(ST->ConOut, mode); in change_mode() 247 EFI_STATUS console_set_mode(INT64 mode) { in console_set_mode() argument 248 switch (mode) { in console_set_mode() 259 mode = MAX(CONSOLE_MODE_RANGE_MIN, ST->ConOut->Mode->Mode); in console_set_mode() 261 mode = (mode + 1) % ST->ConOut->Mode->MaxMode; in console_set_mode() 262 if (!EFI_ERROR(change_mode(mode))) in console_set_mode() 266 } while (mode > CONSOLE_MODE_RANGE_MIN); in console_set_mode() 278 return change_mode(mode); in console_set_mode()
|
/systemd-251/test/test-execute/ |
D | exec-runtimedirectory-mode.service | 6 ExecStart=/bin/sh -x -c 'mode=$$(stat -c %%a %t/test-exec_runtimedirectory-mode); test "$$mode" = "… 7 ExecStart=/bin/sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectory-mode"' 9 RuntimeDirectory=test-exec_runtimedirectory-mode
|
/systemd-251/src/core/ |
D | namespace.c | 76 MountMode mode:5; member 280 return p->read_only || IN_SET(p->mode, READONLY, INACCESSIBLE, PRIVATE_TMP_READONLY); in mount_entry_read_only() 286 return p->noexec || IN_SET(p->mode, NOEXEC, INACCESSIBLE, SYSFS, PROCFS); in mount_entry_noexec() 292 return p->exec || p->mode == EXEC; in mount_entry_exec() 317 static int append_access_mounts(MountEntry **p, char **strv, MountMode mode, bool forcibly_require_… in append_access_mounts() argument 342 .mode = mode, in append_access_mounts() 361 .mode = EMPTY_DIR, in append_empty_dir_mounts() 380 .mode = b->recursive ? BIND_MOUNT_RECURSIVE : BIND_MOUNT, in append_bind_mounts() 399 .mode = MOUNT_IMAGES, in append_mount_images() 478 .mode = EXTENSION_IMAGES, in append_extensions() [all …]
|
/systemd-251/test/units/ |
D | testsuite-64.sh | 406 tgtadm --lld iscsi --op new --mode target --tid=1 --targetname "$target_name" 410 tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun "$lun_id" -b "${devices[$i]}" 411 tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun "$lun_id" 416 tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL 418 iscsiadm --mode discoverydb --type sendtargets --portal "$target_ip" --discover 419 iscsiadm --mode node --targetname "$target_name" --portal "$target_ip:$target_port" --login 423 iscsiadm --mode node --targetname "$target_name" --portal "$target_ip:$target_port" --logout 424 tgtadm --lld iscsi --op delete --mode target --tid=1 442 tgtadm --lld iscsi --op new --mode target --tid=2 --targetname "$target_name" 445 tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun "$i" -b "$mpoint/lun$i.img" [all …]
|
/systemd-251/src/udev/ |
D | udev-node.c | 600 mode_t mode, in udev_node_apply_permissions_impl() argument 616 if (mode == MODE_INVALID && gid_is_valid(gid) && gid > 0) in udev_node_apply_permissions_impl() 617 mode = 0660; in udev_node_apply_permissions_impl() 619 apply_mode = mode != MODE_INVALID && (stats.st_mode & 0777) != (mode & 0777); in udev_node_apply_permissions_impl() 632 mode != MODE_INVALID ? mode & 0777 : stats.st_mode & 0777); in udev_node_apply_permissions_impl() 634 r = fchmod_and_chown(node_fd, mode, uid, gid); in udev_node_apply_permissions_impl() 642 … mode != MODE_INVALID ? mode & 0777 : stats.st_mode & 0777); in udev_node_apply_permissions_impl() 648 mode != MODE_INVALID ? mode & 0777 : stats.st_mode & 0777); in udev_node_apply_permissions_impl() 696 mode_t mode, in udev_node_apply_permissions() argument 721 …return udev_node_apply_permissions_impl(dev, node_fd, devnode, apply_mac, mode, uid, gid, seclabel… in udev_node_apply_permissions() [all …]
|
/systemd-251/src/login/ |
D | logind-inhibit.c | 46 .mode = _INHIBIT_MODE_INVALID, in inhibitor_new() 110 inhibit_mode_to_string(i->mode), in inhibitor_save() 166 property = i->mode == INHIBIT_BLOCK ? "BlockInhibited" : "DelayInhibited"; in bus_manager_send_inhibited_change() 182 inhibit_mode_to_string(i->mode)); in inhibitor_start() 200 inhibit_mode_to_string(i->mode)); in inhibitor_stop() 213 …_cleanup_free_ char *what = NULL, *uid = NULL, *pid = NULL, *who = NULL, *why = NULL, *mode = NULL; in inhibitor_load() local 226 "MODE", &mode, in inhibitor_load() 235 mm = mode ? inhibit_mode_from_string(mode) : INHIBIT_BLOCK; in inhibitor_load() 237 i->mode = mm; in inhibitor_load() 371 if (i->mode == mm && i->started) in manager_inhibit_what() [all …]
|
D | test-inhibit.c | 16 const char *who = "Test Tool", *reason = "Just because!", *mode = "block"; in inhibit() local 27 "ssss", what, who, reason, mode); in inhibit() 40 const char *what, *who, *why, *mode; in print_inhibitors() local 58 … while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) { in print_inhibitors() 60 what, who, why, mode, uid, pid); in print_inhibitors()
|
/systemd-251/src/journal-remote/ |
D | fuzz-journal-remote.c | 80 for (OutputMode mode = 0; mode < _OUTPUT_MODE_MAX; mode++) { in LLVMFuzzerTestOneInput() local 82 log_info("/* %s */", output_mode_to_string(mode)); in LLVMFuzzerTestOneInput() 83 r = show_journal(dev_null ?: stdout, j, mode, 0, 0, -1, 0, NULL); in LLVMFuzzerTestOneInput()
|