summaryrefslogtreecommitdiffstats
path: root/xlators/system/posix-acl/src/posix-acl.c
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@gmail.com>2016-02-01 11:02:37 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-02-09 06:33:18 -0800
commitb72172f4516ff5627f15168213a54b171463803f (patch)
tree942e68ef41db810162f4d17901e7bc9d04f321c1 /xlators/system/posix-acl/src/posix-acl.c
parent1f3df9f1e028f6bf978004d7f1d82fe32f6975c9 (diff)
access-control : remove spurious error message from the posix_setxattr_cbk
A check for dictionary is required before calling handling_other_acl_related_xattr() in posix_setxattr_cbk(). Otherwise following message will be poped up on every settxattr call. [2016-01-31 17:38:48.027792] I [dict.c:473:dict_get] (-->/usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (posix_acl_setxattr_cbk+0x26) [0x7f2334c5c166] --> /usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (handling_other_acl_related_xattr+0xb0) [0x7f2334c5c0f0] -->/usr/lib/x86_64-linux-gnu/libglusterfs.so.0(dict_get+0x93) [0x7f233c04b0c3] ) 0-dict: !this || key=system.posix_acl_default [Invalid argument] Change-Id: I93f7e0f764c94dce38bdde95a68341f69a52122d BUG: 1303501 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13325 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/system/posix-acl/src/posix-acl.c')
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index f4527c3b0c8..2edaa408135 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -1947,10 +1947,12 @@ handling_other_acl_related_xattr (xlator_t *this, inode_t *inode, dict_t *xattr)
data_t *data = NULL;
int ret = 0;
+ if (!this || !xattr || !inode)
+ goto out;
+
data = dict_get (xattr, POSIX_ACL_ACCESS_XATTR);
if (data) {
-
acl = posix_acl_from_xattr (this, data->data, data->len);
if (!acl) {
ret = -1;