From aa58e216c1f794bd335151f19e79adbb3ddf4c73 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 5 Jul 2016 12:23:23 +0200 Subject: LDAP: Lookup services by all protocols unless a protocol is specified The DP refactoring changed the way we handle strings from sbus. We no longer receive NULL strings, but empty strings instead. Reviewed-by: Sumit Bose --- src/providers/ldap/ldap_id_services.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c index 77215127b..401228c20 100644 --- a/src/providers/ldap/ldap_id_services.c +++ b/src/providers/ldap/ldap_id_services.c @@ -89,6 +89,9 @@ services_get_send(TALLOC_CTX *mem_ctx, state->sysdb = sdom->dom->sysdb; state->name = name; state->protocol = protocol; + if (state->protocol != NULL && state->protocol[0] == '\0') { + state->protocol = NULL; + } state->filter_type = filter_type; state->noexist_delete = noexist_delete; @@ -114,8 +117,8 @@ services_get_send(TALLOC_CTX *mem_ctx, ret = sss_filter_sanitize(state, name, &clean_name); if (ret != EOK) goto error; - if (protocol) { - ret = sss_filter_sanitize(state, protocol, &clean_protocol); + if (state->protocol != NULL) { + ret = sss_filter_sanitize(state, state->protocol, &clean_protocol); if (ret != EOK) goto error; } -- cgit