OSDN Git Service

Merge tag 'kgdb-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt...
[tomoyo/tomoyo-test1.git] / kernel / pid_namespace.c
index 01f8ba3..11db2bd 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;
 
        /*