I get error messages like
dirmngr[1234.0]: dirmngr_ldap[2345]: binding to `ldap.example.com:389' failed:
Success
"Success" is certainly wrong.
src/dirmngr_ldap.c starting line 576 contains:
if (ldap_simple_bind_s (ld, opt.user, opt.pass))
{
log_error (_("binding to `%s:%d' failed: %s\n"),
host, port, strerror (errno));
/* FIXME: Need deinit (ld)? */
return -1;
}The nature of an error from ldap_simple_bind_s() is not reported by errno but by
the return value. Better write:
rc = ldap_simple_bind_s (ld, opt.user, opt.pass);
if (rc)
{
log_error (_("binding to `%s:%d' failed: %s\n"),
host, port, ldap_err2string (rc));
/* FIXME: Need deinit (ld)? */
return -1;
}Thank you