diff options
author | Meghana Madhusudhan <mmadhusu@redhat.com> | 2014-11-10 15:20:51 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-01-02 01:26:52 -0800 |
commit | 0111ab923dd4c8f0985dd566c172cda31492b0f7 (patch) | |
tree | 77eb1f1609ee4f50a48121745dc537032c154a9d /xlators/system | |
parent | 8df622789ff991eba1ea01c7f8aa50ac6e507b31 (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: 1177899
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9085
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: http://review.gluster.org/9369
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/system')
-rw-r--r-- | xlators/system/posix-acl/src/posix-acl.c | 2 |
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 947c71c7707..87d1e75ef9b 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -1962,11 +1962,13 @@ posix_acl_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, goto green; else goto red; + green: STACK_WIND (frame, posix_acl_getxattr_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->getxattr, loc, name, xdata); return 0; + red: STACK_UNWIND_STRICT (getxattr, frame, -1, EACCES, NULL, xdata); |