summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd52d7e)
raw | patch | inline | side by side (parent: dd52d7e)
author | Matthias Eble <psychotrahe@gmx.de> | |
Fri, 1 May 2009 09:16:37 +0000 (11:16 +0200) | ||
committer | Matthias Eble <psychotrahe@gmx.de> | |
Fri, 1 May 2009 09:16:37 +0000 (11:16 +0200) |
NEWS | patch | blob | history | |
plugins/check_nt.c | patch | blob | history | |
plugins/tests/check_nt.t | patch | blob | history |
index e9e24a7820528060a89334920b80505c47eb907b..932b21746968c470348a7d0133b073c6b8710c8d 100644 (file)
--- a/NEWS
+++ b/NEWS
check_http --onredirect=sticky follows using the same IP address (sf.net #2550208)
check_http --onredirect=stickyport also follows the same port
Fixed coredump from check_nt when invalid drive is specified (#2179754 - Olli Hauer)
+ Fixed crash from check_nt when -H unspecified or given multiple times (sf.net #2731755, debian #521097)
Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch by John Barbuto)
Fixed check_http sending HTTP/1.0 with v1.1 headers (#2638765)
Fixed check_http not timing-out on redirects
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index ec944e4c45a379d9ac6365414714a5c0247e9a42..d038efe72dd51beeed116be8db8e2027db62aefc 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
print_revision(progname, NP_VERSION);
exit(STATE_OK);
case 'H': /* hostname */
- if (server_address) free(server_address);
server_address = optarg;
break;
case 's': /* password */
}
}
+ if (server_address == NULL)
+ usage4 (_("You must provide a server address or host name"));
if (vars_to_check==CHECK_NONE)
return ERROR;
index d1600c7721eb3f661448ac1549b6146999946b80..223d4933815ef1b65cd5b9df374ae6fa93db89c6 100755 (executable)
--- a/plugins/tests/check_nt.t
+++ b/plugins/tests/check_nt.t
}
if (-x "./check_nt") {
- plan tests => 4;
+ plan tests => 5;
} else {
plan skip_all => "No check_nt compiled";
}
is( $result->return_code, 3, "USEDDISKSPACE d - invalid");
is( $result->output, "Free disk space : Invalid drive", "Output right" );
+$result = NPTest->testCmd( "./check_nt -v USEDDISKSPACE -l d" );
+is( $result->return_code, 3, "Fail if -H missing");
+