[PATCH] take noexec checks to very few callers that care
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -252,15 +252,6 @@ int permission(struct inode *inode, int mask, struct nameidata *nd)
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) {
|
||||
/*
|
||||
* MAY_EXEC on regular files is denied if the fs is mounted
|
||||
* with the "noexec" flag.
|
||||
*/
|
||||
if (mnt && (mnt->mnt_flags & MNT_NOEXEC))
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
/* Ordinary permission routines do not understand MAY_APPEND. */
|
||||
if (inode->i_op && inode->i_op->permission) {
|
||||
retval = inode->i_op->permission(inode, mask);
|
||||
|
Reference in New Issue
Block a user