diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-03-02 08:54:15 +0100 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-03-07 06:23:18 -0800 |
commit | 4a49d0bf260d000aeae185f9f21f589a6ee01618 (patch) | |
tree | 2c307b8a9eba9ea65b41f81e5ed529578aaaeae3 | |
parent | 2d45a5557f9e6a797e39d3383d851e8812fa91c0 (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.
Cherry picked from commit 4f143bfe4eabc34c5682a3b0421092e5e22ee507:
> 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>
BUG: 1197598
Change-Id: I100a05706038753f2036968870d86911b830ca14
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9780
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-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 b00e8170ebd..3ffbd4a690e 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 */ |