diff options
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index ccd441a2d62..47afed7fdad 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3660,6 +3660,32 @@ posix_getxattr (call_frame_t *frame, xlator_t *this, goto out; } + if (loc->inode && name && GF_POSIX_ACL_REQUEST (name)) { + ret = posix_pacl_get (real_path, name, &value); + if (ret || !value) { + gf_log (this->name, GF_LOG_WARNING, + "could not get acl (%s) for %s: %s", name, + real_path, strerror (errno)); + op_ret = -1; + op_errno = errno; + goto out; + } + + ret = dict_set_dynstr (dict, (char *)name, value); + if (ret < 0) { + GF_FREE (value); + gf_log (this->name, GF_LOG_WARNING, + "could not set acl (%s) for %s in dictionary: " + "(%s)", name, real_path, strerror (errno)); + op_ret = -1; + op_errno = errno; + goto out; + } + + size = ret; + goto done; + } + if (loc->inode && name && (strncmp (name, GF_XATTR_GET_REAL_FILENAME_KEY, strlen (GF_XATTR_GET_REAL_FILENAME_KEY)) == 0)) { |