aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr_ldap.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-06-14 18:51:22 +0000
committerWerner Koch <[email protected]>2016-06-14 18:51:22 +0000
commitb7e3dfcf139284d30921cf44e7bab43d4244cc37 (patch)
tree76aa5500a7b33483675b954d18a07ec619c2dbc3 /dirmngr/dirmngr_ldap.c
parentdirmngr: Try ldap protocol V3 as fallback (diff)
downloadgnupg-b7e3dfcf139284d30921cf44e7bab43d4244cc37.tar.gz
gnupg-b7e3dfcf139284d30921cf44e7bab43d4244cc37.zip
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
Diffstat (limited to 'dirmngr/dirmngr_ldap.c')
-rw-r--r--dirmngr/dirmngr_ldap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c
index 9e12f88a3..c5702b151 100644
--- a/dirmngr/dirmngr_ldap.c
+++ b/dirmngr/dirmngr_ldap.c
@@ -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 ();