path: root/xlators/system
diff options
authorMeghana Madhusudhan <>2014-11-10 15:20:51 +0530
committerNiels de Vos <>2014-11-13 11:58:00 -0800
commit878b30420891c8b00043391cdce90930eaf18795 (patch)
tree5a6e783a4dda30d3020b0a00b482ca7e6f70169a /xlators/system
parentb4597a92ccfebf362c63977bc4bada7b65e28753 (diff)
gNFS: Allow reading ACLs even without read permissions on the file.
When root-squash is enabled or when no permissions are given to a file, NFS threw permission errors. According to the kernel-nfs behaviour, no permissions are required to read ACLs. When no ACLs are set, the system call sys_lgetxattr fails and returns a ENODATA error. This translates to ESERVERFAULT error in NFS. Fuse makes an exception to this error and returns a success case. Similar changes are made here to achieve the expected behaviour. Change-Id: I46b8f5911114eb087a3f8ca4e921b6b41e83f3b3 BUG: 1161092 Signed-off-by: Meghana Madhusudhan <> Signed-off-by: Niels de Vos <> Reviewed-on: Tested-by: Gluster Build System <>
Diffstat (limited to 'xlators/system')
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 500bd6c..0560869 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -1973,11 +1973,13 @@ posix_acl_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
goto green;
goto red;
STACK_WIND (frame, posix_acl_getxattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->getxattr,
loc, name, xdata);
return 0;
STACK_UNWIND_STRICT (getxattr, frame, -1, EACCES, NULL, xdata);