From 5faddcb2927a997e05fb34eb270982096d1fe3a4 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 14 Jun 2016 19:20:31 +0200 Subject: [PATCH] dirmngr: Print ldap error if bind fails * 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 --- dirmngr/dirmngr_ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c index 6309413ef..a31b14a6f 100644 --- a/dirmngr/dirmngr_ldap.c +++ b/dirmngr/dirmngr_ldap.c @@ -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; }