[Pkg-nagios-devel] Bug#425137: check_ldap fails to report actual LDAP errors
Josip Rodin
joy at debbugs.entuzijast.net
Sat May 19 12:26:30 UTC 2007
Package: nagios-plugins-standard
Version: 1.4.5-1
Hi,
The check_ldap plugin does this:
% /usr/lib/nagios/plugins/check_ldap -H '<validip>' -b '<validdn>'
Could not bind to the ldap-server
Whereas, tethereal reveals that the message received was:
Lightweight Directory Access Protocol
LDAP Message, Bind Result
Message Id: 1
Message Type: Bind Result (0x01)
Message Length: 64
Response To: 4
Time: 0.000067000 seconds
Result Code: protocolError (0x02)
Matched DN: (null)
Error Message: historical protocol version requested, use LDAPv3 instead
Now, why didn't check_ldap communicate that? Because it has this
in the code (plugins/check_ldap.c):
/* bind to the ldap server */
if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) !=
LDAP_SUCCESS) {
/*ldap_perror(ld, "ldap_bind"); */
printf (_("Could not bind to the ldap-server\n"));
return STATE_CRITICAL;
}
How hard was it to put that ldap_perror() string in the printf'ed
error message? :(
A quick grep for ldap_perror shows that there are other occurences of the
same problem in the same file.
Please fix this. TIA.
--
2. That which causes joy or happiness.
More information about the Pkg-nagios-devel
mailing list