Home
last modified time | relevance | path

Searched refs:creds (Results 1 – 10 of 10) sorted by relevance

/linux-4.1.27/net/core/
Dscm.c47 static __inline__ int scm_check_creds(struct ucred *creds) in scm_check_creds() argument
50 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds()
51 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds()
56 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds()
166 struct ucred creds; in __scm_send() local
171 memcpy(&creds, CMSG_DATA(cmsg), sizeof(struct ucred)); in __scm_send()
172 err = scm_check_creds(&creds); in __scm_send()
176 p->creds.pid = creds.pid; in __scm_send()
177 if (!p->pid || pid_vnr(p->pid) != creds.pid) { in __scm_send()
180 pid = find_get_pid(creds.pid); in __scm_send()
[all …]
/linux-4.1.27/include/net/
Dscm.h31 struct scm_creds creds; /* Skb credentials */ member
57 scm->creds.pid = pid_vnr(pid); in scm_set_cred()
58 scm->creds.uid = uid; in scm_set_cred()
59 scm->creds.gid = gid; in scm_set_cred()
79 scm->creds.uid = INVALID_UID; in scm_send()
80 scm->creds.gid = INVALID_GID; in scm_send()
123 .pid = scm->creds.pid, in scm_recv()
124 .uid = from_kuid_munged(current_ns, scm->creds.uid), in scm_recv()
125 .gid = from_kgid_munged(current_ns, scm->creds.gid), in scm_recv()
/linux-4.1.27/net/sunrpc/auth_gss/
Dgss_rpc_upcall.c314 data->creds = *(struct svc_cred *)value->data; in gssp_accept_sec_context_upcall()
329 data->creds.cr_principal = kstrndup(client_name.data, in gssp_accept_sec_context_upcall()
331 if (data->creds.cr_principal) { in gssp_accept_sec_context_upcall()
333 c = strchr(data->creds.cr_principal, '@'); in gssp_accept_sec_context_upcall()
338 c = strchr(data->creds.cr_principal, '/'); in gssp_accept_sec_context_upcall()
343 kfree(data->creds.cr_principal); in gssp_accept_sec_context_upcall()
344 data->creds.cr_principal = NULL; in gssp_accept_sec_context_upcall()
358 free_svc_cred(&data->creds); in gssp_free_upcall_data()
Dgss_rpc_xdr.c182 struct svc_cred *creds) in gssx_dec_linux_creds() argument
203 creds->cr_uid = make_kuid(&init_user_ns, tmp); in gssx_dec_linux_creds()
209 creds->cr_gid = make_kgid(&init_user_ns, tmp); in gssx_dec_linux_creds()
218 creds->cr_group_info = groups_alloc(N); in gssx_dec_linux_creds()
219 if (creds->cr_group_info == NULL) in gssx_dec_linux_creds()
232 GROUP_AT(creds->cr_group_info, i) = kgid; in gssx_dec_linux_creds()
237 groups_free(creds->cr_group_info); in gssx_dec_linux_creds()
244 struct svc_cred *creds; in gssx_dec_option_array() local
263 creds = kmalloc(sizeof(struct svc_cred), GFP_KERNEL); in gssx_dec_option_array()
264 if (!creds) { in gssx_dec_option_array()
[all …]
Dgss_rpc_upcall.h35 struct svc_cred creds; member
Dsvcauth_gss.c1177 rsci.cred = ud->creds; in gss_proxy_save_rsc()
1178 memset(&ud->creds, 0, sizeof(struct svc_cred)); in gss_proxy_save_rsc()
/linux-4.1.27/include/linux/
Dnetlink.h26 struct scm_creds creds; /* Skb credentials */ member
34 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
/linux-4.1.27/net/netlink/
Daf_netlink.c138 NETLINK_CB(new).creds = NETLINK_CB(skb).creds; in netlink_to_full_skb()
778 NETLINK_CB(skb).creds = scm->creds; in netlink_mmap_sendmsg()
815 hdr->nm_pid = NETLINK_CB(skb).creds.pid; in netlink_queue_mmaped_skb()
816 hdr->nm_uid = from_kuid(sk_user_ns(sk), NETLINK_CB(skb).creds.uid); in netlink_queue_mmaped_skb()
817 hdr->nm_gid = from_kgid(sk_user_ns(sk), NETLINK_CB(skb).creds.gid); in netlink_queue_mmaped_skb()
845 hdr->nm_pid = NETLINK_CB(skb).creds.pid; in netlink_ring_set_copied()
846 hdr->nm_uid = from_kuid(sk_user_ns(sk), NETLINK_CB(skb).creds.uid); in netlink_ring_set_copied()
847 hdr->nm_gid = from_kgid(sk_user_ns(sk), NETLINK_CB(skb).creds.gid); in netlink_ring_set_copied()
2389 NETLINK_CB(skb).creds = scm.creds; in netlink_sendmsg()
2481 scm.creds = *NETLINK_CREDS(skb); in netlink_recvmsg()
/linux-4.1.27/Documentation/filesystems/nfs/
Drpc-server-gss.txt59 B) It does not properly handle creds where the user is member of more
/linux-4.1.27/net/unix/
Daf_unix.c1541 UNIXCB(skb).uid = scm->creds.uid; in unix_scm_to_skb()
1542 UNIXCB(skb).gid = scm->creds.gid; in unix_scm_to_skb()
2163 !uid_eq(UNIXCB(skb).uid, scm.creds.uid) || in unix_stream_recvmsg()
2164 !gid_eq(UNIXCB(skb).gid, scm.creds.gid)) in unix_stream_recvmsg()