diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-11-16 04:03:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-19 02:32:45 +0100 |
commit | df008c91f83583e662ac54aee00004afc3f1894d (patch) | |
tree | 800fd831c5beb1c4ec00b41d270462d52973a425 /net/llc | |
parent | net: Allow userns root to control ipv6 (diff) | |
download | linux-df008c91f83583e662ac54aee00004afc3f1894d.tar.xz linux-df008c91f83583e662ac54aee00004afc3f1894d.zip |
net: Allow userns root to control llc, netfilter, netlink, packet, and xfrm
Allow an unpriviled user who has created a user namespace, and then
created a network namespace to effectively use the new network
namespace, by reducing capable(CAP_NET_ADMIN) and
capable(CAP_NET_RAW) calls to be ns_capable(net->user_ns,
CAP_NET_ADMIN), or capable(net->user_ns, CAP_NET_RAW) calls.
Allow creation of af_key sockets.
Allow creation of llc sockets.
Allow creation of af_packet sockets.
Allow sending xfrm netlink control messages.
Allow binding to netlink multicast groups.
Allow sending to netlink multicast groups.
Allow adding and dropping netlink multicast groups.
Allow sending to all netlink multicast groups and port ids.
Allow reading the netfilter SO_IP_SET socket option.
Allow sending netfilter netlink messages.
Allow setting and getting ip_vs netfilter socket options.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc')
-rw-r--r-- | net/llc/af_llc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index c2190005a114..88709882c464 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -160,7 +160,7 @@ static int llc_ui_create(struct net *net, struct socket *sock, int protocol, struct sock *sk; int rc = -ESOCKTNOSUPPORT; - if (!capable(CAP_NET_RAW)) + if (!ns_capable(net->user_ns, CAP_NET_RAW)) return -EPERM; if (!net_eq(net, &init_net)) |