#50013 Log warn instead of ERR when aci target does not exist.
Closed: wontfix 5 years ago Opened 5 years ago by gparente.

Issue Description

This is something we have very often in IPA context and customers are very often asking why there are errors in the logs:

[31/Oct/2018:05:52:23.436616394 -0400] - ERR - NSACLPlugin - acl_parse - The ACL target cn=groups,cn=compat,dc=cgparente,dc=local does not exist
[31/Oct/2018:05:52:23.438951763 -0400] - ERR - NSACLPlugin - acl_parse - The ACL target cn=computers,cn=compat,dc=cgparente,dc=local does not exist
[31/Oct/2018:05:52:23.441254396 -0400] - ERR - NSACLPlugin - acl_parse - The ACL target cn=ng,cn=compat,dc=cgparente,dc=local does not exist
[31/Oct/2018:05:52:23.443171065 -0400] - ERR - NSACLPlugin - acl_parse - The ACL target ou=sudoers,dc=cgparente,dc=local does not exist

Package Version and Platform

Steps to reproduce

Just define an aci that has a target that does not exist in the database.

Actual results

the message is logged as ERR.

Expected results

We would like to have a WARN


Metadata Update from @gparente:
- Issue assigned to gparente

5 years ago

The fix is rather simple...

diff --git a/ldap/servers/plugins/acl/aclparse.c b/ldap/servers/plugins/acl/aclparse.c
index 6ae7ead..e3741f3 100644
--- a/ldap/servers/plugins/acl/aclparse.c
+++ b/ldap/servers/plugins/acl/aclparse.c
@@ -147,7 +147,7 @@ acl_parse(Slapi_PBlock pb, char str, aci_t aci_item, char *errbuf)
slapi_search_internal_pb(temppb);
slapi_pblock_get(temppb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS) {
- slapi_log_err(SLAPI_LOG_ERR, plugin_name,
+ slapi_log_err(SLAPI_LOG_WARNING, plugin_name,
"acl_parse - The ACL target %s does not exist\n", slapi_sdn_get_dn(&targdn));
}

I will open the PR as soon as possible.

tested in fedora:

[06/Nov/2018:18:38:24.993331896 +0100] - WARN - NSACLPlugin - acl_parse - The ACL target cn=nada,cn=config does not exist

Metadata Update from @gparente:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

5 years ago

Metadata Update from @gparente:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1647133

5 years ago

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

d08102c..58b0daa 389-ds-base-1.3.9 -> 389-ds-base-1.3.9

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3072

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

3 years ago

Login to comment on this ticket.

Metadata