From: Chakra Divi <chakragithub@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: chakragithub@gmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] fuse:rely on fuse_perm for exec when no mode bits set
Date: Wed, 1 Apr 2020 09:31:14 +0000 [thread overview]
Message-ID: <1585733475-5222-1-git-send-email-chakragithub@gmail.com> (raw)
In current code, for exec we are checking mode bits
for x bit set even though the fuse_perm_getattr returns
success. Changes in this patch avoids mode bit explicit
check, leaves the exec checking to fuse file system
in uspace.
Signed-off-by: Chakra Divi <chakragithub@gmail.com>
---
fs/fuse/dir.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index de1e2fde..7b44c4e 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1196,12 +1196,7 @@ static int fuse_permission(struct inode *inode, int mask)
err = fuse_access(inode, mask);
} else if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) {
if (!(inode->i_mode & S_IXUGO)) {
- if (refreshed)
- return -EACCES;
-
err = fuse_perm_getattr(inode, mask);
- if (!err && !(inode->i_mode & S_IXUGO))
- return -EACCES;
}
}
return err;
--
2.7.4
next reply other threads:[~2020-04-01 9:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 9:31 Chakra Divi [this message]
2020-04-20 11:25 ` [PATCH] fuse:rely on fuse_perm for exec when no mode bits set Miklos Szeredi
2020-04-21 10:51 ` Chakra Divi
2020-04-27 13:46 ` Chakra Divi
2020-04-28 8:21 ` Miklos Szeredi
2020-05-08 10:13 ` Chakra Divi
2020-05-11 12:25 ` Miklos Szeredi
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=1585733475-5222-1-git-send-email-chakragithub@gmail.com \
--to=chakragithub@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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).