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 --- rpc/xdr/src/glusterfs3.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rpc/xdr') diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h index 186735d24..798413e31 100644 --- a/rpc/xdr/src/glusterfs3.h +++ b/rpc/xdr/src/glusterfs3.h @@ -44,6 +44,8 @@ #define GF_O_LARGEFILE 0100000 +#define GF_O_FMODE_EXEC 040 + #define XLATE_BIT(from, to, bit) do { \ if (from & bit) \ to = to | GF_##bit; \ @@ -102,6 +104,7 @@ gf_flags_from_flags (uint32_t flags) XLATE_BIT (flags, gf_flags, O_CLOEXEC); #endif XLATE_BIT (flags, gf_flags, O_LARGEFILE); + XLATE_BIT (flags, gf_flags, O_FMODE_EXEC); return gf_flags; } @@ -132,6 +135,7 @@ gf_flags_to_flags (uint32_t gf_flags) UNXLATE_BIT (gf_flags, flags, O_CLOEXEC); #endif UNXLATE_BIT (gf_flags, flags, O_LARGEFILE); + UNXLATE_BIT (gf_flags, flags, O_FMODE_EXEC); return flags; } -- cgit