diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | plugins/check_ldap.c | 8 |
2 files changed, 8 insertions, 3 deletions
@@ -8,7 +8,8 @@ This file documents the major additions and syntax changes between releases. | |||
8 | FIXES | 8 | FIXES |
9 | Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603) | 9 | Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603) |
10 | check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly (Debian #601696) | 10 | check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly (Debian #601696) |
11 | Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds. | 11 | Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds |
12 | Fix check_ldap overriding the port when --ssl was specified after -p | ||
12 | 13 | ||
13 | 1.4.15 27th July 2010 | 14 | 1.4.15 27th July 2010 |
14 | ENHANCEMENTS | 15 | ENHANCEMENTS |
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index b933ff28..726ffa64 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c | |||
@@ -58,7 +58,7 @@ char *ld_host = NULL; | |||
58 | char *ld_base = NULL; | 58 | char *ld_base = NULL; |
59 | char *ld_passwd = NULL; | 59 | char *ld_passwd = NULL; |
60 | char *ld_binddn = NULL; | 60 | char *ld_binddn = NULL; |
61 | int ld_port = DEFAULT_PORT; | 61 | int ld_port = -1; |
62 | #ifdef HAVE_LDAP_SET_OPTION | 62 | #ifdef HAVE_LDAP_SET_OPTION |
63 | int ld_protocol = DEFAULT_PROTOCOL; | 63 | int ld_protocol = DEFAULT_PROTOCOL; |
64 | #endif | 64 | #endif |
@@ -341,7 +341,8 @@ process_arguments (int argc, char **argv) | |||
341 | case 'S': | 341 | case 'S': |
342 | if (! starttls) { | 342 | if (! starttls) { |
343 | ssl_on_connect = TRUE; | 343 | ssl_on_connect = TRUE; |
344 | ld_port = LDAPS_PORT; | 344 | if (ld_port == -1) |
345 | ld_port = LDAPS_PORT; | ||
345 | } else | 346 | } else |
346 | usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls"); | 347 | usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls"); |
347 | break; | 348 | break; |
@@ -364,6 +365,9 @@ process_arguments (int argc, char **argv) | |||
364 | if (ld_base == NULL && argv[c]) | 365 | if (ld_base == NULL && argv[c]) |
365 | ld_base = strdup (argv[c++]); | 366 | ld_base = strdup (argv[c++]); |
366 | 367 | ||
368 | if (ld_port == -1) | ||
369 | ld_port = DEFAULT_PORT; | ||
370 | |||
367 | return validate_arguments (); | 371 | return validate_arguments (); |
368 | } | 372 | } |
369 | 373 | ||