Lines Matching refs:creds
45 static __inline__ int scm_check_creds(struct ucred *creds) in scm_check_creds() argument
48 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds()
49 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds()
54 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds()
164 struct ucred creds; in __scm_send() local
169 memcpy(&creds, CMSG_DATA(cmsg), sizeof(struct ucred)); in __scm_send()
170 err = scm_check_creds(&creds); in __scm_send()
174 p->creds.pid = creds.pid; in __scm_send()
175 if (!p->pid || pid_vnr(p->pid) != creds.pid) { in __scm_send()
178 pid = find_get_pid(creds.pid); in __scm_send()
186 uid = make_kuid(current_user_ns(), creds.uid); in __scm_send()
187 gid = make_kgid(current_user_ns(), creds.gid); in __scm_send()
191 p->creds.uid = uid; in __scm_send()
192 p->creds.gid = gid; in __scm_send()