]> Pileus Git - ~andy/linux/blobdiff - ipc/namespace.c
userns: Kill nsown_capable it makes the wrong thing easy
[~andy/linux] / ipc / namespace.c
index 7ee61bf449332bbb556f4742e72c8f54c8111d89..4be6581d3b7fa075c3d899e889ce6d09e8fcca86 100644 (file)
@@ -171,7 +171,7 @@ static int ipcns_install(struct nsproxy *nsproxy, void *new)
 {
        struct ipc_namespace *ns = new;
        if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) ||
-           !nsown_capable(CAP_SYS_ADMIN))
+           !ns_capable(current_user_ns(), CAP_SYS_ADMIN))
                return -EPERM;
 
        /* Ditch state from the old ipc namespace */