diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-02-27 23:47:26 +0100 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-03-01 23:49:45 -0800 |
commit | 4f143bfe4eabc34c5682a3b0421092e5e22ee507 (patch) | |
tree | aeb82acee561331e1aace88de822cac3cac5a5b8 /xlators/nfs/server/src/acl3.c | |
parent | c48cbccfafbcf71aaad4ed7d868dbac609bc34fe (diff) |
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 <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9773
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/acl3.c')
-rw-r--r-- | xlators/nfs/server/src/acl3.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |