Lines Matching refs:uid
13 uid_t uid; member
19 static int build_user_json(const char *user_name, uid_t uid, const char *real_name, JsonVariant **r… in build_user_json() argument
21 assert(uid_is_valid(uid)); in build_user_json()
27 JSON_BUILD_PAIR("uid", JSON_BUILD_UNSIGNED(uid)), in build_user_json()
37 static bool user_match_lookup_parameters(LookupParameters *p, const char *name, uid_t uid) { in user_match_lookup_parameters() argument
43 if (uid_is_valid(p->uid) && uid != p->uid) in user_match_lookup_parameters()
49 static int user_lookup_uid(Manager *m, uid_t uid, char **ret_name, char **ret_real_name) { in user_lookup_uid() argument
56 assert(uid_is_valid(uid)); in user_lookup_uid()
60 if (uid < 0x10000) /* Host UID range */ in user_lookup_uid()
63 r = manager_find_machine_for_uid(m, uid, &machine, &converted_uid); in user_lookup_uid()
90 uid_t uid, converted_uid; in user_lookup_name() local
110 if (parse_uid(d + 1, &uid) < 0) in user_lookup_name()
124 r = machine_translate_uid(machine, uid, &converted_uid); in user_lookup_name()
128 if (asprintf(&rn, "UID " UID_FMT " of Container %s", uid, machine->name) < 0) in user_lookup_name()
141 …N_VARIANT_UNSIGNED, json_dispatch_uid_gid, offsetof(LookupParameters, uid), 0 }, in vl_method_get_user_record()
149 .uid = UID_INVALID, in vl_method_get_user_record()
152 uid_t found_uid = UID_INVALID, uid; in vl_method_get_user_record() local
167 if (uid_is_valid(p.uid)) in vl_method_get_user_record()
168 r = user_lookup_uid(m, p.uid, &found_name, &found_real_name); in vl_method_get_user_record()
178 uid = uid_is_valid(found_uid) ? found_uid : p.uid; in vl_method_get_user_record()
181 if (!user_match_lookup_parameters(&p, un, uid)) in vl_method_get_user_record()
184 r = build_user_json(un, uid, found_real_name, &v); in vl_method_get_user_record()