Home
last modified time | relevance | path

Searched refs:label (Results 1 – 25 of 102) sorted by relevance

12345

/systemd-251/src/network/
Dnetworkd-address-label.c15 AddressLabel *address_label_free(AddressLabel *label) { in address_label_free() argument
16 if (!label) in address_label_free()
19 if (label->network) { in address_label_free()
20 assert(label->section); in address_label_free()
21 hashmap_remove(label->network->address_labels_by_section, label->section); in address_label_free()
24 config_section_free(label->section); in address_label_free()
25 return mfree(label); in address_label_free()
32 _cleanup_(address_label_freep) AddressLabel *label = NULL; in address_label_new_static()
44 label = hashmap_get(network->address_labels_by_section, n); in address_label_new_static()
45 if (label) { in address_label_new_static()
[all …]
/systemd-251/src/shared/
Dsmack-util.c47 int mac_smack_read(const char *path, SmackAttr attr, char **label) { in mac_smack_read() argument
50 assert(label); in mac_smack_read()
55 return getxattr_malloc(path, smack_attr_to_string(attr), label); in mac_smack_read()
58 int mac_smack_read_fd(int fd, SmackAttr attr, char **label) { in mac_smack_read_fd() argument
61 assert(label); in mac_smack_read_fd()
66 return fgetxattr_malloc(fd, smack_attr_to_string(attr), label); in mac_smack_read_fd()
69 int mac_smack_apply(const char *path, SmackAttr attr, const char *label) { in mac_smack_apply() argument
78 if (label) in mac_smack_apply()
79 r = lsetxattr(path, smack_attr_to_string(attr), label, strlen(label), 0); in mac_smack_apply()
88 int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label) { in mac_smack_apply_fd() argument
[all …]
Dselinux-util.c323 int mac_selinux_apply(const char *path, const char *label) { in mac_selinux_apply() argument
331 assert(label); in mac_selinux_apply()
333 if (setfilecon(path, label) < 0) in mac_selinux_apply()
334 …og_enforcing_errno(errno, "Failed to set SELinux security context %s on path %s: %m", label, path); in mac_selinux_apply()
339 int mac_selinux_apply_fd(int fd, const char *path, const char *label) { in mac_selinux_apply_fd() argument
347 assert(label); in mac_selinux_apply_fd()
349 if (setfilecon(FORMAT_PROC_FD_PATH(fd), label) < 0) in mac_selinux_apply_fd()
350 …rcing_errno(errno, "Failed to set SELinux security context %s on path %s: %m", label, strna(path)); in mac_selinux_apply_fd()
355 int mac_selinux_get_create_label_from_exe(const char *exe, char **label) { in mac_selinux_get_create_label_from_exe() argument
362 assert(label); in mac_selinux_get_create_label_from_exe()
[all …]
Dmkfs-util.c92 const char *label, in make_filesystem() argument
102 assert(label); in make_filesystem()
128 r = mangle_linux_fs_label(label, max_len, &mangled_label); in make_filesystem()
130 … return log_error_errno(r, "Failed to determine volume label from string \"%s\": %m", label); in make_filesystem()
131 label = mangled_label; in make_filesystem()
134 r = mangle_fat_label(label, &mangled_label); in make_filesystem()
136 … return log_error_errno(r, "Failed to determine FAT label from string \"%s\": %m", label); in make_filesystem()
137 label = mangled_label; in make_filesystem()
159 "-L", label, in make_filesystem()
169 "-L", label, in make_filesystem()
[all …]
Ddns-domain.c417 char label[DNS_LABEL_MAX]; in dns_name_concat() local
419 r = dns_label_unescape(&p, label, sizeof label, flags); in dns_name_concat()
439 r = dns_label_escape(label, r, ret + n + !first, DNS_LABEL_ESCAPED_MAX); in dns_name_concat()
448 r = dns_label_escape(label, r, escaped, sizeof(escaped)); in dns_name_concat()
490 char label[DNS_LABEL_MAX+1]; in dns_name_hash_func() local
492 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_hash_func()
498 ascii_strlower_n(label, r); in dns_name_hash_func()
499 siphash24_compress(label, r, state); in dns_name_hash_func()
755 char label[DNS_LABEL_MAX+1]; in dns_name_address() local
757 r = dns_label_unescape(&p, label, sizeof label, 0); in dns_name_address()
[all …]
Dselinux-util.h37 int mac_selinux_apply(const char *path, const char *label);
38 int mac_selinux_apply_fd(int fd, const char *path, const char *label);
40 int mac_selinux_get_create_label_from_exe(const char *exe, char **label);
41 int mac_selinux_get_our_label(char **label);
42 …_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **label);
43 char* mac_selinux_free(char *label);
49 int mac_selinux_create_file_prepare_label(const char *path, const char *label);
52 int mac_selinux_create_socket_prepare(const char *label);
Dsmack-util.h41 int mac_smack_read(const char *path, SmackAttr attr, char **label);
42 int mac_smack_read_fd(int fd, SmackAttr attr, char **label);
43 int mac_smack_apply(const char *path, SmackAttr attr, const char *label);
44 int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label);
45 int mac_smack_apply_pid(pid_t pid, const char *label);
Dsocket-label.c33 const char *label) { in socket_address_listen() argument
48 if (label) { in socket_address_listen()
49 r = mac_selinux_create_socket_prepare(label); in socket_address_listen()
56 if (label) in socket_address_listen()
Dmeson.build115 'env-file-label.c',
116 'env-file-label.h',
128 'fileio-label.c',
129 'fileio-label.h',
187 'label.c',
188 'label.h',
218 'mkdir-label.c',
219 'mkdir-label.h',
288 'socket-label.c',
299 'tmpfile-util-label.c',
[all …]
/systemd-251/src/resolve/
Dresolved-util.c17 char label[DNS_LABEL_MAX]; in resolve_system_hostname() local
31 r = dns_label_unescape(&p, label, sizeof label, 0); in resolve_system_hostname()
42 decoded = label; /* no decoding */ in resolve_system_hostname()
47 r = sym_idn2_to_unicode_8z8z(label, &utf8, 0); in resolve_system_hostname()
56 k = dns_label_undo_idna(label, r, label, sizeof label); in resolve_system_hostname()
62 if (!utf8_is_valid(label)) in resolve_system_hostname()
65 decoded = label; in resolve_system_hostname()
67 decoded = label; /* no decoding */ in resolve_system_hostname()
/systemd-251/src/journal/
Djournald-context.c170 c->label = mfree(c->label); in client_context_reset()
237 const char *label, size_t label_size) { in client_context_read_label() argument
241 assert(label_size == 0 || label); in client_context_read_label()
248 l = newdup_suffix0(char, label, label_size); in client_context_read_label()
252 free_and_replace(c->label, l); in client_context_read_label()
262 free_and_replace(c->label, con); in client_context_read_label()
263 c->label_size = strlen(c->label); in client_context_read_label()
507 const char *label, size_t label_size, in client_context_really_refresh() argument
520 (void) client_context_read_label(c, label, label_size); in client_context_really_refresh()
544 const char *label, size_t label_size, in client_context_maybe_refresh() argument
[all …]
Djournald-context.h46 char *label; member
64 const char *label, size_t label_len,
72 const char *label, size_t label_len,
82 const char *label, size_t label_size,
Djournald-native.c101 const char *label, size_t label_len) { in server_process_entry() argument
300 const char *label, size_t label_len) { in server_process_native_message() argument
310 r = client_context_get(s, ucred->pid, ucred, label, label_len, NULL, &context); in server_process_native_message()
318 context, ucred, tv, label, label_len); in server_process_native_message()
327 const char *label, size_t label_len) { in server_process_native_file() argument
400 server_process_native_message(s, p, st.st_size, ucred, tv, label, label_len); in server_process_native_file()
449 server_process_native_message(s, p, n, ucred, tv, label, label_len); in server_process_native_file()
Dfuzz-journald.c31 … raw_len, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len) in fuzz_journald_processing_function() argument
34 char *label = NULL; in fuzz_journald_processing_function() local
43 (*f)(&s, s.buffer, size, ucred, tv, label, label_len); in fuzz_journald_processing_function()
Dfuzz-journald-native-fd.c16 char *label = NULL; in LLVMFuzzerTestOneInput() local
36 server_process_native_file(&s, sealed_fd, &ucred, tv, label, label_len); in LLVMFuzzerTestOneInput()
42 server_process_native_file(&s, unsealed_fd, &ucred, tv, label, label_len); in LLVMFuzzerTestOneInput()
Djournald-native.h12 const char *label,
20 const char *label,
/systemd-251/src/core/
Dselinux-setup.c66 _cleanup_(mac_selinux_freep) char *label = NULL; in mac_selinux_setup()
71 r = mac_selinux_get_create_label_from_exe(SYSTEMD_BINARY_PATH, &label); in mac_selinux_setup()
72 if (r < 0 || !label) { in mac_selinux_setup()
76 r = setcon_raw(label); in mac_selinux_setup()
80 … log_error("Failed to transition into init label '%s', ignoring.", label); in mac_selinux_setup()
/systemd-251/test/units/
Dtestsuite-64.sh266 local dev_stub i label mpoint uuid
275 label="btrfs_root"
276 udevadm lock --device="${devices[0]}" mkfs.btrfs -L "$label" -U "$uuid" "${devices[0]}"
277 …dm wait --settle --timeout=30 "${devices[0]}" "/dev/disk/by-uuid/$uuid" "/dev/disk/by-label/$label"
283 label="btrfs_mpart"
285 label: gpt
293 …udevadm lock --device="${devices[0]}" mkfs.btrfs -d single -m raid1 -L "$label" -U "$uuid" /dev/di…
294 udevadm wait --settle --timeout=30 "/dev/disk/by-uuid/$uuid" "/dev/disk/by-label/$label"
302 label="btrfs_mdisk"
308 mkfs.btrfs -M -d raid10 -m raid10 -L "$label" -U "$uuid" "${devices[@]}"
[all …]
/systemd-251/src/sysupdate/
Dsysupdate-partition.c18 p->label = mfree(p->label); in partition_info_destroy()
110 const char *pts, *ids, *label; in read_partition_info() local
146 label = fdisk_partition_get_name(p); in read_partition_info()
147 if (!label) in read_partition_info()
178 label_copy = strdup(label); in read_partition_info()
189 .label = TAKE_PTR(label_copy), in read_partition_info()
243 if (!streq_ptr(pinfo.label, "_empty")) /* used */ in find_suitable_partition()
306 r = fdisk_partition_set_name(pa, info->label); in patch_partition()
/systemd-251/src/partition/
Dtest-repart.sh30 label: gpt
31 label-id: EF7F7EE2-47B3-4251-B1A1-09EA8BF12D5D
66 label: gpt
67 label-id: EF7F7EE2-47B3-4251-B1A1-09EA8BF12D5D
101 label: gpt
102 label-id: EF7F7EE2-47B3-4251-B1A1-09EA8BF12D5D
121 label: gpt
122 label-id: EF7F7EE2-47B3-4251-B1A1-09EA8BF12D5D
151 label: gpt
152 label-id: EF7F7EE2-47B3-4251-B1A1-09EA8BF12D5D
[all …]
/systemd-251/test/
Dtest-systemd-tmpfiles.py184label = '{}-{}'.format('None' if type_cb is None else type_cb.__name__, subpath.split('/')[1])
185 … test_content('f= {} - - - - ' + label, label, user=user, subpath=subpath, path_cb=type_cb)
188 label = 'valid_symlink-deep'
189 …test_content('f= {} - - - - ' + label, label, user=user, subpath='/deep/1/2', path_cb=valid_symlin…
/systemd-251/src/test/
Dtest-selinux.c58 _cleanup_(mac_selinux_freep) char *label = NULL, *label2 = NULL, *label3 = NULL; in test_misc()
64 r = mac_selinux_get_our_label(&label); in test_misc()
66 r, strnull(label)); in test_misc()
/systemd-251/src/udev/
Dudev-node.c625 const char *name, *label; in udev_node_apply_permissions_impl() local
651 ORDERED_HASHMAP_FOREACH_KEY(label, name, seclabel_list) { in udev_node_apply_permissions_impl()
657 q = mac_selinux_apply_fd(node_fd, devnode, label); in udev_node_apply_permissions_impl()
660 … "SECLABEL: failed to set SELinux label '%s': %m", label); in udev_node_apply_permissions_impl()
662 … log_device_debug(dev, "SECLABEL: set SELinux label '%s'", label); in udev_node_apply_permissions_impl()
667 q = mac_smack_apply_fd(node_fd, SMACK_ATTR_ACCESS, label); in udev_node_apply_permissions_impl()
670 … "SECLABEL: failed to set SMACK label '%s': %m", label); in udev_node_apply_permissions_impl()
672 … log_device_debug(dev, "SECLABEL: set SMACK label '%s'", label); in udev_node_apply_permissions_impl()
675 … log_device_error(dev, "SECLABEL: unknown subsystem, ignoring '%s'='%s'", name, label); in udev_node_apply_permissions_impl()
/systemd-251/src/libsystemd/sd-bus/
Dbus-control.c593 free(c->label); in sd_bus_get_name_creds()
594 c->label = strndup(p, sz); in sd_bus_get_name_creds()
595 if (!c->label) in sd_bus_get_name_creds()
705 c->label = memdup_suffix0(p, sz); in sd_bus_get_name_creds()
706 if (!c->label) in sd_bus_get_name_creds()
743 do_label = bus->label && (mask & SD_BUS_CREDS_SELINUX_CONTEXT); in sd_bus_get_owner_creds()
772 c->label = strdup(bus->label); in sd_bus_get_owner_creds()
773 if (!c->label) in sd_bus_get_owner_creds()
/systemd-251/src/mount/
Dmount-tool.c1086 const char *label; in get_label() local
1090 if (sd_device_get_property_value(d, "ID_FS_LABEL", &label) >= 0) in get_label()
1091 return label; in get_label()
1093 if (sd_device_get_property_value(d, "ID_PART_ENTRY_NAME", &label) >= 0) in get_label()
1094 return label; in get_label()
1166 const char *model, *label; in acquire_description() local
1173 label = get_label(d); in acquire_description()
1174 if (!label) in acquire_description()
1175 (void) sd_device_get_property_value(d, "ID_PART_ENTRY_NUMBER", &label); in acquire_description()
1177 if (model && label) in acquire_description()
[all …]

12345