Home
last modified time | relevance | path

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

1234

/linux-5.19.10/net/bridge/
Dbr_ioctl.c91 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in add_del_if()
219 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
226 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
233 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
240 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
280 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
287 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
296 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
310 if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) in br_dev_siocdevprivate()
379 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in old_deviceless()
[all …]
/linux-5.19.10/kernel/cgroup/
Dnamespace.c66 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in copy_cgroup_ns()
103 if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) || in cgroupns_install()
104 !ns_capable(cgroup_ns->user_ns, CAP_SYS_ADMIN)) in cgroupns_install()
/linux-5.19.10/include/linux/
Dcapability.h211 extern bool ns_capable(struct user_namespace *ns, int cap);
237 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() function
269 return ns_capable(ns, CAP_CHECKPOINT_RESTORE) || in checkpoint_restore_ns_capable()
270 ns_capable(ns, CAP_SYS_ADMIN); in checkpoint_restore_ns_capable()
/linux-5.19.10/kernel/
Dcapability.c395 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() function
399 EXPORT_SYMBOL(ns_capable);
450 return ns_capable(&init_user_ns, cap); in capable()
510 return ns_capable(ns, cap) && in capable_wrt_inode_uidgid()
Dutsname.c145 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in utsns_install()
146 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in utsns_install()
Dpid_namespace.c381 if (!ns_capable(new->user_ns, CAP_SYS_ADMIN) || in pidns_install()
382 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in pidns_install()
Dnsproxy.c164 } else if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in copy_namespaces()
223 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in unshare_nsproxy_namespaces()
/linux-5.19.10/net/8021q/
Dvlan.c576 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
586 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
595 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
604 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
619 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
626 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in vlan_ioctl_handler()
/linux-5.19.10/ipc/
Dnamespace.c217 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in ipcns_install()
218 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in ipcns_install()
Dutil.c568 !ns_capable(ns->user_ns, CAP_IPC_OWNER)) in ipcperms()
743 ns_capable(ns->user_ns, CAP_SYS_ADMIN)) in ipcctl_obtain_check()
/linux-5.19.10/security/
Dcommoncap.c150 if (ns_capable(child_cred->user_ns, CAP_SYS_PTRACE)) in cap_ptrace_access_check()
560 if (ns_capable(inode->i_sb->s_user_ns, CAP_SETFCAP)) in cap_convert_nscap()
926 if (!ns_capable(new->user_ns, CAP_SETUID) || in cap_bprm_creds_from_file()
1012 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in cap_inode_setxattr()
1056 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in cap_inode_removexattr()
1185 if (!is_subset && !ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) in cap_safe_nice()
1244 if (!ns_capable(current_user_ns(), CAP_SETPCAP)) in cap_prctl_drop()
/linux-5.19.10/net/core/
Dscm.c55 ns_capable(task_active_pid_ns(current)->user_ns, CAP_SYS_ADMIN)) && in scm_check_creds()
57 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
59 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
Ddev_ioctl.c539 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in dev_ioctl()
581 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in dev_ioctl()
Dsock.c166 ns_capable(user_ns, cap); in sk_ns_capable()
631 if (sk->sk_bound_dev_if && !ns_capable(net->user_ns, CAP_NET_RAW)) in sock_bindtoindex_locked()
1166 ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) || in sock_setsockopt()
1167 ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in sock_setsockopt()
1312 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) && in sock_setsockopt()
1313 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) { in sock_setsockopt()
1321 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) && in sock_setsockopt()
1322 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) { in sock_setsockopt()
1443 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) { in sock_setsockopt()
2685 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) && in __sock_cmsg_send()
[all …]
Dsock_diag.c300 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) in sock_diag_destroy()
/linux-5.19.10/fs/
Dattr.c43 ns_capable(inode->i_sb->s_user_ns, CAP_CHOWN)) in chown_ok()
76 ns_capable(inode->i_sb->s_user_ns, CAP_CHOWN)) in chgrp_ok()
Dnamespace.c1691 if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN)) in do_umount()
1765 return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); in may_mount()
2701 if (ns_capable(sb->s_user_ns, CAP_SYS_ADMIN)) { in do_remount()
2769 if (!ns_capable(from->mnt_ns->user_ns, CAP_SYS_ADMIN)) in do_set_group()
2771 if (!ns_capable(to->mnt_ns->user_ns, CAP_SYS_ADMIN)) in do_set_group()
4007 if (!ns_capable(fs_userns, CAP_SYS_ADMIN)) in can_idmap_mount()
4243 if (!ns_capable(mnt_userns, CAP_SYS_ADMIN)) { in build_mount_idmapped()
4652 if (!ns_capable(mnt_ns->user_ns, CAP_SYS_ADMIN) || in mntns_install()
4653 !ns_capable(user_ns, CAP_SYS_CHROOT) || in mntns_install()
4654 !ns_capable(user_ns, CAP_SYS_ADMIN)) in mntns_install()
Dinit.c71 if (!ns_capable(current_user_ns(), CAP_SYS_CHROOT)) in init_chroot()
/linux-5.19.10/security/yama/
Dyama_lsm.c371 !ns_capable(__task_cred(child)->user_ns, CAP_SYS_PTRACE)) in yama_ptrace_access_check()
377 if (!ns_capable(__task_cred(child)->user_ns, CAP_SYS_PTRACE)) in yama_ptrace_access_check()
/linux-5.19.10/net/ipv4/
Dip_options.c396 if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { in __ip_options_compile()
431 if ((!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) || opt->cipso) { in __ip_options_compile()
444 if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { in __ip_options_compile()
/linux-5.19.10/kernel/time/
Dnamespace.c294 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in timens_install()
295 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in timens_install()
/linux-5.19.10/security/keys/
Dpersistent.c149 !ns_capable(ns, CAP_SETUID)) in keyctl_get_persistent()
/linux-5.19.10/net/ieee802154/
Dsocket.c897 if (!ns_capable(net->user_ns, CAP_NET_ADMIN) && in dgram_setsockopt()
898 !ns_capable(net->user_ns, CAP_NET_RAW)) { in dgram_setsockopt()
921 if (!ns_capable(net->user_ns, CAP_NET_ADMIN) && in dgram_setsockopt()
922 !ns_capable(net->user_ns, CAP_NET_RAW)) { in dgram_setsockopt()
/linux-5.19.10/net/ipv6/
Dipv6_sockglue.c330 if (optname != IPV6_RTHDR && !ns_capable(net->user_ns, CAP_NET_RAW)) in ipv6_set_opt_hdr()
637 if (valbool && !ns_capable(net->user_ns, CAP_NET_RAW) && in do_ipv6_setsockopt()
638 !ns_capable(net->user_ns, CAP_NET_ADMIN)) { in do_ipv6_setsockopt()
949 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in do_ipv6_setsockopt()
Ddatagram.c870 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()
890 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()
915 if (!ns_capable(net->user_ns, CAP_NET_RAW)) { in ip6_datagram_send_ctl()

1234