]> git.hungrycats.org Git - linux/commitdiff
[PATCH] missing checks in exec_permission_light()
authorAlexander Viro <viro@math.psu.edu>
Wed, 1 May 2002 03:04:58 +0000 (20:04 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 1 May 2002 03:04:58 +0000 (20:04 -0700)
Missing checks added...

fs/namei.c

index 407d142e8b9e8597044a45fb95155d3f8a2e89bb..8ed094ea90b020ce7bee45228b10fcf90e26010b 100644 (file)
@@ -324,6 +324,12 @@ static inline int exec_permission_lite(struct inode *inode)
        if (mode & MAY_EXEC)
                return 0;
 
+       if ((inode->i_mode & S_IXUGO) && capable(CAP_DAC_OVERRIDE))
+               return 0;
+
+       if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_READ_SEARCH))
+               return 0;
+
        return -EACCES;
 }