/systemd/src/test/ |
H A D | test-ipcrm.c | 25 uid_t uid; local 28 assert_se(parse_uid(argv[1], &uid) >= 0); 30 return clean_ipc(uid) < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
H A D | test-acl-util.c | 35 uid_t uid; local 52 r = get_user_creds(&nobody, &uid, NULL, NULL, NULL); 54 uid = 0; 56 uid = getuid(); 58 r = add_acls_for_user(fd, uid); 69 r = add_acls_for_user(fd, uid);
|
H A D | test-user-util.c | 26 static void test_uid_to_name_one(uid_t uid, const char *name) { argument 29 assert_se(t = uid_to_name(uid));
|
/systemd/src/basic/ |
H A D | mkdir-label.c | 28 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) { argument 29 return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
|
H A D | audit-util.c | 64 int audit_loginuid_from_pid(pid_t pid, uid_t *uid) { argument 70 assert(uid); 84 *uid = (uid_t) u;
|
H A D | mkdir.c | 32 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) { argument 36 if (chmod_and_chown(path, mode, uid, gid) < 0) 45 (uid != UID_INVALID && st.st_uid != uid) || 53 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) { argument 54 return mkdir_safe_internal(path, mode, uid, gid, mkdir);
|
/systemd/src/resolve/ |
H A D | resolved.c | 35 uid_t uid; local 57 r = get_user_creds(&user, &uid, &gid, NULL, NULL); 64 r = mkdir_safe_label("/run/systemd/resolve", 0755, uid, gid); 70 r = drop_privileges(uid, gid, 0);
|
/systemd/src/network/ |
H A D | networkd.c | 30 uid_t uid; local 46 r = get_user_creds(&user, &uid, &gid, NULL, NULL); 54 r = mkdir_safe_label("/run/systemd/netif", 0755, uid, gid); 58 r = mkdir_safe_label("/run/systemd/netif/links", 0755, uid, gid); 62 r = mkdir_safe_label("/run/systemd/netif/leases", 0755, uid, gid); 66 r = mkdir_safe_label("/run/systemd/netif/lldp", 0755, uid, gid); 70 r = drop_privileges(uid, gid,
|
H A D | networkd-netdev-tuntap.c | 68 uid_t uid; local 94 r = get_user_creds(&user, &uid, NULL, NULL, NULL); 98 r = ioctl(fd, TUNSETOWNER, uid);
|
/systemd/src/shared/ |
H A D | dev-setup.c | 32 int dev_setup(const char *prefix, uid_t uid, gid_t gid) { argument 67 if (uid != UID_INVALID || gid != GID_INVALID) 68 if (lchown(n, uid, gid) < 0)
|
H A D | base-filesystem.c | 60 int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { argument 104 if (uid != UID_INVALID || gid != UID_INVALID) { 105 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0) 122 if (uid != UID_INVALID || gid != UID_INVALID) { 123 if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0)
|
H A D | uid-range.c | 25 #include "uid-range.h" 166 int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid) { argument 171 assert(uid); 173 candidate = *uid - 1; 182 *uid = candidate; 193 *uid = closest; 197 bool uid_range_contains(const UidRange *p, unsigned n, uid_t uid) { argument 201 assert(uid); 204 if (uid >= p[i].start && uid < [all...] |
/systemd/src/timesync/ |
H A D | timesyncd.c | 33 static int load_clock_timestamp(uid_t uid, gid_t gid) { argument 62 (void) fchown(fd, uid, gid); 66 (void) touch_file("/var/lib/systemd/clock", true, min, uid, gid, 0644); 86 uid_t uid; local 103 r = get_user_creds(&user, &uid, &gid, NULL, NULL); 109 r = load_clock_timestamp(uid, gid); 113 r = drop_privileges(uid, gid, (1ULL << CAP_SYS_TIME));
|
/systemd/src/udev/ |
H A D | udev-builtin-uaccess.c | 36 uid_t uid; local 49 r = sd_seat_get_active(seat, NULL, &uid); 59 r = devnode_acl(path, true, false, 0, true, uid);
|
/systemd/src/core/ |
H A D | bus-endpoint.c | 28 int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep) { argument 60 n->policy_access.id = uid;
|
H A D | bus-policy.c | 60 uid_t uid; local 62 r = get_user_creds(&user, &uid, NULL, NULL, NULL); 67 item->policy_access.id = uid;
|
H A D | killall.c | 43 uid_t uid; local 50 r = get_process_uid(pid, &uid); 55 if (uid != 0)
|
H A D | selinux-access.c | 63 uid_t uid = 0, login_uid = 0; local 71 if (sd_bus_creds_get_euid(audit->creds, &uid) >= 0) 72 xsprintf(uid_buf, UID_FMT, uid); 77 "auid=%s uid=%s gid=%s%s%s%s%s%s%s",
|
/systemd/src/login/ |
H A D | test-inhibit.c | 57 uint32_t uid, pid; local 74 while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) { 75 printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<%"PRIu32"> pid=<%"PRIu32">\n", 76 what, who, why, mode, uid, pid);
|
H A D | logind-user.h | 40 uid_t uid; member in struct:User 63 int user_new(User **out, Manager *m, uid_t uid, gid_t gid, const char *name);
|
H A D | inhibit.c | 80 unsigned int uid, pid; local 100 while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) { 107 u = uid_to_name(uid); 113 who, uid, strna(u), pid, strna(comm),
|
/systemd/src/bus-proxyd/ |
H A D | stdio-bridge.c | 151 uid_t uid; local 162 r = sd_bus_creds_get_euid(creds, &uid); 178 name = uid_to_name(uid); 190 uid, name); 200 uid, name); 208 uid, name,
|
H A D | bus-proxyd.c | 96 r = snprintf(comm, sizeof(comm), "p" PID_FMT "u" UID_FMT, p->local_creds.pid, p->local_creds.uid); 274 uid_t uid, bus_uid; local 286 r = get_user_creds(&user, &uid, &gid, NULL, NULL); 292 r = drop_privileges(uid, gid, 1ULL << CAP_IPC_OWNER);
|
H A D | bus-xml-policy.h | 59 uid_t uid; member in struct:PolicyItem 89 bool policy_check_own(Policy *p, uid_t uid, gid_t gid, const char *name); 90 bool policy_check_hello(Policy *p, uid_t uid, gid_t gid); 92 uid_t uid, 100 uid_t uid, 110 uid_t uid, 118 uid_t uid,
|
/systemd/src/coredump/ |
H A D | coredump-vacuum.c | 65 static int uid_from_file_name(const char *filename, uid_t *uid) { argument 84 return parse_uid(u, uid); 172 uid_t uid; local 175 r = uid_from_file_name(de->d_name, &uid); 201 c = hashmap_get(h, UID_TO_PTR(uid)); 229 r = hashmap_put(h, UID_TO_PTR(uid), n);
|