[Pkg-gnupg-commit] [gnupg2] 86/102: ldap: Improve info output for v3 fallback

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jun 17 00:14:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit b7e3dfcf139284d30921cf44e7bab43d4244cc37
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jun 14 20:51:22 2016 +0200

    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
---
 dirmngr/dirmngr_ldap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c
index 9e12f88..c5702b1 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 ();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list