Home
last modified time | relevance | path

Searched refs:ns_capable (Results 1 – 71 of 71) sorted by relevance

/linux-4.4.14/net/bridge/
Dbr_ioctl.c93 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in add_del_if()
183 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
189 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
195 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
201 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
240 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
247 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
258 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
275 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in old_dev_ioctl()
332 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in old_deviceless()
[all …]
Dbr_sysfs_br.c40 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in store_bridge_parm()
140 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in stp_state_store()
174 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in group_fwd_mask_store()
306 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in group_addr_store()
346 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in flush_store()
Dbr_sysfs_if.c245 if (!ns_capable(dev_net(p->dev)->user_ns, CAP_NET_ADMIN)) in brport_store()
/linux-4.4.14/kernel/
Dcapability.c375 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() function
388 EXPORT_SYMBOL(ns_capable);
403 return ns_capable(&init_user_ns, cap); in capable()
446 return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) && in capable_wrt_inode_uidgid()
Dutsname.c123 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in utsns_install()
124 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in utsns_install()
Dpid_namespace.c279 if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN)) in pid_ns_ctl_handler()
365 if (!ns_capable(new->user_ns, CAP_SYS_ADMIN) || in pidns_install()
366 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in pidns_install()
Dsys.c142 if (ns_capable(pcred->user_ns, CAP_SYS_NICE)) in set_one_prio_perm()
354 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2()
363 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2()
404 if (ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE1()
488 !ns_capable(old->user_ns, CAP_SETUID)) in SYSCALL_DEFINE2()
497 !ns_capable(old->user_ns, CAP_SETUID)) in SYSCALL_DEFINE2()
551 if (ns_capable(old->user_ns, CAP_SETUID)) { in SYSCALL_DEFINE1()
608 if (!ns_capable(old->user_ns, CAP_SETUID)) { in SYSCALL_DEFINE3()
692 if (!ns_capable(old->user_ns, CAP_SETGID)) { in SYSCALL_DEFINE3()
766 ns_capable(old->user_ns, CAP_SETUID)) { in SYSCALL_DEFINE1()
[all …]
Dnsproxy.c136 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in copy_namespaces()
187 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in unshare_nsproxy_namespaces()
Dreboot.c288 if (!ns_capable(pid_ns->user_ns, CAP_SYS_BOOT)) in SYSCALL_DEFINE4()
Dgroups.c218 return ns_capable(user_ns, CAP_SETGID) && in may_setgroups()
Duser_namespace.c847 if (ns_capable(ns->parent, cap_setid) && in new_idmap_permitted()
987 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in userns_install()
Dptrace.c347 if (ns_capable(__task_cred(task)->user_ns, CAP_SYS_PTRACE)) in ptrace_attach()
Dsignal.c703 if (ns_capable(tcred->user_ns, CAP_KILL)) in kill_ok_by_cred()
/linux-4.4.14/ipc/
Dnamespace.c158 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in ipcns_install()
159 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in ipcns_install()
Dutil.c499 !ns_capable(ns->user_ns, CAP_IPC_OWNER)) in ipcperms()
708 ns_capable(ns->user_ns, CAP_SYS_ADMIN)) in ipcctl_pre_down_nolock()
Dshm.c1027 if (!ns_capable(ns->user_ns, CAP_IPC_LOCK)) { in SYSCALL_DEFINE3()
Dmqueue.c334 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN)) in mqueue_mount()
/linux-4.4.14/net/8021q/
Dvlan.c539 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
549 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
558 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
567 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
583 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
590 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
/linux-4.4.14/net/core/
Dscm.c57 ns_capable(task_active_pid_ns(current)->user_ns, CAP_SYS_ADMIN)) && in scm_check_creds()
59 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
61 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
Ddev_ioctl.c477 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in dev_ioctl()
525 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in dev_ioctl()
Dnet_namespace.c990 if (!ns_capable(net->user_ns, CAP_SYS_ADMIN) || in netns_install()
991 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in netns_install()
Dnet-sysfs.c88 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in netdev_store()
362 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ifalias_store()
1387 return ns_capable(net->user_ns, CAP_SYS_ADMIN); in net_current_may_mount()
Dsock.c163 ns_capable(user_ns, cap); in sk_ns_capable()
569 if (!ns_capable(net->user_ns, CAP_NET_RAW)) in sock_setbindtodevice()
813 ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in sock_setsockopt()
953 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in sock_setsockopt()
1904 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in sock_cmsg_send()
Dethtool.c1803 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in dev_ethtool()
/linux-4.4.14/include/linux/
Dcapability.h216 extern bool ns_capable(struct user_namespace *ns, int cap);
240 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() function
/linux-4.4.14/security/yama/
Dyama_lsm.c293 !ns_capable(__task_cred(child)->user_ns, CAP_SYS_PTRACE)) in yama_ptrace_access_check()
299 if (!ns_capable(__task_cred(child)->user_ns, CAP_SYS_PTRACE)) in yama_ptrace_access_check()
/linux-4.4.14/net/
Dsysctl_net.c49 if (ns_capable(net->user_ns, CAP_NET_ADMIN) || in net_ctl_permissions()
/linux-4.4.14/security/keys/
Dpersistent.c149 !ns_capable(ns, CAP_SETUID)) in keyctl_get_persistent()
/linux-4.4.14/security/
Dcommoncap.c152 if (ns_capable(child_cred->user_ns, CAP_SYS_PTRACE)) in cap_ptrace_access_check()
820 if (!is_subset && !ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) in cap_safe_nice()
873 if (!ns_capable(current_user_ns(), CAP_SETPCAP)) in cap_prctl_drop()
/linux-4.4.14/net/ipv4/
Dip_options.c411 if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { in ip_options_compile()
447 if ((!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) || opt->cipso) { in ip_options_compile()
460 if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { in ip_options_compile()
Dtcp_cong.c357 ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))) in tcp_set_congestion_control()
Dip_sockglue.c1131 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ip_setsockopt()
1137 if (!!val && !ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) && in do_ip_setsockopt()
1138 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) { in do_ip_setsockopt()
Dip_tunnel.c869 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip_tunnel_ioctl()
925 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip_tunnel_ioctl()
Daf_inet.c312 !ns_capable(net->user_ns, CAP_NET_RAW)) in inet_create()
474 !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) in inet_bind()
Ddevinet.c964 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in devinet_ioctl()
972 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in devinet_ioctl()
Darp.c1130 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in arp_ioctl()
Dfib_frontend.c583 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip_rt_ioctl()
Dtcp.c2267 return ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) && in tcp_can_repair_sock()
Dipmr.c1288 !ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip_mroute_setsockopt()
/linux-4.4.14/net/ieee802154/
Dsocket.c894 if (!ns_capable(net->user_ns, CAP_NET_ADMIN) && in dgram_setsockopt()
895 !ns_capable(net->user_ns, CAP_NET_RAW)) { in dgram_setsockopt()
918 if (!ns_capable(net->user_ns, CAP_NET_ADMIN) && in dgram_setsockopt()
919 !ns_capable(net->user_ns, CAP_NET_RAW)) { in dgram_setsockopt()
/linux-4.4.14/fs/proc/
Droot.c116 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN)) in proc_mount()
Dbase.c2683 if (!ns_capable(ns, CAP_SYS_ADMIN)) in proc_setgroups_open()
/linux-4.4.14/net/ipv6/
Dipv6_sockglue.c368 if (valbool && !ns_capable(net->user_ns, CAP_NET_ADMIN) && in do_ipv6_setsockopt()
369 !ns_capable(net->user_ns, CAP_NET_RAW)) { in do_ipv6_setsockopt()
407 if (optname != IPV6_RTHDR && !ns_capable(net->user_ns, CAP_NET_RAW)) in do_ipv6_setsockopt()
786 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in do_ipv6_setsockopt()
Ddatagram.c790 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()
810 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()
835 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()
Daf_inet6.c162 !ns_capable(net->user_ns, CAP_NET_RAW)) in inet6_create()
283 if (snum && snum < PROT_SOCK && !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) in inet6_bind()
Dsit.c1187 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipip6_tunnel_ioctl()
1235 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipip6_tunnel_ioctl()
1266 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipip6_tunnel_ioctl()
1293 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipip6_tunnel_ioctl()
Danycast.c65 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipv6_sock_ac_join()
Dip6_vti.c746 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vti6_ioctl()
778 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vti6_ioctl()
Dip6_flowlabel.c571 ns_capable(net->user_ns, CAP_NET_ADMIN)) { in ipv6_flowlabel_opt()
Dip6_tunnel.c1486 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip6_tnl_ioctl()
1522 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip6_tnl_ioctl()
Dip6_gre.c1086 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip6gre_tunnel_ioctl()
1135 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip6gre_tunnel_ioctl()
Dip6mr.c1671 if (sk != mrt->mroute6_sk && !ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip6_mroute_setsockopt()
Daddrconf.c2772 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in addrconf_add_ifaddr()
2791 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in addrconf_del_ifaddr()
Droute.c2412 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipv6_route_ioctl()
/linux-4.4.14/net/ipv4/netfilter/
Darp_tables.c1444 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_arpt_set_ctl()
1585 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_arpt_get_ctl()
1606 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_arpt_set_ctl()
1630 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_arpt_get_ctl()
Dip_tables.c1716 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_ipt_set_ctl()
1825 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_ipt_get_ctl()
1847 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ipt_set_ctl()
1872 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ipt_get_ctl()
/linux-4.4.14/net/ipv6/netfilter/
Dip6_tables.c1718 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_ip6t_set_ctl()
1827 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in compat_do_ip6t_get_ctl()
1849 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ip6t_set_ctl()
1874 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ip6t_get_ctl()
/linux-4.4.14/net/bridge/netfilter/
Debtables.c1487 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in do_ebt_set_ctl()
1510 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in do_ebt_get_ctl()
2296 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in compat_do_ebt_set_ctl()
2320 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in compat_do_ebt_get_ctl()
/linux-4.4.14/fs/
Dnamespace.c1584 return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); in may_mount()
3313 if (!ns_capable(mnt_ns->user_ns, CAP_SYS_ADMIN) || in mntns_install()
3314 !ns_capable(current_user_ns(), CAP_SYS_CHROOT) || in mntns_install()
3315 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in mntns_install()
Dopen.c484 if (!ns_capable(current_user_ns(), CAP_SYS_CHROOT)) in SYSCALL_DEFINE1()
Dinode.c1963 if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid)) in inode_owner_or_capable()
/linux-4.4.14/net/netlink/
Daf_netlink.c1400 ns_capable(user_ns, cap); in __netlink_ns_capable()
1455 ns_capable(sock_net(sock->sk)->user_ns, CAP_NET_ADMIN); in netlink_allowed()
2302 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_BROADCAST)) in netlink_setsockopt()
/linux-4.4.14/drivers/net/
Dtun.c477 !ns_capable(net->user_ns, CAP_NET_ADMIN); in tun_not_capable()
1656 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in tun_set_iff()
/linux-4.4.14/net/llc/
Daf_llc.c163 if (!ns_capable(net->user_ns, CAP_NET_RAW)) in llc_ui_create()
/linux-4.4.14/net/sctp/
Dsocket.c364 !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) in sctp_do_bind()
1154 !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) { in __sctp_connect()
1818 !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) { in sctp_sendmsg()
/linux-4.4.14/net/netfilter/ipvs/
Dip_vs_ctl.c2322 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ip_vs_set_ctl()
2640 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in do_ip_vs_get_ctl()
/linux-4.4.14/net/netfilter/ipset/
Dip_set_core.c1892 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ip_set_sockfn_get()
/linux-4.4.14/drivers/net/bonding/
Dbond_main.c3386 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in bond_do_ioctl()
/linux-4.4.14/net/packet/
Daf_packet.c3054 if (!ns_capable(net->user_ns, CAP_NET_RAW)) in packet_create()
/linux-4.4.14/net/key/
Daf_key.c144 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in pfkey_create()
/linux-4.4.14/kernel/sched/
Dcore.c4433 if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { in sched_setaffinity()