Home
last modified time | relevance | path

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

12

/net/core/
Dscm.c50 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds() local
53 if (!uid_valid(uid) || !gid_valid(gid)) in scm_check_creds()
58 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds()
59 uid_eq(uid, cred->suid)) || nsown_capable(CAP_SETUID)) && in scm_check_creds()
162 kuid_t uid; in __scm_send() local
183 uid = make_kuid(current_user_ns(), creds.uid); in __scm_send()
185 if (!uid_valid(uid) || !gid_valid(gid)) in __scm_send()
188 p->creds.uid = uid; in __scm_send()
Dsock.c915 ucred->uid = ucred->gid = -1; in cred_to_ucred()
919 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred()
1585 kuid_t uid; in sock_i_uid() local
1588 uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : GLOBAL_ROOT_UID; in sock_i_uid()
1590 return uid; in sock_i_uid()
/net/sunrpc/
Dauth_generic.c47 .uid = RPC_MACHINE_CRED_USERID, in rpc_lookup_machine_cred()
89 gcred->acred.uid = acred->uid; in generic_create_cred()
100 from_kuid(&init_user_ns, acred->uid), in generic_create_cred()
134 !uid_eq(gcred->acred.uid, acred->uid) || in machine_cred_match()
152 if (!uid_eq(gcred->acred.uid, acred->uid) || in generic_match()
Dsvcauth_unix.c413 kuid_t uid; member
417 static int unix_gid_hash(kuid_t uid) in unix_gid_hash() argument
419 return hash_long(from_kuid(&init_user_ns, uid), GID_HASHBITS); in unix_gid_hash()
436 return uid_eq(orig->uid, new->uid); in unix_gid_match()
442 new->uid = item->uid; in unix_gid_init()
468 snprintf(tuid, 20, "%u", from_kuid(&init_user_ns, ug->uid)); in unix_gid_request()
473 static struct unix_gid *unix_gid_lookup(struct cache_detail *cd, kuid_t uid);
480 kuid_t uid; in unix_gid_parse() local
495 uid = make_kuid(&init_user_ns, id); in unix_gid_parse()
496 if (!uid_valid(uid)) in unix_gid_parse()
[all …]
Dauth_unix.c68 from_kuid(&init_user_ns, acred->uid), in unx_create_cred()
124 if (!uid_eq(cred->uc_uid, acred->uid) || !gid_eq(cred->uc_gid, acred->gid)) in unx_match()
Dauth.c487 nr = hash_long(from_kuid(&init_user_ns, acred->uid), cache->hashbits); in rpcauth_lookup_credcache()
554 acred.uid = cred->fsuid; in rpcauth_lookupcred()
576 cred->cr_uid = acred->uid; in rpcauth_init_cred()
594 .uid = GLOBAL_ROOT_UID, in rpcauth_bind_root_cred()
/net/netfilter/
Dxt_qtaguid.c149 || unlikely(current_fsuid() == xt_qtaguid_ctrl_file->uid); in can_manipulate_uids()
152 static bool can_impersonate_uid(uid_t uid) in can_impersonate_uid() argument
154 return uid == current_fsuid() || can_manipulate_uids(); in can_impersonate_uid()
157 static bool can_read_other_uid_stats(uid_t uid) in can_read_other_uid_stats() argument
161 || unlikely(!current_fsuid()) || uid == current_fsuid() in can_read_other_uid_stats()
163 || unlikely(current_fsuid() == xt_qtaguid_ctrl_file->uid); in can_read_other_uid_stats()
382 if (data->uid < this->uid) in uid_tag_data_tree_insert()
384 else if (data->uid > this->uid) in uid_tag_data_tree_insert()
396 uid_t uid) in uid_tag_data_tree_search() argument
404 if (uid < data->uid) in uid_tag_data_tree_search()
[all …]
Dxt_qtaguid_internal.h113 static inline tag_t combine_atag_with_uid(tag_t acct_tag, uid_t uid) in combine_atag_with_uid() argument
115 return acct_tag | uid; in combine_atag_with_uid()
117 static inline tag_t make_tag_from_uid(uid_t uid) in make_tag_from_uid() argument
119 return uid; in make_tag_from_uid()
314 uid_t uid; member
Dxt_IDLETIMER.c77 uid_t uid; member
147 res = snprintf(uid_msg, NLMSG_MAX_SIZE, "UID=%u", timer->uid); in notify_netlink_uevent()
315 info->timer->uid = 0; in idletimer_tg_create()
360 timer->uid = sk->sk_socket->file->f_cred->uid; in reset_timer()
Dxt_recent.c329 kuid_t uid; in recent_mt_check() local
390 uid = make_kuid(&init_user_ns, ip_list_uid); in recent_mt_check()
392 if (!uid_valid(uid) || !gid_valid(gid)) { in recent_mt_check()
404 proc_set_user(pde, uid, gid); in recent_mt_check()
Dxt_quota2.c58 module_param_named(uid, quota_list_uid, uint, S_IRUGO | S_IWUSR);
Dnfnetlink_log.c544 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message() local
547 if (nla_put_be32(inst->skb, NFULA_UID, uid) || in __build_packet_message()
/net/ax25/
Dax25_uid.c54 ax25_uid_assoc *ax25_findbyuid(kuid_t uid) in ax25_findbyuid() argument
60 if (uid_eq(ax25_uid->uid, uid)) { in ax25_findbyuid()
85 res = from_kuid_munged(current_user_ns(), ax25_uid->uid); in ax25_uid_ioctl()
112 ax25_uid->uid = sax25_kuid; in ax25_uid_ioctl()
179 from_kuid_munged(seq_user_ns(seq), pt->uid), in ax25_uid_seq_show()
/net/sunrpc/auth_gss/
Dauth_gss.c258 kuid_t uid; member
309 __gss_find_upcall(struct rpc_pipe *pipe, kuid_t uid) in __gss_find_upcall() argument
313 if (!uid_eq(pos->uid, uid)) in __gss_find_upcall()
334 old = __gss_find_upcall(pipe, gss_msg->uid); in gss_add_msg()
401 uid_t uid = from_kuid(&init_user_ns, gss_msg->uid); in gss_encode_v0_msg() local
402 memcpy(gss_msg->databuf, &uid, sizeof(uid)); in gss_encode_v0_msg()
404 gss_msg->msg.len = sizeof(uid); in gss_encode_v0_msg()
405 BUG_ON(sizeof(uid) > UPCALL_BUF_LEN); in gss_encode_v0_msg()
418 from_kuid(&init_user_ns, gss_msg->uid)); in gss_encode_v1_msg()
457 kuid_t uid, const char *service_name) in gss_alloc_msg() argument
[all …]
/net/9p/
Dprotocol.c48 kfree(stbuf->uid); in p9stat_free()
169 kuid_t *uid = va_arg(ap, kuid_t *); in p9pdu_vreadf() local
175 *uid = make_kuid(&init_user_ns, in p9pdu_vreadf()
212 &stbuf->name, &stbuf->uid, in p9pdu_vreadf()
404 kuid_t uid = va_arg(ap, kuid_t); in p9pdu_vwritef() local
406 from_kuid(&init_user_ns, uid)); in p9pdu_vwritef()
435 stbuf->name, stbuf->uid, in p9pdu_vwritef()
511 p9attr->uid, in p9pdu_vwritef()
Dclient.c886 fid->uid = current_fsuid(); in p9_fid_create()
1151 fid->uid = oldfid->uid; in p9_client_walk()
1694 ret->name, ret->uid, ret->gid, ret->muid, ret->extension, in p9_client_stat()
1781 if (wst->uid) in p9_client_statsize()
1782 ret += strlen(wst->uid); in p9_client_statsize()
1816 wst->name, wst->uid, wst->gid, wst->muid, wst->extension, in p9_client_wstat()
1849 from_kuid(&init_user_ns, p9attr->uid), in p9_client_setattr()
/net/ipv4/
Dinet_connection_sock.c62 kuid_t uid = sock_i_uid((struct sock *)sk); in inet_csk_bind_conflict() local
81 !uid_eq(uid, sock_i_uid(sk2))))) { in inet_csk_bind_conflict()
112 kuid_t uid = sock_i_uid(sk); in inet_csk_get_port() local
137 uid_eq(tb->fastuid, uid))) && in inet_csk_get_port()
198 sk->sk_reuseport && uid_eq(tb->fastuid, uid))) && in inet_csk_get_port()
206 sk->sk_reuseport && uid_eq(tb->fastuid, uid))) && in inet_csk_get_port()
228 tb->fastuid = uid; in inet_csk_get_port()
236 (!sk->sk_reuseport || !uid_eq(tb->fastuid, uid))) in inet_csk_get_port()
Dtcp_ipv4.c709 arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); in tcp_v4_send_reset()
795 arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL); in tcp_v4_send_ack()
2306 st->uid = sock_i_uid(sk); in listening_get_next()
2632 struct seq_file *f, int i, kuid_t uid, int *len) in get_openreq4() argument
2649 from_kuid_munged(seq_user_ns(f), uid), in get_openreq4()
2758 get_openreq4(st->syn_wait_sk, v, seq, st->num, st->uid, &len); in tcp4_seq_show()
Dudp.c142 kuid_t uid = sock_i_uid(sk); in udp_lib_lport_inuse() local
152 !uid_eq(uid, sock_i_uid(sk2))) && in udp_lib_lport_inuse()
175 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()
/net/batman-adv/
Dicmp_socket.c208 icmp_packet->uid = socket_client->index; in batadv_socket_write()
320 if (!batadv_socket_client_hash[icmp_packet->uid]) { in batadv_socket_add_packet()
349 hash = batadv_socket_client_hash[icmp_packet->uid]; in batadv_socket_receive_packet()
Dpacket.h155 uint8_t uid; member
170 uint8_t uid; member
/net/ipv6/
Dinet6_connection_sock.c36 kuid_t uid = sock_i_uid((struct sock *)sk); in inet6_csk_bind_conflict() local
52 !uid_eq(uid, in inet6_csk_bind_conflict()
Dip6_flowlabel.c432 fl->owner.uid = current_euid(); in fl_create()
603 uid_eq(fl1->owner.uid, fl->owner.uid))) in ipv6_flowlabel_opt()
759 from_kuid_munged(seq_user_ns(seq), fl->owner.uid) : in ip6fl_seq_show()
/net/unix/
Daf_unix.c1511 UNIXCB(skb).uid = scm->creds.uid; in unix_scm_to_skb()
1535 current_uid_gid(&UNIXCB(skb).uid, &UNIXCB(skb).gid); in maybe_add_creds()
1970 scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid); in unix_dgram_recvmsg()
2149 !uid_eq(UNIXCB(skb).uid, siocb->scm->creds.uid) || in unix_stream_recvmsg()
2154 scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid); in unix_stream_recvmsg()
/net/iucv/
Daf_iucv.c694 char uid[9]; in iucv_sock_bind() local
722 memcpy(uid, sa->siucv_user_id, sizeof(uid)); in iucv_sock_bind()
723 ASCEBC(uid, 8); in iucv_sock_bind()
726 if (!memcmp(dev->perm_addr, uid, 8)) { in iucv_sock_bind()

12