summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c49fed0)
raw | patch | inline | side by side (parent: c49fed0)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Thu, 23 Dec 2010 16:40:20 +0000 (11:40 -0500) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Thu, 23 Dec 2010 16:40:20 +0000 (11:40 -0500) |
NEWS | patch | blob | history | |
plugins/check_ldap.c | patch | blob | history |
index c35299508f59d72fabf7b99d5083f8d7702071e9..e002133ed479c0353ed880c01e4a2a01d4981fa7 100644 (file)
--- a/NEWS
+++ b/NEWS
FIXES
Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603)
check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly (Debian #601696)
- Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds.
+ Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds
+ Fix check_ldap overriding the port when --ssl was specified after -p
1.4.15 27th July 2010
ENHANCEMENTS
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index b933ff280666b17f55515dc877ec232982ce2424..726ffa64ff63f229dad8a5639edddf1aa5ecbe51 100644 (file)
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
char *ld_base = NULL;
char *ld_passwd = NULL;
char *ld_binddn = NULL;
-int ld_port = DEFAULT_PORT;
+int ld_port = -1;
#ifdef HAVE_LDAP_SET_OPTION
int ld_protocol = DEFAULT_PROTOCOL;
#endif
case 'S':
if (! starttls) {
ssl_on_connect = TRUE;
- ld_port = LDAPS_PORT;
+ if (ld_port == -1)
+ ld_port = LDAPS_PORT;
} else
usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls");
break;
if (ld_base == NULL && argv[c])
ld_base = strdup (argv[c++]);
+ if (ld_port == -1)
+ ld_port = DEFAULT_PORT;
+
return validate_arguments ();
}