From e4b9a74f46bca3894d686ce87042168c4304f07b Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Wed, 27 Nov 2013 15:50:21 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/6368 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/system/posix-acl/src/posix-acl-xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/system') diff --git a/xlators/system/posix-acl/src/posix-acl-xattr.c b/xlators/system/posix-acl/src/posix-acl-xattr.c index cc0937c5e..3c8826568 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. + Copyright (c) 2011-2013 Red Hat, Inc. 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); -- cgit