summaryrefslogtreecommitdiffstats
path: root/xlators/system/posix-acl/src
diff options
context:
space:
mode:
authorSantosh Kumar Pradhan <spradhan@redhat.com>2013-11-27 15:50:21 +0530
committerAnand Avati <avati@redhat.com>2013-12-03 15:22:03 -0800
commite4b9a74f46bca3894d686ce87042168c4304f07b (patch)
tree903e4b2ba55fe66aa83d652a7a3e9172c849adf0 /xlators/system/posix-acl/src
parent916785766777ea74c30df17b6e2c572bc1c9a534 (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. Change-Id: I409a6600538a90f2c5c2e8d84657c3b508468fe6 BUG: 1035218 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6368 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/system/posix-acl/src')
-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);