diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-05 12:23:23 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-07 16:39:25 +0200 |
commit | aa58e216c1f794bd335151f19e79adbb3ddf4c73 (patch) | |
tree | 38fec6833dacfe45be3314ddb5a87464ece15e83 /src/providers/ldap/ldap_id_services.c | |
parent | c82789aad172d7ebd9f616510bdbe950dccd51ac (diff) | |
download | sssd-aa58e216c1f794bd335151f19e79adbb3ddf4c73.tar.gz sssd-aa58e216c1f794bd335151f19e79adbb3ddf4c73.tar.xz sssd-aa58e216c1f794bd335151f19e79adbb3ddf4c73.zip |
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 <sbose@redhat.com>
Diffstat (limited to 'src/providers/ldap/ldap_id_services.c')
-rw-r--r-- | src/providers/ldap/ldap_id_services.c | 7 |
1 files 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; } |