summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_id_services.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-07-05 12:23:23 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-07 16:39:25 +0200
commitaa58e216c1f794bd335151f19e79adbb3ddf4c73 (patch)
tree38fec6833dacfe45be3314ddb5a87464ece15e83 /src/providers/ldap/ldap_id_services.c
parentc82789aad172d7ebd9f616510bdbe950dccd51ac (diff)
downloadsssd-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.c7
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;
}