lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fuse:rely on fuse_perm for exec when no mode bits set
Date
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
\
 
 \ /
  Last update: 2020-04-01 11:32    [W:1.026 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site