diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-11-15 22:03:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-18 20:33:37 -0500 |
commit | 3594698a1fb8e5ae60a92c72ce9ca280256939a7 (patch) | |
tree | 54360b8a85136ebfeb10f76cfa207a23fb6035e9 /net/ipv6 | |
parent | b51642f6d77b131dc85d1d71029c3cbb5b07c262 (diff) |
net: Make CAP_NET_BIND_SERVICE per user namespace
Allow privileged users in any user namespace to bind to
privileged sockets in network namespaces they control.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 4b29f6b52c11..b043c60429bd 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -283,7 +283,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
283 | return -EINVAL; | 283 | return -EINVAL; |
284 | 284 | ||
285 | snum = ntohs(addr->sin6_port); | 285 | snum = ntohs(addr->sin6_port); |
286 | if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) | 286 | if (snum && snum < PROT_SOCK && !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) |
287 | return -EACCES; | 287 | return -EACCES; |
288 | 288 | ||
289 | lock_sock(sk); | 289 | lock_sock(sk); |