From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: linux-fsdevel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH 3/3] VFS: Remove redundant open-coded mode bit checks in open_exec().
Date: Wed, 12 Jul 2006 13:50:12 -0400 [thread overview]
Message-ID: <20060712175012.7413.24685.stgit@lade.trondhjem.org> (raw)
In-Reply-To: <20060712175006.7413.91738.stgit@lade.trondhjem.org>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
The check in open_exec() for inode->i_mode & 0111 has been made
redundant by the fix to permission().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
fs/exec.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index a6f64a9..f7aabfe 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -486,8 +486,6 @@ struct file *open_exec(const char *name)
if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
S_ISREG(inode->i_mode)) {
int err = vfs_permission(&nd, MAY_EXEC);
- if (!err && !(inode->i_mode & 0111))
- err = -EACCES;
file = ERR_PTR(err);
if (!err) {
file = nameidata_to_filp(&nd, O_RDONLY);
next prev parent reply other threads:[~2006-07-12 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 17:50 [PATCH 1/3] VFS: Fix access("file", X_OK) in the presence of ACLs Trond Myklebust
2006-07-12 17:50 ` [PATCH 2/3] VFS: Remove redundant open-coded mode bit check in prepare_binfmt() Trond Myklebust
2006-07-12 17:50 ` Trond Myklebust [this message]
2006-07-13 13:59 ` [PATCH 1/3] VFS: Fix access("file", X_OK) in the presence of ACLs Peter Staubach
2006-07-13 14:13 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060712175012.7413.24685.stgit@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).