Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
[sfrench/cifs-2.6.git] / kernel / pid_namespace.c
index 3ccaba5f15c07786213ce12e6b70359e612e1d14..0e5ac162c3a8601bc2135de714ef8ea57292b7ba 100644 (file)
@@ -378,13 +378,14 @@ static void pidns_put(struct ns_common *ns)
        put_pid_ns(to_pid_ns(ns));
 }
 
-static int pidns_install(struct nsproxy *nsproxy, struct ns_common *ns)
+static int pidns_install(struct nsset *nsset, struct ns_common *ns)
 {
+       struct nsproxy *nsproxy = nsset->nsproxy;
        struct pid_namespace *active = task_active_pid_ns(current);
        struct pid_namespace *ancestor, *new = to_pid_ns(ns);
 
        if (!ns_capable(new->user_ns, CAP_SYS_ADMIN) ||
-           !ns_capable(current_user_ns(), CAP_SYS_ADMIN))
+           !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        /*