summaryrefslogtreecommitdiffstats
path: root/xlators/system
diff options
context:
space:
mode:
authorSantosh Kumar Pradhan <spradhan@redhat.com>2013-12-04 08:25:07 +0530
committerVijay Bellur <vbellur@redhat.com>2013-12-05 10:36:11 -0800
commit3c68dc35611f75a7d401f9b61d3b40cd6cc90968 (patch)
treeebb33c8cdbb145abe0fdfdc3914334adf8e600a1 /xlators/system
parente3873729d820c0c2e63bb3bb878c39d79a16acf5 (diff)
gNFS: Inconsistent behaviour of setfacl/getfacl
The permissions returned by NFS ACL are wrong, which are rejected by NFS client as "Invalid argument". Refactor the NFS ACL code to return the proper permissions which would match with the requested permissions. Upstream master review: http://review.gluster.org/6368 Change-Id: Ieb079b5da98b061291b44655e18a1dee92a8e463 BUG: 1035218 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6418 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/system')
-rw-r--r--xlators/system/posix-acl/src/posix-acl-xattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl-xattr.c b/xlators/system/posix-acl/src/posix-acl-xattr.c
index cc0937c5edf..3c8826568ca 100644
--- a/xlators/system/posix-acl/src/posix-acl-xattr.c
+++ b/xlators/system/posix-acl/src/posix-acl-xattr.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2011-2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2011-2013 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
@@ -67,7 +67,7 @@ posix_acl_from_xattr (xlator_t *this, const char *xattr_buf, int xattr_size)
header = (struct posix_acl_xattr_header *) (xattr_buf);
entry = (struct posix_acl_xattr_entry *) (header + 1);
- if (header->version != htole32 (POSIX_ACL_VERSION))
+ if (header->version != htole32 (POSIX_ACL_XATTR_VERSION))
return NULL;
acl = posix_acl_new (this, count);
@@ -129,7 +129,7 @@ posix_acl_to_xattr (xlator_t *this, struct posix_acl *acl, char *xattr_buf,
entry = (struct posix_acl_xattr_entry *) (header + 1);
ace = acl->entries;
- header->version = htole32 (POSIX_ACL_VERSION);
+ header->version = htole32 (POSIX_ACL_XATTR_VERSION);
for (i = 0; i < acl->count; i++) {
entry->tag = htole16 (ace->tag);