ldap: Improve info output for v3 fallback

* dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an
unprotected section.  Replace log_debug by log_info in verbose mode.
--

GnuPG-bug-id: 2376
This commit is contained in:
Werner Koch 2016-06-14 20:51:22 +02:00
parent f989b6ee0d
commit b7e3dfcf13
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 3 additions and 2 deletions

View File

@ -644,10 +644,11 @@ fetch_ldap (my_opt_t myopt, const char *url, const LDAPURLDesc *ludp)
#ifdef LDAP_VERSION3
if (ret == LDAP_PROTOCOL_ERROR)
{
/* Protocol error could mean that the server only supports v3. */
int version = LDAP_VERSION3;
/* Protocol error could mean that the server only supports v3 */
if (myopt->verbose)
log_info ("protocol error; retrying bind with v3 protocol\n");
npth_unprotect ();
log_debug ("Protocol error, retrying bind with V3 Protocol. \n");
ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &version);
ret = my_ldap_simple_bind_s (ld, myopt->user, myopt->pass);
npth_protect ();