Home
last modified time | relevance | path

Searched refs:mask (Results 1 – 25 of 128) sorted by relevance

123456

/systemd-251/src/libsystemd/sd-bus/
Dbus-creds.c120 return c->mask; in sd_bus_creds_get_mask()
141 _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) { in sd_bus_creds_new_from_pid() argument
146 assert_return(mask <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP); in sd_bus_creds_new_from_pid()
156 r = bus_creds_add_more(c, mask | SD_BUS_CREDS_AUGMENT, pid, 0); in sd_bus_creds_new_from_pid()
177 if (!(c->mask & SD_BUS_CREDS_UID)) in sd_bus_creds_get_uid()
188 if (!(c->mask & SD_BUS_CREDS_EUID)) in sd_bus_creds_get_euid()
199 if (!(c->mask & SD_BUS_CREDS_SUID)) in sd_bus_creds_get_suid()
210 if (!(c->mask & SD_BUS_CREDS_FSUID)) in sd_bus_creds_get_fsuid()
221 if (!(c->mask & SD_BUS_CREDS_GID)) in sd_bus_creds_get_gid()
232 if (!(c->mask & SD_BUS_CREDS_EGID)) in sd_bus_creds_get_egid()
[all …]
Dbus-control.c427 uint64_t mask, in sd_bus_get_name_creds() argument
439 assert_return((mask & ~SD_BUS_CREDS_AUGMENT) <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP); in sd_bus_get_name_creds()
440 assert_return(mask == 0 || creds, -EINVAL); in sd_bus_get_name_creds()
450 mask &= ~SD_BUS_CREDS_AUGMENT; in sd_bus_get_name_creds()
456 return sd_bus_get_owner_creds(bus, mask, creds); in sd_bus_get_name_creds()
466 if ((FLAGS_SET(mask, SD_BUS_CREDS_UNIQUE_NAME) && !unique) || mask == 0) { in sd_bus_get_name_creds()
485 if (mask != 0) { in sd_bus_get_name_creds()
493 if ((mask & SD_BUS_CREDS_UNIQUE_NAME) && unique) { in sd_bus_get_name_creds()
498 c->mask |= SD_BUS_CREDS_UNIQUE_NAME; in sd_bus_get_name_creds()
501 need_pid = (mask & SD_BUS_CREDS_PID) || in sd_bus_get_name_creds()
[all …]
Dbus-dump.c356 if (c->mask & SD_BUS_CREDS_PID) in bus_creds_dump()
358 if (c->mask & SD_BUS_CREDS_TID) in bus_creds_dump()
360 if (c->mask & SD_BUS_CREDS_PPID) { in bus_creds_dump()
366 if (c->mask & SD_BUS_CREDS_TTY) in bus_creds_dump()
369 … if (terse && ((c->mask & (SD_BUS_CREDS_PID|SD_BUS_CREDS_TID|SD_BUS_CREDS_PPID|SD_BUS_CREDS_TTY)))) in bus_creds_dump()
372 if (c->mask & SD_BUS_CREDS_UID) in bus_creds_dump()
374 if (c->mask & SD_BUS_CREDS_EUID) in bus_creds_dump()
376 if (c->mask & SD_BUS_CREDS_SUID) in bus_creds_dump()
378 if (c->mask & SD_BUS_CREDS_FSUID) in bus_creds_dump()
383 if (c->mask & SD_BUS_CREDS_GID) in bus_creds_dump()
[all …]
Dtest-bus-match.c11 static bool mask[32]; variable
15 assert_se(PTR_TO_UINT(userdata) < ELEMENTSOF(mask)); in filter()
16 mask[PTR_TO_UINT(userdata)] = true; in filter()
23 for (i = 0; i < ELEMENTSOF(mask); i++) { in mask_contains()
32 if (found != mask[i]) in mask_contains()
112 zero(mask); in main()
121 zero(mask); in main()
Dbus-creds.h12 uint64_t mask; member
70 int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid);
72 int bus_creds_extend_by_pid(sd_bus_creds *c, uint64_t mask, sd_bus_creds **ret);
/systemd-251/src/shared/
Dchown-recursive.c22 mode_t mask) { in chown_one() argument
38 r = fchmod_and_chown(fd, st->st_mode & mask, uid, gid); in chown_one()
50 mode_t mask) { in chown_recursive_internal() argument
89 …r = chown_recursive_internal(subdir_fd, &fst, uid, gid, mask); /* takes possession of subdir_fd ev… in chown_recursive_internal()
95 r = chown_one(path_fd, &fst, uid, gid, mask); in chown_recursive_internal()
103 r = chown_one(dirfd(d), st, uid, gid, mask); in chown_recursive_internal()
114 mode_t mask) { in path_chown_recursive() argument
123 if (!uid_is_valid(uid) && !gid_is_valid(gid) && FLAGS_SET(mask, 07777)) in path_chown_recursive()
133 ((st.st_mode & ~mask & 07777) == 0)) in path_chown_recursive()
136 …return chown_recursive_internal(TAKE_FD(fd), &st, uid, gid, mask); /* we donate the fd to the call… in path_chown_recursive()
[all …]
Dfirewall-util-iptables.c90 struct ipt_entry *entry, *mask; in fw_iptables_add_masquerade() local
131 mask = alloca_safe(sz); in fw_iptables_add_masquerade()
132 memset(mask, 0xFF, sz); in fw_iptables_add_masquerade()
135 if (iptc_check_entry(chain, entry, (unsigned char*) mask, h)) in fw_iptables_add_masquerade()
143 if (!iptc_delete_entry(chain, entry, (unsigned char*) mask, h)) { in fw_iptables_add_masquerade()
168 struct ipt_entry *entry, *mask; in fw_iptables_add_local_dnat() local
273 mask = alloca0(sz); in fw_iptables_add_local_dnat()
274 memset(mask, 0xFF, sz); in fw_iptables_add_local_dnat()
278 if (!iptc_check_entry(chain_pre, entry, (unsigned char*) mask, h)) { in fw_iptables_add_local_dnat()
290 if (!iptc_delete_entry(chain_pre, entry, (unsigned char*) mask, h)) { in fw_iptables_add_local_dnat()
[all …]
Dcgroup-setup.c646 int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path) { in cg_create_everywhere() argument
674 mask = CGROUP_MASK_EXTEND_JOINED(mask); in cg_create_everywhere()
689 if (FLAGS_SET(mask, bit)) in cg_create_everywhere()
736 int cg_migrate_v1_controllers(CGroupMask supported, CGroupMask mask, const char *from, cg_migrate_c… in cg_migrate_v1_controllers() argument
744 mask = CGROUP_MASK_EXTEND_JOINED(mask); in cg_migrate_v1_controllers()
757 if (!FLAGS_SET(mask, bit)) in cg_migrate_v1_controllers()
786 int cg_trim_v1_controllers(CGroupMask supported, CGroupMask mask, const char *path, bool delete_roo… in cg_trim_v1_controllers() argument
792 mask = CGROUP_MASK_EXTEND_JOINED(mask); in cg_trim_v1_controllers()
804 if (FLAGS_SET(mask, bit)) { in cg_trim_v1_controllers()
817 CGroupMask mask, in cg_enable_everywhere() argument
[all …]
Dkillall.c103 static int wait_for_children(Set *pids, sigset_t *mask, usec_t timeout) { in wait_for_children() argument
106 assert(mask); in wait_for_children()
178 k = sigtimedwait(mask, NULL, &ts); in wait_for_children()
253 sigset_t mask, oldmask; in broadcast_signal() local
265 assert_se(sigemptyset(&mask) == 0); in broadcast_signal()
266 assert_se(sigaddset(&mask, SIGCHLD) == 0); in broadcast_signal()
267 assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0); in broadcast_signal()
278 n_children_left = wait_for_children(pids, &mask, timeout); in broadcast_signal()
Dcgroup-setup.h29 int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path);
31 int cg_migrate_v1_controllers(CGroupMask supported, CGroupMask mask, const char *from, cg_migrate_c…
33 int cg_trim_v1_controllers(CGroupMask supported, CGroupMask mask, const char *path, bool delete_roo…
34 int cg_enable_everywhere(CGroupMask supported, CGroupMask mask, const char *p, CGroupMask *ret_resu…
Dtpm2-util.c42 …_SetAttributes)(ESYS_CONTEXT *esysContext, ESYS_TR session, TPMA_SESSION flags, TPMA_SESSION mask);
396 static void tpm2_pcr_mask_to_selecion(uint32_t mask, uint16_t bank, TPML_PCR_SELECTION *ret) { in tpm2_pcr_mask_to_selecion() argument
400 assert(mask <= 0xFFFFFFU); in tpm2_pcr_mask_to_selecion()
406 .pcrSelections[0].pcrSelect[0] = mask & 0xFF, in tpm2_pcr_mask_to_selecion()
407 .pcrSelections[0].pcrSelect[1] = (mask >> 8) & 0xFF, in tpm2_pcr_mask_to_selecion()
408 .pcrSelections[0].pcrSelect[2] = (mask >> 16) & 0xFF, in tpm2_pcr_mask_to_selecion()
412 static unsigned find_nth_bit(uint32_t mask, unsigned n) { in find_nth_bit() argument
419 for (unsigned i = 0; i < sizeof(mask)*8; i++) { in find_nth_bit()
421 if (bit & mask) { in find_nth_bit()
437 uint32_t mask) { in tpm2_pcr_mask_good() argument
[all …]
/systemd-251/src/basic/
Dchattr-util.h42 int chattr_full(const char *path, int fd, unsigned value, unsigned mask, unsigned *ret_previous, un…
44 static inline int chattr_fd(int fd, unsigned value, unsigned mask, unsigned *previous) { in chattr_fd() argument
45 return chattr_full(NULL, fd, value, mask, previous, NULL, 0); in chattr_fd()
47 static inline int chattr_path(const char *path, unsigned value, unsigned mask, unsigned *previous) { in chattr_path() argument
48 return chattr_full(path, -1, value, mask, previous, NULL, 0); in chattr_path()
Dumask-util.h23 #define RUN_WITH_UMASK(mask) \ argument
24 for (_cleanup_umask_ mode_t _saved_umask_ = umask(mask) | S_IFMT; \
28 #define BLOCK_WITH_UMASK(mask) \ argument
29 _unused_ _cleanup_umask_ mode_t _saved_umask_ = umask(mask);
Din-addr-util.c361 uint8_t mask_fixed_part = 0, mask = 0; in in_addr_random_prefix() local
374 mask = 0xffu ^ mask_fixed_part; in in_addr_random_prefix()
377mask = (((UINT8_C(1) << (j + 1)) - 1) << (8 - j)) ^ mask_fixed_part; in in_addr_random_prefix()
382 u->in6.s6_addr[i] |= n.s6_addr[i] & mask; in in_addr_random_prefix()
622 int in4_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask) { in in4_addr_default_subnet_mask() argument
627 assert(mask); in in4_addr_default_subnet_mask()
633 in4_addr_prefixlen_to_netmask(mask, prefixlen); in in4_addr_default_subnet_mask()
638 struct in_addr mask; in in4_addr_mask() local
642 if (!in4_addr_prefixlen_to_netmask(&mask, prefixlen)) in in4_addr_mask()
645 addr->s_addr &= mask.s_addr; in in4_addr_mask()
[all …]
Dinotify-util.c7 int inotify_add_watch_fd(int fd, int what, uint32_t mask) { in inotify_add_watch_fd() argument
11 wd = inotify_add_watch(fd, FORMAT_PROC_FD_PATH(what), mask); in inotify_add_watch_fd()
29 int inotify_add_watch_and_warn(int fd, const char *pathname, uint32_t mask) { in inotify_add_watch_and_warn() argument
32 wd = inotify_add_watch(fd, pathname, mask); in inotify_add_watch_and_warn()
Dchattr-util.c18 unsigned mask, in chattr_full() argument
47 if (mask == 0 && !ret_previous && !ret_final) in chattr_full()
53 new_attr = (old_attr & ~mask) | (value & mask); in chattr_full()
99 if (!FLAGS_SET(mask, mask_one)) in chattr_full()
Dcgroup-util.h75 static inline CGroupMask CGROUP_MASK_EXTEND_JOINED(CGroupMask mask) { in CGROUP_MASK_EXTEND_JOINED() argument
78 if (mask & (CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT)) in CGROUP_MASK_EXTEND_JOINED()
79 mask |= (CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT); in CGROUP_MASK_EXTEND_JOINED()
81 return mask; in CGROUP_MASK_EXTEND_JOINED()
288 typedef const char* (*cg_migrate_callback_t)(CGroupMask mask, void *userdata);
293 int cg_mask_to_string(CGroupMask mask, char **ret);
/systemd-251/man/
Dinotify-watch-tmp.c19 if (event->mask & IN_Q_OVERFLOW) in inotify_handler()
21 else if (event->mask & IN_CREATE) in inotify_handler()
23 else if (event->mask & IN_DELETE) in inotify_handler()
25 else if (event->mask & IN_MOVED_TO) in inotify_handler()
29 if ((event->mask & (IN_CREATE|IN_MOVED_TO)) && in inotify_handler()
/systemd-251/src/core/
Ddevice.c34 static void device_update_found_one(Device *d, DeviceFound found, DeviceFound mask);
689 static void device_update_found_one(Device *d, DeviceFound found, DeviceFound mask) { in device_update_found_one() argument
698 n = (d->found & ~mask) | (found & mask); in device_update_found_one()
709 d->enumerated_found = (d->enumerated_found & ~mask) | (found & mask); in device_update_found_one()
712 … device_update_found_by_sysfs(Manager *m, const char *sysfs, DeviceFound found, DeviceFound mask) { in device_update_found_by_sysfs() argument
718 if (mask == 0) in device_update_found_by_sysfs()
723 device_update_found_one(d, found, mask); in device_update_found_by_sysfs()
726 …id device_update_found_by_name(Manager *m, const char *path, DeviceFound found, DeviceFound mask) { in device_update_found_by_name() argument
734 if (mask == 0) in device_update_found_by_name()
745 device_update_found_one(DEVICE(u), found, mask); in device_update_found_by_name()
[all …]
Dcgroup.c1726 CGroupMask mask = 0; in unit_get_cgroup_mask() local
1736 mask |= get_cpu_accounting_mask(); in unit_get_cgroup_mask()
1741 mask |= CGROUP_MASK_CPU; in unit_get_cgroup_mask()
1744 mask |= CGROUP_MASK_CPUSET; in unit_get_cgroup_mask()
1747 mask |= CGROUP_MASK_IO | CGROUP_MASK_BLKIO; in unit_get_cgroup_mask()
1752 mask |= CGROUP_MASK_MEMORY; in unit_get_cgroup_mask()
1756 mask |= CGROUP_MASK_DEVICES | CGROUP_MASK_BPF_DEVICES; in unit_get_cgroup_mask()
1760 mask |= CGROUP_MASK_PIDS; in unit_get_cgroup_mask()
1762 return CGROUP_MASK_EXTEND_JOINED(mask); in unit_get_cgroup_mask()
1766 CGroupMask mask = 0; in unit_get_bpf_mask() local
[all …]
Dmount.c350 UnitDependencyMask mask; in mount_add_device_dependencies() local
386mask = m->from_proc_self_mountinfo ? UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT : UNIT_DEPENDENCY_FILE; in mount_add_device_dependencies()
388 r = unit_add_node_dependency(UNIT(m), p->what, dep, mask); in mount_add_device_dependencies()
392 r = unit_add_node_dependency(UNIT(m), p->what, UNIT_STOP_PROPAGATED_FROM, mask); in mount_add_device_dependencies()
397 return unit_add_blockdev_dependency(UNIT(m), p->what, mask); in mount_add_device_dependencies()
401 UnitDependencyMask mask; in mount_add_quota_dependencies() local
417 mask = m->from_fragment ? UNIT_DEPENDENCY_FILE : UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT; in mount_add_quota_dependencies()
419 …two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTACHECK_SERVICE, true, mask); in mount_add_quota_dependencies()
423 …dd_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTAON_SERVICE, true, mask); in mount_add_quota_dependencies()
454 UnitDependencyMask mask) { in mount_add_default_ordering_dependencies() argument
[all …]
Dunit-serialize.c16 static int serialize_cgroup_mask(FILE *f, const char *key, CGroupMask mask) { in serialize_cgroup_mask() argument
23 if (mask == 0) in serialize_cgroup_mask()
26 r = cg_mask_to_string(mask, &s); in serialize_cgroup_mask()
583 static void print_unit_dependency_mask(FILE *f, const char *kind, UnitDependencyMask mask, bool *sp… in print_unit_dependency_mask() argument
585 UnitDependencyMask mask; in print_unit_dependency_mask() member
605 if (mask == 0) in print_unit_dependency_mask()
608 if (FLAGS_SET(mask, table[i].mask)) { in print_unit_dependency_mask()
618 mask &= ~table[i].mask; in print_unit_dependency_mask()
622 assert(mask == 0); in print_unit_dependency_mask()
/systemd-251/src/network/
Dnetworkd-can.c112 .mask = link->network->can_control_mode_mask, in can_set_netlink_message()
269 uint32_t mask = ltype; in config_parse_can_control_mode() local
276 assert(mask != 0); in config_parse_can_control_mode()
279 network->can_control_mode_mask &= ~mask; in config_parse_can_control_mode()
280 network->can_control_mode_flags &= ~mask; in config_parse_can_control_mode()
291 network->can_control_mode_mask |= mask; in config_parse_can_control_mode()
292 SET_FLAG(network->can_control_mode_flags, mask, r); in config_parse_can_control_mode()
/systemd-251/src/home/
Duser-record-util.c105 h->mask = USER_RECORD_REGULAR|USER_RECORD_BINDING; in user_record_synthesize()
163 g->mask = USER_RECORD_REGULAR|USER_RECORD_BINDING; in group_record_synthesize()
193 if (!(embedded->mask & host->mask & USER_RECORD_REGULAR)) in user_record_reconcile()
201 if ((embedded->mask & (USER_RECORD_SECRET|USER_RECORD_BINDING)) != 0) in user_record_reconcile()
407 h->mask |= USER_RECORD_BINDING; in user_record_add_binding()
732 h->mask |= USER_RECORD_PER_MACHINE; in user_record_set_disk_size()
773 h->mask |= USER_RECORD_REGULAR; in user_record_update_last_changed()
829 SET_FLAG(h->mask, USER_RECORD_PRIVILEGED, !json_variant_is_blank_object(priv)); in user_record_make_hashed_password()
868 SET_FLAG(h->mask, USER_RECORD_PRIVILEGED, !json_variant_is_blank_object(priv)); in user_record_set_hashed_password()
930 SET_FLAG(h->mask, USER_RECORD_SECRET, !json_variant_is_blank_object(w)); in user_record_set_password()
[all …]
/systemd-251/src/network/netdev/
Dwireguard.c38 WireguardIPmask *mask; in wireguard_peer_free() local
52 while ((mask = peer->ipmasks)) { in wireguard_peer_free()
53 LIST_REMOVE(ipmasks, peer->ipmasks, mask); in wireguard_peer_free()
54 free(mask); in wireguard_peer_free()
110 …ask_one(NetDev *netdev, sd_netlink_message *message, const WireguardIPmask *mask, uint16_t index) { in wireguard_set_ipmask_one() argument
114 assert(mask); in wireguard_set_ipmask_one()
123 r = sd_netlink_message_append_u16(message, WGALLOWEDIP_A_FAMILY, mask->family); in wireguard_set_ipmask_one()
127 … r = netlink_message_append_in_addr_union(message, WGALLOWEDIP_A_IPADDR, mask->family, &mask->ip); in wireguard_set_ipmask_one()
131 r = sd_netlink_message_append_u8(message, WGALLOWEDIP_A_CIDR_MASK, mask->cidr); in wireguard_set_ipmask_one()
195 LIST_FOREACH(ipmasks, mask, start) { in wireguard_set_peer_one()
[all …]

123456