From 4f143bfe4eabc34c5682a3b0421092e5e22ee507 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 27 Feb 2015 23:47:26 +0100 Subject: nfs: prevent logging missing 'system.posix_acl_*' xattrs The nfs.log gets spammed with messages that the system.posix_acl_access and system.posix_acl_default xattrs are not set. The logging happens because the dictionary that contains the xattrs is empty/NULL in case the getxattr() did not return any contents for the ACLs. Change-Id: Id31e30635146599915c6d8674a2dde065f348adc BUG: 1197253 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/9773 Tested-by: Gluster Build System Reviewed-by: Meghana M --- xlators/nfs/server/src/acl3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c index b1e5d95d087..39eee0b265e 100644 --- a/xlators/nfs/server/src/acl3.c +++ b/xlators/nfs/server/src/acl3.c @@ -336,9 +336,12 @@ acl3_default_getacl_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if ((op_ret < 0) && (op_errno != ENODATA && op_errno != ENOATTR)) { stat = nfs3_cbk_errno_status (op_ret, op_errno); goto err; + } else if (!dict) { + /* no ACL has been set */ + stat = NFS3_OK; + goto err; } - getaclreply->daclentry.daclentry_val = cs->daclentry; /* getfacl: NFS DEFAULT ACL */ -- cgit