Title: #5595: [Backport][ipa-4-9] ipa-kdb: do not use OpenLDAP functions with NULL LDAP
This PR was opened automatically because PR #5581 was pushed to master and backport to
ipa-4-9 is required.
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5595/head:pr5595
git checkout pr5595