Searched defs:mask (Results 1 - 25 of 29) sorted by relevance

12

/systemd/src/basic/
H A Dumask-util.h35 mode_t mask; member in struct:_umask_struct_
40 umask(s->mask);
43 #define RUN_WITH_UMASK(mask) \
44 for (_cleanup_(_reset_umask_) struct _umask_struct_ _saved_umask_ = { umask(mask), false }; \
H A Dchattr-util.c30 int chattr_fd(int fd, unsigned value, unsigned mask) { argument
48 if (mask == 0)
54 new_attr = (old_attr & ~mask) | (value & mask);
64 int chattr_path(const char *p, unsigned value, unsigned mask) { argument
69 if (mask == 0)
76 return chattr_fd(fd, value, mask);
H A Din-addr-util.c307 int in_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask) { argument
312 assert(mask);
318 in_addr_prefixlen_to_netmask(mask, prefixlen);
326 struct in_addr mask; local
328 if (!in_addr_prefixlen_to_netmask(&mask, prefixlen))
331 addr->in.s_addr &= mask.s_addr;
339 uint8_t mask; local
342 mask = 0xFF;
345 mask = 0xFF << (8 - prefixlen);
349 addr->in6.s6_addr[i] &= mask;
[all...]
/systemd/src/libsystemd/sd-bus/
H A Dtest-bus-match.c27 static bool mask[32]; variable
31 assert_se(PTR_TO_UINT(userdata) < ELEMENTSOF(mask));
32 mask[PTR_TO_UINT(userdata)] = true;
39 for (i = 0; i < ELEMENTSOF(mask); i++) {
48 if (found != mask[i])
126 zero(mask);
135 zero(mask);
H A Dbus-convenience.c511 _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) { argument
525 if (c && (mask & ~c->mask) == 0) {
531 if (!c || !(c->mask & SD_BUS_CREDS_PID)) {
542 return sd_bus_get_name_creds(call->bus, call->sender, mask, creds);
549 return sd_bus_get_owner_creds(call->bus, mask, creds);
552 return bus_creds_extend_by_pid(c, mask, creds);
H A Dbus-creds.h30 uint64_t mask; member in struct:sd_bus_creds
88 int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid);
90 int bus_creds_extend_by_pid(sd_bus_creds *c, uint64_t mask, sd_bus_creds **ret);
H A Dbus-control.c400 uint64_t mask,
417 if (mask & SD_BUS_CREDS_PID && item->pids.pid > 0) {
419 c->mask |= SD_BUS_CREDS_PID;
422 if (mask & SD_BUS_CREDS_TID && item->pids.tid > 0) {
424 c->mask |= SD_BUS_CREDS_TID;
427 if (mask & SD_BUS_CREDS_PPID) {
430 c->mask |= SD_BUS_CREDS_PPID;
443 c->mask |= SD_BUS_CREDS_PPID;
451 if (mask & SD_BUS_CREDS_UID && (uid_t) item->creds.uid != UID_INVALID) {
453 c->mask |
397 bus_populate_creds_from_items( sd_bus *bus, struct kdbus_info *info, uint64_t mask, sd_bus_creds *c) argument
641 bus_get_name_creds_kdbus( sd_bus *bus, const char *name, uint64_t mask, bool allow_activator, sd_bus_creds **creds) argument
748 bus_get_name_creds_dbus1( sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds) argument
902 sd_bus_get_name_creds( sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds) argument
930 bus_get_owner_creds_kdbus(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) argument
979 bus_get_owner_creds_dbus1(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) argument
1031 sd_bus_get_owner_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) argument
[all...]
H A Dbus-creds.c138 return c->mask;
159 _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) { argument
164 assert_return(mask <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP);
174 r = bus_creds_add_more(c, mask | SD_BUS_CREDS_AUGMENT, pid, 0);
195 if (!(c->mask & SD_BUS_CREDS_UID))
206 if (!(c->mask & SD_BUS_CREDS_EUID))
217 if (!(c->mask & SD_BUS_CREDS_SUID))
229 if (!(c->mask & SD_BUS_CREDS_FSUID))
240 if (!(c->mask & SD_BUS_CREDS_GID))
251 if (!(c->mask
769 bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) argument
1120 bus_creds_extend_by_pid(sd_bus_creds *c, uint64_t mask, sd_bus_creds **ret) argument
[all...]
H A Dbus-kernel.c536 m->creds.mask |= (SD_BUS_CREDS_UNIQUE_NAME|SD_BUS_CREDS_WELL_KNOWN_NAMES) & bus->creds_mask;
615 m->creds.mask |= SD_BUS_CREDS_PID & bus->creds_mask;
620 m->creds.mask |= SD_BUS_CREDS_TID & bus->creds_mask;
625 m->creds.mask |= SD_BUS_CREDS_PPID & bus->creds_mask;
628 m->creds.mask |= SD_BUS_CREDS_PPID & bus->creds_mask;
640 m->creds.mask |= SD_BUS_CREDS_UID & bus->creds_mask;
645 m->creds.mask |= SD_BUS_CREDS_EUID & bus->creds_mask;
650 m->creds.mask |= SD_BUS_CREDS_SUID & bus->creds_mask;
655 m->creds.mask |= SD_BUS_CREDS_FSUID & bus->creds_mask;
660 m->creds.mask |
1542 attach_flags_to_kdbus(uint64_t mask) argument
[all...]
/systemd/src/shared/
H A Dfirewall-util.c92 struct ipt_entry *entry, *mask; local
129 /* Create a search mask entry */
130 mask = alloca(sz);
131 memset(mask, 0xFF, sz);
134 if (iptc_check_entry("POSTROUTING", entry, (unsigned char*) mask, h))
142 if (!iptc_delete_entry("POSTROUTING", entry, (unsigned char*) mask, h)) {
172 struct ipt_entry *entry, *mask; local
272 mask = alloca0(sz);
273 memset(mask, 0xFF, sz);
277 if (!iptc_check_entry("PREROUTING", entry, (unsigned char*) mask,
[all...]
H A Dask-password-api.c475 sigset_t mask, oldmask; local
483 assert_se(sigemptyset(&mask) >= 0);
484 assert_se(sigset_add_many(&mask, SIGINT, SIGTERM, -1) >= 0);
485 assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) >= 0);
505 signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
/systemd/src/udev/
H A Dudevadm-test.c52 sigset_t mask, sigmask_orig; local
133 sigfillset(&mask);
134 sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
H A Dudevadm-monitor.c76 sigset_t mask; local
149 sigemptyset(&mask);
150 sigaddset(&mask, SIGINT);
151 sigaddset(&mask, SIGTERM);
152 sigprocmask(SIG_UNBLOCK, &mask, NULL);
H A Dudev-builtin-input_id.c242 unsigned long mask; local
275 mask = 0xFFFFFFFE;
276 if ((bitmask_key[0] & mask) == mask) {
H A Dudevadm-info.c194 static void cleanup_dir(DIR *dir, mode_t mask, int depth) { argument
207 if ((stats.st_mode & mask) != 0)
214 cleanup_dir(dir2, mask, depth-1);
H A Dudevd.c357 sigset_t mask; local
380 sigfillset(&mask);
381 fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
1146 log_debug("inotify event: %x for %s", e->mask, udev_device_get_devnode(dev));
1147 if (e->mask & IN_CLOSE_WRITE) {
1156 } else if (e->mask & IN_IGNORED)
/systemd/src/core/
H A Dkillall.c94 static void wait_for_children(Set *pids, sigset_t *mask) { argument
97 assert(mask);
154 k = sigtimedwait(mask, NULL, &ts);
227 sigset_t mask, oldmask; local
233 assert_se(sigemptyset(&mask) == 0);
234 assert_se(sigaddset(&mask, SIGCHLD) == 0);
235 assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0);
246 wait_for_children(pids, &mask);
H A Dcgroup.c298 void cgroup_context_apply(CGroupContext *c, CGroupMask mask, const char *path, ManagerState state) { argument
305 if (mask == 0)
319 if ((mask & CGROUP_MASK_CPU) && !is_root) {
346 if (mask & CGROUP_MASK_BLKIO) {
396 if ((mask & CGROUP_MASK_MEMORY) && !is_root) {
419 if ((mask & CGROUP_MASK_DEVICES) && !is_root) {
482 if ((mask & CGROUP_MASK_PIDS) && !is_root) {
499 CGroupMask mask = 0; local
507 mask |= CGROUP_MASK_CPUACCT | CGROUP_MASK_CPU;
514 mask |
616 CGroupMask mask; local
632 CGroupMask mask; local
694 migrate_callback(CGroupMask mask, void *userdata) argument
[all...]
H A Dmanager.c409 sigset_t mask; local
421 assert_se(sigemptyset(&mask) == 0);
422 sigset_add_many(&mask,
474 assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
476 m->signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
/systemd/src/bus-proxyd/
H A Ddriver.c40 static int get_creds_by_name(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **_creds, sd_bus_error *error) { argument
48 r = sd_bus_get_name_creds(bus, name, mask, &c);
60 static int get_creds_by_message(sd_bus *bus, sd_bus_message *m, uint64_t mask, sd_bus_creds **_creds, sd_bus_error *error) { argument
72 return get_creds_by_name(bus, name, mask, _creds, error);
261 if (creds->mask & SD_BUS_CREDS_PID) {
267 if (creds->mask & SD_BUS_CREDS_EUID) {
273 if (creds->mask & SD_BUS_CREDS_SELINUX_CONTEXT) {
317 if (!(creds->mask & SD_BUS_CREDS_SELINUX_CONTEXT))
341 if (!(creds->mask & SD_BUS_CREDS_PID))
357 if (!(creds->mask
[all...]
/systemd/src/resolve/
H A Dresolved-link-bus.c99 uint64_t mask; local
104 mask = (l->unicast_scope ? SD_RESOLVED_DNS : 0) |
110 return sd_bus_message_append(reply, "t", mask);
/systemd/src/tty-ask-password-agent/
H A Dtty-ask-password-agent.c514 sigset_t mask; local
528 assert_se(sigemptyset(&mask) >= 0);
529 assert_se(sigset_add_many(&mask, SIGINT, SIGTERM, -1) >= 0);
530 assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) >= 0);
532 signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
/systemd/src/libsystemd-network/
H A Dsd-dhcp-lease.c474 /* option format: (subnet-mask-width significant-subnet-octets gateway-ip)* */
537 log_debug_errno(r, "Failed to parse subnet mask, ignoring: %m");
1089 struct in_addr address, mask; local
1100 r = in_addr_default_subnet_mask(&address, &mask);
1104 lease->subnet_mask = mask.s_addr;
H A Dsd-ndisc.c283 uint8_t bytes, mask, len; local
291 mask = 0xff << (8 - len % 8);
294 (prefix->s6_addr[bytes] & mask) != (addr->s6_addr[bytes] & mask))
/systemd/src/cgtop/
H A Dcgtop.c891 CGroupMask mask; local
896 r = cg_mask_supported(&mask);
902 arg_count = (mask & CGROUP_MASK_PIDS) ? COUNT_PIDS : COUNT_USERSPACE_PROCESSES;

Completed in 70 milliseconds

12