Lines Matching refs:uid

74         uid_t uid;  member
393 static const char* default_shell(uid_t uid) { in default_shell() argument
394 return uid == 0 ? "/bin/sh" : NOLOGIN; in default_shell()
464 .pw_uid = i->uid, in write_temporary_passwd()
476 .pw_shell = i->shell ?: (char*) default_shell(i->uid), in write_temporary_passwd()
559 ordered_hashmap_remove(todo_uids, UID_TO_PTR(i->uid)); in write_temporary_shadow()
937 static int uid_is_ok(uid_t uid, const char *name, bool check_with_gid) { in uid_is_ok() argument
940 if (ordered_hashmap_get(todo_uids, UID_TO_PTR(uid))) in uid_is_ok()
948 i = ordered_hashmap_get(todo_gids, GID_TO_PTR(uid)); in uid_is_ok()
954 if (hashmap_contains(database_by_uid, UID_TO_PTR(uid))) in uid_is_ok()
960 n = hashmap_get(database_by_gid, GID_TO_PTR(uid)); in uid_is_ok()
971 p = getpwuid(uid); in uid_is_ok()
979 g = getgrgid((gid_t) uid); in uid_is_ok()
1001 uid_t uid = 0; in read_id_from_file() local
1017 uid = st.st_uid; in read_id_from_file()
1031 uid = (uid_t) gid; in read_id_from_file()
1034 uid = (uid_t) st.st_gid; in read_id_from_file()
1043 *_uid = uid; in read_id_from_file()
1066 i->uid = PTR_TO_UID(z); in add_user()
1079 i->uid = p->pw_uid; in add_user()
1094 r = uid_is_ok(i->uid, i->name, !i->id_set_strict); in add_user()
1096 return log_error_errno(r, "Failed to verify UID " UID_FMT ": %m", i->uid); in add_user()
1098 … log_info("Suggested user ID " UID_FMT " for %s already used.", i->uid, i->name); in add_user()
1114 … return log_error_errno(r, "Failed to verify UID " UID_FMT ": %m", i->uid); in add_user()
1116 i->uid = c; in add_user()
1128 return log_error_errno(r, "Failed to verify UID " UID_FMT ": %m", i->uid); in add_user()
1130 i->uid = (uid_t) i->gid; in add_user()
1146 … return log_error_errno(r, "Failed to verify UID " UID_FMT ": %m", i->uid); in add_user()
1152 i->uid = search_uid; in add_user()
1155 r = ordered_hashmap_ensure_put(&todo_uids, NULL, UID_TO_PTR(i->uid), i); in add_user()
1158 "or conflicts with another user.", i->name, i->uid, i->gid); in add_user()
1163 i->name, i->uid, i->gid); in add_user()
1167 i->name, strna(i->description), i->uid, i->gid); in add_user()
1276 r = gid_is_ok((gid_t) i->uid); in add_group()
1280 i->gid = (gid_t) i->uid; in add_group()
1479 if (a->uid_set && a->uid != b->uid) in item_equal()
1685 _cleanup_free_ char *uid = NULL, *gid = NULL; in parse_line() local
1686 if (split_pair(resolved_id, ":", &uid, &gid) == 0) { in parse_line()
1697 free_and_replace(resolved_id, uid); in parse_line()
1700 r = parse_uid(resolved_id, &i->uid); in parse_line()