Lines Matching refs:ucred

200 static void client_context_read_uid_gid(ClientContext *c, const struct ucred *ucred) {  in client_context_read_uid_gid()  argument
205 if (ucred && uid_is_valid(ucred->uid)) in client_context_read_uid_gid()
206 c->uid = ucred->uid; in client_context_read_uid_gid()
210 if (ucred && gid_is_valid(ucred->gid)) in client_context_read_uid_gid()
211 c->gid = ucred->gid; in client_context_read_uid_gid()
506 const struct ucred *ucred, in client_context_really_refresh() argument
518 client_context_read_uid_gid(c, ucred); in client_context_really_refresh()
543 const struct ucred *ucred, in client_context_maybe_refresh() argument
570 if (ucred && uid_is_valid(ucred->uid) && c->uid != ucred->uid) in client_context_maybe_refresh()
573 if (ucred && gid_is_valid(ucred->gid) && c->gid != ucred->gid) in client_context_maybe_refresh()
582 client_context_really_refresh(s, c, ucred, label, label_size, unit_id, timestamp); in client_context_maybe_refresh()
652 const struct ucred *ucred, in client_context_get_internal() argument
681 client_context_maybe_refresh(s, c, ucred, label, label_len, unit_id, USEC_INFINITY); in client_context_get_internal()
705 client_context_really_refresh(s, c, ucred, label, label_len, unit_id, USEC_INFINITY); in client_context_get_internal()
714 const struct ucred *ucred, in client_context_get() argument
719 return client_context_get_internal(s, pid, ucred, label, label_len, unit_id, false, ret); in client_context_get()
725 const struct ucred *ucred, in client_context_acquire() argument
730 return client_context_get_internal(s, pid, ucred, label, label_len, unit_id, true, ret); in client_context_acquire()
766 struct ucred ucred = { in client_context_acquire_default() local
772 r = client_context_acquire(s, ucred.pid, &ucred, NULL, 0, NULL, &s->my_context); in client_context_acquire_default()