]> Pileus Git - ~andy/linux/blobdiff - fs/open.c
userns: Kill nsown_capable it makes the wrong thing easy
[~andy/linux] / fs / open.c
index 9156cb050d0873b65e8083671ef0ffdbe1ff1a47..1c9d23f7e683611767cb08d8d6d82150b61727b9 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -443,7 +443,7 @@ retry:
                goto dput_and_out;
 
        error = -EPERM;
-       if (!nsown_capable(CAP_SYS_CHROOT))
+       if (!ns_capable(current_user_ns(), CAP_SYS_CHROOT))
                goto dput_and_out;
        error = security_path_chroot(&path);
        if (error)