dirmngr: Print ldap error if bind fails
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 14 Jun 2016 17:20:31 +0000 (19:20 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 14 Jun 2016 18:40:42 +0000 (20:40 +0200)
* dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind
return.

--
ldap_simple_bind_s does not set errno.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
dirmngr/dirmngr_ldap.c

index 6309413..a31b14a 100644 (file)
@@ -644,7 +644,7 @@ fetch_ldap (my_opt_t myopt, const char *url, const LDAPURLDesc *ludp)
   if (ret)
     {
       log_error (_("binding to '%s:%d' failed: %s\n"),
-                 host, port, strerror (errno));
+                 host, port, ldap_err2string (ret));
       ldap_unbind (ld);
       return -1;
     }