diff options
| -rw-r--r-- | api/src/glfs-handleops.c | 4 | ||||
| -rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 4 | 
2 files changed, 6 insertions, 2 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index ae93439984a..c010f0c9a0f 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1987,7 +1987,6 @@ pub_glfs_h_acl_set (struct glfs *fs, struct glfs_object *object,          int ret = -1;          char *acl_s = NULL;          const char *acl_key = NULL; -        ssize_t acl_len = 0;          DECLARE_OLD_THIS; @@ -2007,7 +2006,8 @@ pub_glfs_h_acl_set (struct glfs *fs, struct glfs_object *object,          if (!acl_s)                  goto out; -        ret = pub_glfs_h_setxattrs (fs, object, acl_key, acl_s, acl_len, 0); +        ret = pub_glfs_h_setxattrs (fs, object, acl_key, acl_s, +                                    strlen (acl_s) + 1, 0);          acl_free (acl_s); 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;  | 
