Searched defs:uid (Results 1 - 25 of 75) sorted by relevance

123

/systemd/src/test/
H A Dtest-ipcrm.c25 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 Dtest-acl-util.c35 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 Dtest-user-util.c26 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 Dmkdir-label.c28 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 Daudit-util.c64 int audit_loginuid_from_pid(pid_t pid, uid_t *uid) { argument
70 assert(uid);
84 *uid = (uid_t) u;
H A Dmkdir.c32 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 Dresolved.c35 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 Dnetworkd.c30 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 Dnetworkd-netdev-tuntap.c68 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 Ddev-setup.c32 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 Dbase-filesystem.c60 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 Duid-range.c25 #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 Dtimesyncd.c33 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 Dudev-builtin-uaccess.c36 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 Dbus-endpoint.c28 int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep) { argument
60 n->policy_access.id = uid;
H A Dbus-policy.c60 uid_t uid; local
62 r = get_user_creds(&user, &uid, NULL, NULL, NULL);
67 item->policy_access.id = uid;
H A Dkillall.c43 uid_t uid; local
50 r = get_process_uid(pid, &uid);
55 if (uid != 0)
H A Dselinux-access.c63 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 Dtest-inhibit.c57 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 Dlogind-user.h40 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 Dinhibit.c80 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 Dstdio-bridge.c151 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 Dbus-proxyd.c96 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 Dbus-xml-policy.h59 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 Dcoredump-vacuum.c65 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);

Completed in 285 milliseconds

123