Lines Matching defs:mask

138         return c->mask;
159 _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) {
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 & SD_BUS_CREDS_EGID))
262 if (!(c->mask & SD_BUS_CREDS_SGID))
273 if (!(c->mask & SD_BUS_CREDS_FSGID))
284 if (!(c->mask & SD_BUS_CREDS_SUPPLEMENTARY_GIDS))
295 if (!(c->mask & SD_BUS_CREDS_PID))
307 if (!(c->mask & SD_BUS_CREDS_PPID))
324 if (!(c->mask & SD_BUS_CREDS_TID))
335 if (!(c->mask & SD_BUS_CREDS_SELINUX_CONTEXT))
347 if (!(c->mask & SD_BUS_CREDS_COMM))
359 if (!(c->mask & SD_BUS_CREDS_TID_COMM))
371 if (!(c->mask & SD_BUS_CREDS_EXE))
385 if (!(c->mask & SD_BUS_CREDS_CGROUP))
399 if (!(c->mask & SD_BUS_CREDS_UNIT))
426 if (!(c->mask & SD_BUS_CREDS_USER_UNIT))
453 if (!(c->mask & SD_BUS_CREDS_SLICE))
480 if (!(c->mask & SD_BUS_CREDS_USER_SLICE))
507 if (!(c->mask & SD_BUS_CREDS_SESSION))
535 if (!(c->mask & SD_BUS_CREDS_OWNER_UID))
550 if (!(c->mask & SD_BUS_CREDS_CMDLINE))
570 if (!(c->mask & SD_BUS_CREDS_AUDIT_SESSION_ID))
584 if (!(c->mask & SD_BUS_CREDS_AUDIT_LOGIN_UID))
598 if (!(c->mask & SD_BUS_CREDS_TTY))
612 if (!(c->mask & SD_BUS_CREDS_UNIQUE_NAME))
623 if (!(c->mask & SD_BUS_CREDS_WELL_KNOWN_NAMES))
656 if (!(c->mask & SD_BUS_CREDS_DESCRIPTION))
690 if (!(c->mask & SD_BUS_CREDS_EFFECTIVE_CAPS))
700 if (!(c->mask & SD_BUS_CREDS_PERMITTED_CAPS))
710 if (!(c->mask & SD_BUS_CREDS_INHERITABLE_CAPS))
720 if (!(c->mask & SD_BUS_CREDS_BOUNDING_CAPS))
769 int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
776 if (!(mask & SD_BUS_CREDS_AUGMENT))
782 c->mask |= SD_BUS_CREDS_PID;
783 } else if (c->mask & SD_BUS_CREDS_PID)
790 if (tid <= 0 && (c->mask & SD_BUS_CREDS_TID))
794 missing = mask & ~(c->mask|SD_BUS_CREDS_PID|SD_BUS_CREDS_TID|SD_BUS_CREDS_UNIQUE_NAME|SD_BUS_CREDS_WELL_KNOWN_NAMES|SD_BUS_CREDS_DESCRIPTION|SD_BUS_CREDS_AUGMENT);
800 c->mask |= SD_BUS_CREDS_TID;
841 c->mask |= SD_BUS_CREDS_PPID;
864 c->mask |= missing & (SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_SUID|SD_BUS_CREDS_FSUID);
887 c->mask |= missing & (SD_BUS_CREDS_GID|SD_BUS_CREDS_EGID|SD_BUS_CREDS_SGID|SD_BUS_CREDS_FSGID);
915 c->mask |= SD_BUS_CREDS_SUPPLEMENTARY_GIDS;
927 c->mask |= SD_BUS_CREDS_EFFECTIVE_CAPS;
939 c->mask |= SD_BUS_CREDS_PERMITTED_CAPS;
951 c->mask |= SD_BUS_CREDS_INHERITABLE_CAPS;
963 c->mask |= SD_BUS_CREDS_BOUNDING_CAPS;
980 c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
989 c->mask |= SD_BUS_CREDS_COMM;
1003 c->mask |= SD_BUS_CREDS_EXE;
1008 c->mask |= SD_BUS_CREDS_EXE;
1025 c->mask |= SD_BUS_CREDS_CMDLINE;
1042 c->mask |= SD_BUS_CREDS_TID_COMM;
1062 c->mask |= missing & (SD_BUS_CREDS_CGROUP|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_USER_UNIT|SD_BUS_CREDS_SLICE|SD_BUS_CREDS_USER_SLICE|SD_BUS_CREDS_SESSION|SD_BUS_CREDS_OWNER_UID);
1070 c->mask |= SD_BUS_CREDS_AUDIT_SESSION_ID;
1075 c->mask |= SD_BUS_CREDS_AUDIT_SESSION_ID;
1083 c->mask |= SD_BUS_CREDS_AUDIT_LOGIN_UID;
1088 c->mask |= SD_BUS_CREDS_AUDIT_LOGIN_UID;
1096 c->mask |= SD_BUS_CREDS_TTY;
1101 c->mask |= SD_BUS_CREDS_TTY;
1115 c->augmented = missing & c->mask;
1120 int bus_creds_extend_by_pid(sd_bus_creds *c, uint64_t mask, sd_bus_creds **ret) {
1127 if ((mask & ~c->mask) == 0 || (!(mask & SD_BUS_CREDS_AUGMENT))) {
1141 if (c->mask & mask & SD_BUS_CREDS_PID) {
1143 n->mask |= SD_BUS_CREDS_PID;
1146 if (c->mask & mask & SD_BUS_CREDS_TID) {
1148 n->mask |= SD_BUS_CREDS_TID;
1151 if (c->mask & mask & SD_BUS_CREDS_PPID) {
1153 n->mask |= SD_BUS_CREDS_PPID;
1156 if (c->mask & mask & SD_BUS_CREDS_UID) {
1158 n->mask |= SD_BUS_CREDS_UID;
1161 if (c->mask & mask & SD_BUS_CREDS_EUID) {
1163 n->mask |= SD_BUS_CREDS_EUID;
1166 if (c->mask & mask & SD_BUS_CREDS_SUID) {
1168 n->mask |= SD_BUS_CREDS_SUID;
1171 if (c->mask & mask & SD_BUS_CREDS_FSUID) {
1173 n->mask |= SD_BUS_CREDS_FSUID;
1176 if (c->mask & mask & SD_BUS_CREDS_GID) {
1178 n->mask |= SD_BUS_CREDS_GID;
1181 if (c->mask & mask & SD_BUS_CREDS_EGID) {
1183 n->mask |= SD_BUS_CREDS_EGID;
1186 if (c->mask & mask & SD_BUS_CREDS_SGID) {
1188 n->mask |= SD_BUS_CREDS_SGID;
1191 if (c->mask & mask & SD_BUS_CREDS_FSGID) {
1193 n->mask |= SD_BUS_CREDS_FSGID;
1196 if (c->mask & mask & SD_BUS_CREDS_SUPPLEMENTARY_GIDS) {
1207 n->mask |= SD_BUS_CREDS_SUPPLEMENTARY_GIDS;
1210 if (c->mask & mask & SD_BUS_CREDS_COMM) {
1217 n->mask |= SD_BUS_CREDS_COMM;
1220 if (c->mask & mask & SD_BUS_CREDS_TID_COMM) {
1227 n->mask |= SD_BUS_CREDS_TID_COMM;
1230 if (c->mask & mask & SD_BUS_CREDS_EXE) {
1238 n->mask |= SD_BUS_CREDS_EXE;
1241 if (c->mask & mask & SD_BUS_CREDS_CMDLINE) {
1253 n->mask |= SD_BUS_CREDS_CMDLINE;
1256 if (c->mask & mask & (SD_BUS_CREDS_CGROUP|SD_BUS_CREDS_SESSION|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_USER_UNIT|SD_BUS_CREDS_SLICE|SD_BUS_CREDS_USER_SLICE|SD_BUS_CREDS_OWNER_UID)) {
1267 n->mask |= mask & (SD_BUS_CREDS_CGROUP|SD_BUS_CREDS_SESSION|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_USER_UNIT|SD_BUS_CREDS_SLICE|SD_BUS_CREDS_USER_SLICE|SD_BUS_CREDS_OWNER_UID);
1270 if (c->mask & mask & (SD_BUS_CREDS_EFFECTIVE_CAPS|SD_BUS_CREDS_PERMITTED_CAPS|SD_BUS_CREDS_INHERITABLE_CAPS|SD_BUS_CREDS_BOUNDING_CAPS)) {
1277 n->mask |= c->mask & mask & (SD_BUS_CREDS_EFFECTIVE_CAPS|SD_BUS_CREDS_PERMITTED_CAPS|SD_BUS_CREDS_INHERITABLE_CAPS|SD_BUS_CREDS_BOUNDING_CAPS);
1280 if (c->mask & mask & SD_BUS_CREDS_SELINUX_CONTEXT) {
1286 n->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
1289 if (c->mask & mask & SD_BUS_CREDS_AUDIT_SESSION_ID) {
1291 n->mask |= SD_BUS_CREDS_AUDIT_SESSION_ID;
1293 if (c->mask & mask & SD_BUS_CREDS_AUDIT_LOGIN_UID) {
1295 n->mask |= SD_BUS_CREDS_AUDIT_LOGIN_UID;
1298 if (c->mask & mask & SD_BUS_CREDS_TTY) {
1305 n->mask |= SD_BUS_CREDS_TTY;
1308 if (c->mask & mask & SD_BUS_CREDS_UNIQUE_NAME) {
1314 n->mask |= SD_BUS_CREDS_UNIQUE_NAME;
1317 if (c->mask & mask & SD_BUS_CREDS_WELL_KNOWN_NAMES) {
1327 n->mask |= SD_BUS_CREDS_WELL_KNOWN_NAMES;
1330 if (c->mask & mask & SD_BUS_CREDS_DESCRIPTION) {
1335 n->mask |= SD_BUS_CREDS_DESCRIPTION;
1338 n->augmented = c->augmented & n->mask;
1342 r = bus_creds_add_more(n, mask, 0, 0);