From 1e10f66eaba32cdf3acede02e155ebf941a3efd6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 28 Aug 2009 10:53:56 -0700 Subject: [PATCH] --- yaml --- r: 157286 b: refs/heads/master c: f1ac9f6bfea6f21e8ab6dbbe46879d62a6fba8c0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 4ffe1a7b6c1b..ca41fa8afbea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b7a437b08a44a3ed7e3a052eb39d2c5f618b603b +refs/heads/master: f1ac9f6bfea6f21e8ab6dbbe46879d62a6fba8c0 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 8c3580610eec..929f535fb225 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -445,13 +445,7 @@ static int exec_permission_lite(struct inode *inode) if (mode & MAY_EXEC) goto ok; - if ((inode->i_mode & S_IXUGO) && capable(CAP_DAC_OVERRIDE)) - goto ok; - - if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_OVERRIDE)) - goto ok; - - if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_READ_SEARCH)) + if (capable(CAP_DAC_OVERRIDE) || capable(CAP_DAC_READ_SEARCH)) goto ok; return -EACCES;