Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 25 of 33) sorted by relevance

12

/net/core/
Dscm.c49 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds() local
52 if (!uid_valid(uid) || !gid_valid(gid)) in scm_check_creds()
57 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds()
58 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
171 kuid_t uid; in __scm_send() local
192 uid = make_kuid(current_user_ns(), creds.uid); in __scm_send()
194 if (!uid_valid(uid) || !gid_valid(gid)) in __scm_send()
197 p->creds.uid = uid; in __scm_send()
Dnet-sysfs.c1032 kuid_t *uid, kgid_t *gid) in rx_queue_get_ownership() argument
1036 net_ns_get_ownership(net, uid, gid); in rx_queue_get_ownership()
1639 kuid_t *uid, kgid_t *gid) in netdev_queue_get_ownership() argument
1643 net_ns_get_ownership(net, uid, gid); in netdev_queue_get_ownership()
1913 static void net_get_ownership(struct device *d, kuid_t *uid, kgid_t *gid) in net_get_ownership() argument
1918 net_ns_get_ownership(net, uid, gid); in net_get_ownership()
Dsock.c1400 ucred->uid = ucred->gid = -1; in cred_to_ucred()
1404 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred()
2335 kuid_t uid; in sock_i_uid() local
2338 uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : GLOBAL_ROOT_UID; in sock_i_uid()
2340 return uid; in sock_i_uid()
3160 void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid) in sock_init_data_uid() argument
3182 sk->sk_uid = uid; in sock_init_data_uid()
3244 kuid_t uid = sock ? in sock_init_data() local
3248 sock_init_data_uid(sock, sk, uid); in sock_init_data()
Dnet_namespace.c500 void net_ns_get_ownership(const struct net *net, kuid_t *uid, kgid_t *gid) in net_ns_get_ownership() argument
507 *uid = ns_root_uid; in net_ns_get_ownership()
512 *uid = GLOBAL_ROOT_UID; in net_ns_get_ownership()
/net/sunrpc/
Dsvcauth_unix.c408 kuid_t uid; member
413 static int unix_gid_hash(kuid_t uid) in unix_gid_hash() argument
415 return hash_long(from_kuid(&init_user_ns, uid), GID_HASHBITS); in unix_gid_hash()
441 return uid_eq(orig->uid, new->uid); in unix_gid_match()
447 new->uid = item->uid; in unix_gid_init()
478 snprintf(tuid, 20, "%u", from_kuid(&init_user_ns, ug->uid)); in unix_gid_request()
483 static struct unix_gid *unix_gid_lookup(struct cache_detail *cd, kuid_t uid);
490 kuid_t uid; in unix_gid_parse() local
505 uid = make_kuid(current_user_ns(), id); in unix_gid_parse()
506 ug.uid = uid; in unix_gid_parse()
[all …]
/net/ax25/
Dax25_uid.c50 ax25_uid_assoc *ax25_findbyuid(kuid_t uid) in ax25_findbyuid() argument
56 if (uid_eq(ax25_uid->uid, uid)) { in ax25_findbyuid()
81 res = from_kuid_munged(current_user_ns(), ax25_uid->uid); in ax25_uid_ioctl()
108 ax25_uid->uid = sax25_kuid; in ax25_uid_ioctl()
175 from_kuid_munged(seq_user_ns(seq), pt->uid), in ax25_uid_seq_show()
/net/9p/
Dprotocol.c35 kfree(stbuf->uid); in p9stat_free()
36 stbuf->uid = NULL; in p9stat_free()
163 kuid_t *uid = va_arg(ap, kuid_t *); in p9pdu_vreadf() local
169 *uid = make_kuid(&init_user_ns, in p9pdu_vreadf()
206 &stbuf->name, &stbuf->uid, in p9pdu_vreadf()
408 kuid_t uid = va_arg(ap, kuid_t); in p9pdu_vwritef() local
410 from_kuid(&init_user_ns, uid)); in p9pdu_vwritef()
439 stbuf->name, stbuf->uid, in p9pdu_vwritef()
505 p9attr->uid, in p9pdu_vwritef()
Dclient.c903 fid->uid = current_fsuid(); in p9_fid_create()
1133 fid->uid = n_uname; in p9_client_attach()
1184 fid->uid = oldfid->uid; in p9_client_walk()
1733 ret->name, ret->uid, ret->gid, ret->muid, ret->extension, in p9_client_stat()
1821 if (wst->uid) in p9_client_statsize()
1822 ret += strlen(wst->uid); in p9_client_statsize()
1858 wst->name, wst->uid, wst->gid, wst->muid, wst->extension, in p9_client_wstat()
1889 from_kuid(&init_user_ns, p9attr->uid), in p9_client_setattr()
/net/sunrpc/auth_gss/
Dauth_gss.c244 kuid_t uid; member
298 __gss_find_upcall(struct rpc_pipe *pipe, kuid_t uid, const struct gss_auth *auth) in __gss_find_upcall() argument
302 if (!uid_eq(pos->uid, uid)) in __gss_find_upcall()
323 old = __gss_find_upcall(pipe, gss_msg->uid, gss_msg->auth); in gss_add_msg()
393 uid_t uid = from_kuid_munged(userns, gss_msg->uid); in gss_encode_v0_msg() local
394 memcpy(gss_msg->databuf, &uid, sizeof(uid)); in gss_encode_v0_msg()
396 gss_msg->msg.len = sizeof(uid); in gss_encode_v0_msg()
398 BUILD_BUG_ON(sizeof(uid) > sizeof(gss_msg->databuf)); in gss_encode_v0_msg()
425 from_kuid_munged(userns, gss_msg->uid)); in gss_encode_v1_msg()
507 kuid_t uid, const char *service_name) in gss_alloc_msg() argument
[all …]
/net/can/
Dgw.c112 u32 uid; member
709 if (gwj->mod.uid) { in cgw_put_job()
710 if (nla_put_u32(skb, CGW_MOD_UID, gwj->mod.uid) < 0) in cgw_put_job()
1013 nla_memcpy(&mod->uid, tb[CGW_MOD_UID], sizeof(u32)); in cgw_parse_attr()
1079 if (mod.uid) { in cgw_create_job()
1084 if (gwj->mod.uid != mod.uid) in cgw_create_job()
1212 if (gwj->mod.uid || mod.uid) { in cgw_remove_job()
1213 if (gwj->mod.uid != mod.uid) in cgw_remove_job()
/net/
Dsysctl_net.c58 kuid_t *uid, kgid_t *gid) in net_ctl_set_ownership() argument
66 *uid = ns_root_uid; in net_ctl_set_ownership()
/net/ipv4/
Dinet_connection_sock.c142 kuid_t uid = sock_i_uid((struct sock *)sk); in inet_csk_bind_conflict() local
173 uid_eq(uid, sock_i_uid(sk2))))) && in inet_csk_bind_conflict()
180 !uid_eq(uid, sock_i_uid(sk2)))) { in inet_csk_bind_conflict()
281 kuid_t uid = sock_i_uid(sk); in sk_reuseport_match() local
289 if (!uid_eq(tb->fastuid, uid)) in sk_reuseport_match()
314 kuid_t uid = sock_i_uid(sk); in inet_csk_update_fastreuse() local
321 tb->fastuid = uid; in inet_csk_update_fastreuse()
348 tb->fastuid = uid; in inet_csk_update_fastreuse()
Dudp.c138 kuid_t uid = sock_i_uid(sk); in udp_lib_lport_inuse() local
150 uid_eq(uid, sock_i_uid(sk2))) { in udp_lib_lport_inuse()
173 kuid_t uid = sock_i_uid(sk); in udp_lib_lport_inuse2() local
187 uid_eq(uid, sock_i_uid(sk2))) { in udp_lib_lport_inuse2()
202 kuid_t uid = sock_i_uid(sk); in udp_reuseport_add_sock() local
212 sk2->sk_reuseport && uid_eq(uid, sock_i_uid(sk2)) && in udp_reuseport_add_sock()
3117 uid_t uid __aligned(8);
3122 struct udp_sock *udp_sk, uid_t uid, int bucket) in udp_prog_seq_show() argument
3129 ctx.uid = uid; in udp_prog_seq_show()
3140 uid_t uid; in bpf_iter_udp_seq_show() local
[all …]
Dtcp_ipv4.c810 arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); in tcp_v4_send_reset()
912 arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL); in tcp_v4_send_ack()
2742 uid_t uid __aligned(8);
2746 struct sock_common *sk_common, uid_t uid) in tcp_prog_seq_show() argument
2753 ctx.uid = uid; in tcp_prog_seq_show()
2941 uid_t uid; in bpf_iter_tcp_seq_show() local
2956 uid = 0; in bpf_iter_tcp_seq_show()
2960 uid = from_kuid_munged(seq_user_ns(seq), in bpf_iter_tcp_seq_show()
2963 uid = from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)); in bpf_iter_tcp_seq_show()
2968 ret = tcp_prog_seq_show(prog, &meta, v, uid); in bpf_iter_tcp_seq_show()
[all …]
Dinet_hashtables.c611 kuid_t uid = sock_i_uid(sk); in inet_reuseport_add_sock() local
619 sk2->sk_reuseport && uid_eq(uid, sock_i_uid(sk2)) && in inet_reuseport_add_sock()
/net/batman-adv/
Dtp_meter.c580 int uid, u32 timestamp) in batadv_tp_send_msg() argument
602 icmp->uid = uid; in batadv_tp_send_msg()
688 icmp->session, icmp->uid, in batadv_tp_recv_ack()
728 icmp->uid, in batadv_tp_recv_ack()
1190 icmp->uid = socket_index; in batadv_tp_send_ack()
1453 icmp->timestamp, icmp->session, icmp->uid); in batadv_tp_recv_msg()
/net/netfilter/
Dxt_IDLETIMER.c58 uid_t uid; member
130 res = snprintf(uid_msg, NLMSG_MAX_SIZE, "UID=%u", timer->uid); in notify_netlink_uevent()
341 info->timer->uid = 0; in idletimer_tg_create()
410 info->timer->uid = 0; in idletimer_tg_create_v1()
462 info_timer->uid = from_kuid_munged(current_user_ns(), in reset_timer()
Dxt_recent.c339 kuid_t uid; in recent_mt_check() local
408 uid = make_kuid(&init_user_ns, ip_list_uid); in recent_mt_check()
410 if (!uid_valid(uid) || !gid_valid(gid)) { in recent_mt_check()
422 proc_set_user(pde, uid, gid); in recent_mt_check()
/net/unix/
Daf_unix.c1668 UNIXCB(skb).uid = scm->creds.uid; in unix_scm_to_skb()
1699 current_uid_gid(&UNIXCB(skb).uid, &UNIXCB(skb).gid); in maybe_add_creds()
1716 current_uid_gid(&scm->creds.uid, &scm->creds.gid); in maybe_init_creds()
1727 uid_eq(u->uid, scm->creds.uid) && in unix_skb_scm_eq()
2362 scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid); in __unix_dgram_recvmsg()
2712 scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid); in unix_stream_read_generic()
3282 uid_t uid __aligned(8);
3286 struct unix_sock *unix_sk, uid_t uid) in unix_prog_seq_show() argument
3293 ctx.uid = uid; in unix_prog_seq_show()
3302 uid_t uid; in bpf_iter_unix_seq_show() local
[all …]
Ddiag.c119 uid_t uid = from_kuid_munged(user_ns, sock_i_uid(sk)); in sk_diag_dump_uid() local
120 return nla_put(nlskb, UNIX_DIAG_UID, sizeof(uid_t), &uid); in sk_diag_dump_uid()
/net/ipv6/
Dip6_flowlabel.c447 fl->owner.uid = current_euid(); in fl_create()
672 !uid_eq(fl1->owner.uid, fl->owner.uid))) in ipv6_flowlabel_get()
848 from_kuid_munged(seq_user_ns(seq), fl->owner.uid) : in ip6fl_seq_show()
/net/smc/
Dsmc_ism.c317 u8 uid[SMC_LGR_ID_SIZE]; member
353 memcpy(ev_info.uid, lgr->id, SMC_LGR_ID_SIZE); in smc_ism_signal_shutdown()
/net/bridge/
Dbr_if.c257 static void brport_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid) in brport_get_ownership() argument
261 net_ns_get_ownership(dev_net(p->dev), uid, gid); in brport_get_ownership()
/net/nfc/nci/
Dntf.c177 memcpy(nfcv_poll->uid, data, NFC_ISO15693_UID_MAXSIZE); in nci_extract_rf_params_nfcv_passive_poll()
274 memcpy(target->iso15693_uid, nfcv_poll->uid, NFC_ISO15693_UID_MAXSIZE); in nci_add_new_protocol()
/net/iucv/
Daf_iucv.c569 char uid[sizeof(sa->siucv_user_id)]; in iucv_sock_bind() local
602 memcpy(uid, sa->siucv_user_id, sizeof(uid)); in iucv_sock_bind()
603 ASCEBC(uid, 8); in iucv_sock_bind()
606 if (!memcmp(dev->perm_addr, uid, 8)) { in iucv_sock_bind()

12