summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b24243c)
raw | patch | inline | side by side (parent: b24243c)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sun, 11 Nov 2007 16:29:05 +0000 (16:29 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sun, 11 Nov 2007 16:29:05 +0000 (16:29 +0000) |
Fix check_cluster blocking some special characters for thresholds ("-", "@", "~")
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1827 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1827 f882894a-f735-0410-b71e-b25c423dba1c
NEWS | patch | blob | history | |
plugins/check_cluster.c | patch | blob | history | |
plugins/check_snmp.c | patch | blob | history |
index 99739a701b4c8dc425edad369d74dfb913c9207d..7a7ef8c01a48f55e25c1acd568048a4e2e02be1c 100644 (file)
--- a/NEWS
+++ b/NEWS
and the offset is unavailable, will return UNKNOWN as well.
NOTE: If jitter thresholds are specified integers it will return CRITICAL if jitter
is "-1" as the default range starts at 0. See Examples in --help output.
+ Fix broken usage2 in check_snmp and check_cluster
+ check_cluster now accept all valid characters in its thresholds ("-", "@", "~")
1.4.10 28th September 2007
Fix check_http buffer overflow vulnerability when following HTTP redirects
index 703fff9702c9e11af75349191afaef1dcc7d9348..f1568d5a393f81aa7769d4bbe1c79346ff428f8f 100644 (file)
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
break;
case 'w': /* warning threshold */
- if (strspn (optarg, "0123456789:,") < strlen (optarg))
- usage2 (_("Invalid warning threshold: %s\n"), optarg);
warn_threshold = strdup(optarg);
break;
case 'c': /* warning threshold */
- if (strspn (optarg, "0123456789:,") < strlen (optarg))
- usage2 (_("Invalid critical threshold: %s\n"), optarg);
crit_threshold = strdup(optarg);
break;
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9fa4a60bf4069bf355c86073ea8127d7ac0ce646..c69e97aa5c00f997e5e5510ff54aaf5f17fec86d 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
/* Test parameters */
case 'c': /* critical time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg))
- usage2 (_("Invalid critical threshold: %s\n"), optarg);
+ usage2 (_("Invalid critical threshold"), optarg);
for (ptr = optarg; ptr && jj < MAX_OIDS; jj++) {
if (llu_getll (&lower_crit_lim[jj], ptr) == 1)
eval_method[jj] |= CRIT_LT;
break;
case 'w': /* warning time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg))
- usage2 (_("Invalid warning threshold: %s\n"), optarg);
+ usage2 (_("Invalid warning threshold"), optarg);
for (ptr = optarg; ptr && ii < MAX_OIDS; ii++) {
if (llu_getll (&lower_warn_lim[ii], ptr) == 1)
eval_method[ii] |= WARN_LT;