Lines Matching refs:uid

30 bool uid_is_valid(uid_t uid) {  in uid_is_valid()  argument
35 if (uid == (uid_t) UINT32_C(0xFFFFFFFF)) in uid_is_valid()
39 if (uid == (uid_t) UINT32_C(0xFFFF)) in uid_is_valid()
46 uint32_t uid = 0; in parse_uid() local
60 | SAFE_ATO_REFUSE_LEADING_WHITESPACE, &uid); in parse_uid()
64 if (!uid_is_valid(uid)) in parse_uid()
71 *ret = uid; in parse_uid()
117 uid_t uid; in getlogname_malloc() local
121 uid = st.st_uid; in getlogname_malloc()
123 uid = getuid(); in getlogname_malloc()
125 return uid_to_name(uid); in getlogname_malloc()
159 uid_t *uid, gid_t *gid, in synthesize_user_creds() argument
170 if (uid) in synthesize_user_creds()
171 *uid = 0; in synthesize_user_creds()
188 if (uid) in synthesize_user_creds()
189 *uid = UID_NOBODY; in synthesize_user_creds()
207 uid_t *uid, gid_t *gid, in get_user_creds() argument
231 r = synthesize_user_creds(username, uid, gid, home, shell, flags); in get_user_creds()
253 if (uid) in get_user_creds()
254 *uid = u; in get_user_creds()
267 if (synthesize_user_creds(username, uid, gid, home, shell, flags) >= 0) in get_user_creds()
274 if (uid) { in get_user_creds()
278 *uid = p->pw_uid; in get_user_creds()
369 char* uid_to_name(uid_t uid) { in uid_to_name() argument
374 if (uid == 0) in uid_to_name()
377 uid == UID_NOBODY) in uid_to_name()
380 if (uid_is_valid(uid)) { in uid_to_name()
395 r = getpwuid_r(uid, &pwbuf, buf, (size_t) bufsize, &pw); in uid_to_name()
408 if (asprintf(&ret, UID_FMT, uid) < 0) in uid_to_name()
1071 uid_t uid; in is_this_me() local
1076 r = get_user_creds(&username, &uid, NULL, NULL, NULL, USER_CREDS_ALLOW_MISSING); in is_this_me()
1080 return uid == getuid(); in is_this_me()