From b4dbbe007da003962361c9a2579d1114f71619cc Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 26 Jul 2012 17:16:00 +0530 Subject: acl: enable handling of FMODE_EXEC flag on linux systems, with open(), we can get below flag as per 'linux/fs.h'. /* File is opened for execution with sys_execve / sys_uselib */ Instead of adding '#include , its better to copy this absolute number into other variable because then we have to deal with declaring fmode_t etc etc.. With the fix, we can handle the file with '0711' permissions in the same way as backend linux filesystems. Change-Id: Ib1097fc0d2502af89c92d561eb4123cba15713f5 Signed-off-by: Amar Tumballi Reviewed-on: http://review.gluster.com/3739 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Tested-by: Niels de Vos Reviewed-by: Anand Avati --- xlators/system/posix-acl/src/posix-acl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/system/posix-acl') diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index 0962f64044d..f54e20a6970 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -919,6 +919,13 @@ posix_acl_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, switch (flags & O_ACCMODE) { case O_RDONLY: perm = POSIX_ACL_READ; + + /* If O_FMODE_EXEC is present, its good enough + to have '--x' perm, and its not covered in + O_ACCMODE bits */ + if (flags & O_FMODE_EXEC) + perm = POSIX_ACL_EXECUTE; + break; case O_WRONLY: case O_APPEND: -- cgit