NULL LDAP context in call to ldap_search_ext_s during search

KDC crashes on quite random interval while trying to reach LDAP
    https://pagure.io/freeipa/issue/7017

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Thierry Bordaz 2017-06-20 18:22:33 +02:00 committed by Pavel Vomacka
parent 64375ba65b
commit 0f0423cf53

View File

@ -465,6 +465,12 @@ int ipadb_get_connection(struct ipadb_context *ipactx)
ret = ipadb_reinit_mspac(ipactx, false);
if (ret && ret != ENOENT) {
/* TODO: log that there is an issue with adtrust settings */
if (ipactx->lcontext == NULL) {
/* for some reason ldap connection was reset in ipadb_reinit_mspac
* and is no longer established => failure of ipadb_get_connection
*/
goto done;
}
}
ret = 0;