userns: user namespaces: convert several capable() calls
[linux-2.6.git] / kernel / nsproxy.c
index ac8a56e..a05d191 100644 (file)
@@ -75,16 +75,11 @@ static struct nsproxy *create_new_namespaces(unsigned long flags,
                goto out_uts;
        }
 
-       new_nsp->ipc_ns = copy_ipcs(flags, tsk->nsproxy->ipc_ns);
+       new_nsp->ipc_ns = copy_ipcs(flags, tsk);
        if (IS_ERR(new_nsp->ipc_ns)) {
                err = PTR_ERR(new_nsp->ipc_ns);
                goto out_ipc;
        }
-       if (new_nsp->ipc_ns != tsk->nsproxy->ipc_ns) {
-               put_user_ns(new_nsp->ipc_ns->user_ns);
-               new_nsp->ipc_ns->user_ns = task_cred_xxx(tsk, user)->user_ns;
-               get_user_ns(new_nsp->ipc_ns->user_ns);
-       }
 
        new_nsp->pid_ns = copy_pid_ns(flags, task_active_pid_ns(tsk));
        if (IS_ERR(new_nsp->pid_ns)) {