]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/core/net_namespace.c
Merge tag 'stable/for-linus-3.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / net / core / net_namespace.c
index 2e9a3132b8dd11ac8a9851e8042d8982af9c20ef..8acce01b6dab90dede80bfb4bed6b4ce4a965108 100644 (file)
@@ -649,7 +649,8 @@ static int netns_install(struct nsproxy *nsproxy, void *ns)
 {
        struct net *net = ns;
 
-       if (!ns_capable(net->user_ns, CAP_SYS_ADMIN))
+       if (!ns_capable(net->user_ns, CAP_SYS_ADMIN) ||
+           !nsown_capable(CAP_SYS_ADMIN))
                return -EPERM;
 
        put_net(nsproxy->net_ns);