diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-07-16 17:03:11 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-26 10:29:38 -0400 |
commit | 1c446028434a6699c016f690915d758253c4a7f8 (patch) | |
tree | 776c0c23d316c20df310d3e26e0ac365a87ece33 /src/providers | |
parent | 333ba75f87cc393e1101519211965a01667a594e (diff) | |
download | sssd-1c446028434a6699c016f690915d758253c4a7f8.tar.gz sssd-1c446028434a6699c016f690915d758253c4a7f8.tar.xz sssd-1c446028434a6699c016f690915d758253c4a7f8.zip |
Do not add a NULL host parsed from LDAP URI
https://fedorahosted.org/sssd/ticket/911
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/ldap_common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index 17b85c3f0..d2477bcf2 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -841,16 +841,23 @@ int sdap_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx, goto done; } + if (lud->lud_host == NULL) { + DEBUG(2, ("The LDAP URI (%s) did not contain a host name\n", + list[i])); + ldap_free_urldesc(lud); + continue; + } + DEBUG(6, ("Added URI %s\n", list[i])); talloc_steal(service, list[i]); ret = be_fo_add_server(ctx, service->name, lud->lud_host, lud->lud_port, list[i]); + ldap_free_urldesc(lud); if (ret) { goto done; } - ldap_free_urldesc(lud); } ret = be_fo_service_add_callback(memctx, ctx, service->name, |