[Nagiosplug-devel] [ nagiosplug-Bugs-1985317 ] check_ldap fails to report actual LDAP errors
SourceForge.net
noreply at sourceforge.net
Thu Jun 5 12:47:18 CEST 2008
Bugs item #1985317, was opened at 2008-06-05 12:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985317&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Wagner (cyco_dd)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ldap fails to report actual LDAP errors
Initial Comment:
The following Bugreport we got against our debian package:
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.
You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425137
Thanks and kind regards, Jan.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985317&group_id=29880
More information about the Devel
mailing list