From 46ebf4415306454e1d062b61a2495b7cdb821c0f Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Fri, 1 Aug 2014 11:13:20 +0100 Subject: SDAP: nitpicks in sdap_access_filter_get_access_done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed typo and replaced duplicated string by macro definition. Reviewed-by: Pavel Březina --- src/providers/ldap/sdap_access.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/providers/ldap') diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c index 33277e7d1..94c64eff4 100644 --- a/src/providers/ldap/sdap_access.c +++ b/src/providers/ldap/sdap_access.c @@ -40,6 +40,8 @@ #include "providers/data_provider.h" #include "providers/dp_backend.h" +#define MALFORMED_FILTER "Malformed access control filter [%s]\n" + static errno_t sdap_save_user_cache_bool(struct sss_domain_info *domain, const char *username, const char *attr_name, @@ -874,10 +876,8 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq) } else if (dp_error == DP_ERR_OFFLINE) { ret = sdap_access_filter_decide_offline(req); } else if (ret == ERR_INVALID_FILTER) { - sss_log(SSS_LOG_ERR, - "Malformed access control filter [%s]\n", state->filter); - DEBUG(SSSDBG_CRIT_FAILURE, - "Malformed access control filter [%s]\n", state->filter); + sss_log(SSS_LOG_ERR, MALFORMED_FILTER, state->filter); + DEBUG(SSSDBG_CRIT_FAILURE, MALFORMED_FILTER, state->filter); ret = ERR_ACCESS_DENIED; } else { DEBUG(SSSDBG_CRIT_FAILURE, @@ -917,9 +917,7 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq) } if (found) { - /* Save "allow" to the cache for future offline - :q* access checks. - */ + /* Save "allow" to the cache for future offline access checks. */ DEBUG(SSSDBG_TRACE_FUNC, "Access granted by online lookup\n"); ret = EOK; } -- cgit