From a25529a0980b17567060eae8b40524381ca025d3 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 22 May 2015 13:20:06 +0200 Subject: gfapi: zero size issue in glfs_h_acl_set() When setting the stringified ACLs in the xattr dict through pub_glfs_h_setxattrs(), the size of the string is always passed as 0. The correct way is to pass the length of the ACL in text form. Backport of: > Change-Id: Ia7a7fa1f3a7d615a813c703057dc97b09a0bbb34 > BUG: 789278 > Reviewd-on: http://review.gluster.org/10782 > Signed-off-by: Jiffin Tony Thottan Change-Id: Ia7a7fa1f3a7d615a813c703057dc97b09a0bbb34 BUG: 1224241 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/10890 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- xlators/storage/posix/src/posix-helpers.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index e1bd5b127fd..9018a739f83 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -964,6 +964,10 @@ posix_pacl_set (const char *path, const char *key, const char *acl_s) acl = acl_from_text (acl_s); ret = acl_set_file (path, type, acl); + if (ret) + /* posix_handle_pair expects ret to be the errno */ + ret = -errno; + acl_free (acl); return ret; -- cgit