summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLorenz <12514511+RincewindsHat@users.noreply.github.com>2023-04-14 22:02:42 +0200
committerGitHub <noreply@github.com>2023-04-14 22:02:42 +0200
commitaff54257822a507121aaaee0b6b8cdfdef41b615 (patch)
treeabfb970cab5f7bfed94fe0b70ddfc37ed24cc567 /plugins
parente44dcb80f1fdab2751cd460325391676e4f1a466 (diff)
parent0f3703e641f0f995a8abb40056cb5430b6c228c4 (diff)
downloadmonitoring-plugins-aff54257822a507121aaaee0b6b8cdfdef41b615.tar.gz
Merge pull request #1864 from waja/seperated_typo
Fix typos
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c6
-rw-r--r--plugins/check_disk.c6
-rw-r--r--plugins/check_dns.c2
-rw-r--r--plugins/check_fping.c2
-rw-r--r--plugins/check_http.c4
-rw-r--r--plugins/check_ldap.c2
-rw-r--r--plugins/check_load.c2
-rw-r--r--plugins/check_ntp.c10
-rw-r--r--plugins/check_ntp_peer.c8
-rw-r--r--plugins/check_ntp_time.c2
-rw-r--r--plugins/check_procs.c4
-rw-r--r--plugins/check_real.c4
-rw-r--r--plugins/check_smtp.c2
-rw-r--r--plugins/check_snmp.c2
-rw-r--r--plugins/check_swap.c2
-rw-r--r--plugins/check_tcp.c2
-rw-r--r--plugins/check_ups.c2
-rw-r--r--plugins/picohttpparser/picohttpparser.c4
-rw-r--r--plugins/popen.c2
-rw-r--r--plugins/runcmd.c2
-rw-r--r--plugins/t/check_by_ssh.t18
-rw-r--r--plugins/t/check_disk.t12
-rw-r--r--plugins/t/check_http.t6
-rw-r--r--plugins/t/check_mysql.t6
-rw-r--r--plugins/t/check_mysql_query.t2
-rw-r--r--plugins/t/check_nagios.t2
-rw-r--r--plugins/t/negate.t2
-rwxr-xr-xplugins/tests/check_snmp.t4
-rw-r--r--plugins/utils.h2
29 files changed, 62 insertions, 62 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index c51914a9..be5740d7 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -618,7 +618,7 @@ check_http (void)
618 618
619#ifdef LIBCURL_FEATURE_SSL 619#ifdef LIBCURL_FEATURE_SSL
620 620
621 /* set SSL version, warn about unsecure or unsupported versions */ 621 /* set SSL version, warn about insecure or unsupported versions */
622 if (use_ssl) { 622 if (use_ssl) {
623 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_SSLVERSION, ssl_version), "CURLOPT_SSLVERSION"); 623 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_SSLVERSION, ssl_version), "CURLOPT_SSLVERSION");
624 } 624 }
@@ -986,7 +986,7 @@ GOT_FIRST_CERT:
986 } 986 }
987 } else { 987 } else {
988 /* this is a specific code in the command line to 988 /* this is a specific code in the command line to
989 * be returned when a redirection is encoutered 989 * be returned when a redirection is encountered
990 */ 990 */
991 } 991 }
992 result = max_state_alt (onredirect, result); 992 result = max_state_alt (onredirect, result);
@@ -2051,7 +2051,7 @@ print_usage (void)
2051 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname); 2051 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname);
2052 printf (" [-J <client certificate file>] [-K <private key>] [--ca-cert <CA certificate file>] [-D]\n"); 2052 printf (" [-J <client certificate file>] [-K <private key>] [--ca-cert <CA certificate file>] [-D]\n");
2053 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n"); 2053 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n");
2054 printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport|curl>]\n"); 2054 printf (" [-b proxy_auth] [-f <ok|warning|critical|follow|sticky|stickyport|curl>]\n");
2055 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); 2055 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
2056 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); 2056 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
2057 printf (" [-A string] [-k string] [-S <version>] [--sni]\n"); 2057 printf (" [-A string] [-k string] [-S <version>] [--sni]\n");
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index bd84c825..a99f35e3 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -587,7 +587,7 @@ process_arguments (int argc, char **argv)
587 587
588 /* Awful mistake where the range values do not make sense. Normally, 588 /* Awful mistake where the range values do not make sense. Normally,
589 you alert if the value is within the range, but since we are using 589 you alert if the value is within the range, but since we are using
590 freespace, we have to alert if outside the range. Thus we artifically 590 freespace, we have to alert if outside the range. Thus we artificially
591 force @ at the beginning of the range, so that it is backwards compatible 591 force @ at the beginning of the range, so that it is backwards compatible
592 */ 592 */
593 case 'c': /* critical threshold */ 593 case 'c': /* critical threshold */
@@ -1115,7 +1115,7 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
1115 p->available_to_root = fsp->fsu_bfree; 1115 p->available_to_root = fsp->fsu_bfree;
1116 p->used = fsp->fsu_blocks - fsp->fsu_bfree; 1116 p->used = fsp->fsu_blocks - fsp->fsu_bfree;
1117 if (freespace_ignore_reserved) { 1117 if (freespace_ignore_reserved) {
1118 /* option activated : we substract the root-reserved space from the total */ 1118 /* option activated : we subtract the root-reserved space from the total */
1119 p->total = fsp->fsu_blocks - p->available_to_root + p->available; 1119 p->total = fsp->fsu_blocks - p->available_to_root + p->available;
1120 } else { 1120 } else {
1121 /* default behaviour : take all the blocks into account */ 1121 /* default behaviour : take all the blocks into account */
@@ -1130,7 +1130,7 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
1130 p->inodes_free_to_root = fsp->fsu_ffree; /* Free file nodes for root. */ 1130 p->inodes_free_to_root = fsp->fsu_ffree; /* Free file nodes for root. */
1131 p->inodes_used = fsp->fsu_files - fsp->fsu_ffree; 1131 p->inodes_used = fsp->fsu_files - fsp->fsu_ffree;
1132 if (freespace_ignore_reserved) { 1132 if (freespace_ignore_reserved) {
1133 /* option activated : we substract the root-reserved inodes from the total */ 1133 /* option activated : we subtract the root-reserved inodes from the total */
1134 /* not all OS report fsp->fsu_favail, only the ones with statvfs syscall */ 1134 /* not all OS report fsp->fsu_favail, only the ones with statvfs syscall */
1135 /* for others, fsp->fsu_ffree == fsp->fsu_favail */ 1135 /* for others, fsp->fsu_ffree == fsp->fsu_favail */
1136 p->inodes_total = fsp->fsu_files - p->inodes_free_to_root + p->inodes_free; 1136 p->inodes_total = fsp->fsu_files - p->inodes_free_to_root + p->inodes_free;
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 9de6caf5..7ffce98b 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -75,7 +75,7 @@ main (int argc, char **argv)
75{ 75{
76 char *command_line = NULL; 76 char *command_line = NULL;
77 char input_buffer[MAX_INPUT_BUFFER]; 77 char input_buffer[MAX_INPUT_BUFFER];
78 char *address = NULL; /* comma seperated str with addrs/ptrs (sorted) */ 78 char *address = NULL; /* comma separated str with addrs/ptrs (sorted) */
79 char **addresses = NULL; 79 char **addresses = NULL;
80 int n_addresses = 0; 80 int n_addresses = 0;
81 char *msg = NULL; 81 char *msg = NULL;
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index db433162..6f5656ef 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -73,7 +73,7 @@ int wrta_p = FALSE;
73int 73int
74main (int argc, char **argv) 74main (int argc, char **argv)
75{ 75{
76/* normaly should be int result = STATE_UNKNOWN; */ 76/* normally should be int result = STATE_UNKNOWN; */
77 77
78 int status = STATE_UNKNOWN; 78 int status = STATE_UNKNOWN;
79 int result = 0; 79 int result = 0;
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 8dda046f..8c03bc8b 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -198,7 +198,7 @@ test_file (char *path)
198 198
199/* 199/*
200 * process command-line arguments 200 * process command-line arguments
201 * returns true on succes, false otherwise 201 * returns true on success, false otherwise
202 */ 202 */
203bool process_arguments (int argc, char **argv) 203bool process_arguments (int argc, char **argv)
204{ 204{
@@ -1885,7 +1885,7 @@ print_usage (void)
1885 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname); 1885 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname);
1886 printf (" [-J <client certificate file>] [-K <private key>]\n"); 1886 printf (" [-J <client certificate file>] [-K <private key>]\n");
1887 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n"); 1887 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n");
1888 printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); 1888 printf (" [-b proxy_auth] [-f <ok|warning|critical|follow|sticky|stickyport>]\n");
1889 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); 1889 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
1890 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); 1890 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
1891 printf (" [-A string] [-k string] [-S <version>] [--sni]\n"); 1891 printf (" [-A string] [-k string] [-S <version>] [--sni]\n");
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 845a4f52..a1bfe1be 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -222,7 +222,7 @@ main (int argc, char *argv[])
222 /* reset the alarm handler */ 222 /* reset the alarm handler */
223 alarm (0); 223 alarm (0);
224 224
225 /* calcutate the elapsed time and compare to thresholds */ 225 /* calculate the elapsed time and compare to thresholds */
226 226
227 microsec = deltime (tv); 227 microsec = deltime (tv);
228 elapsed_time = (double)microsec / 1.0e6; 228 elapsed_time = (double)microsec / 1.0e6;
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 00f7c877..313df8ad 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -107,7 +107,7 @@ main (int argc, char **argv)
107 int i; 107 int i;
108 long numcpus; 108 long numcpus;
109 109
110 double la[3] = { 0.0, 0.0, 0.0 }; /* NetBSD complains about unitialized arrays */ 110 double la[3] = { 0.0, 0.0, 0.0 }; /* NetBSD complains about uninitialized arrays */
111#ifndef HAVE_GETLOADAVG 111#ifndef HAVE_GETLOADAVG
112 char input_buffer[MAX_INPUT_BUFFER]; 112 char input_buffer[MAX_INPUT_BUFFER];
113# ifdef HAVE_PROC_LOADAVG 113# ifdef HAVE_PROC_LOADAVG
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 8b776ba1..36146505 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -10,7 +10,7 @@
10* 10*
11* This file contains the check_ntp plugin 11* This file contains the check_ntp plugin
12* 12*
13* This plugin to check ntp servers independant of any commandline 13* This plugin to check ntp servers independent of any commandline
14* programs or external libraries. 14* programs or external libraries.
15* 15*
16* 16*
@@ -79,7 +79,7 @@ typedef struct {
79/* this structure holds data about results from querying offset from a peer */ 79/* this structure holds data about results from querying offset from a peer */
80typedef struct { 80typedef struct {
81 time_t waiting; /* ts set when we started waiting for a response */ 81 time_t waiting; /* ts set when we started waiting for a response */
82 int num_responses; /* number of successfully recieved responses */ 82 int num_responses; /* number of successfully received responses */
83 uint8_t stratum; /* copied verbatim from the ntp_message */ 83 uint8_t stratum; /* copied verbatim from the ntp_message */
84 double rtdelay; /* converted from the ntp_message */ 84 double rtdelay; /* converted from the ntp_message */
85 double rtdisp; /* converted from the ntp_message */ 85 double rtdisp; /* converted from the ntp_message */
@@ -100,7 +100,7 @@ typedef struct {
100 /* NB: not necessarily NULL terminated! */ 100 /* NB: not necessarily NULL terminated! */
101} ntp_control_message; 101} ntp_control_message;
102 102
103/* this is an association/status-word pair found in control packet reponses */ 103/* this is an association/status-word pair found in control packet responses */
104typedef struct { 104typedef struct {
105 uint16_t assoc; 105 uint16_t assoc;
106 uint16_t status; 106 uint16_t status;
@@ -575,7 +575,7 @@ double jitter_request(int *status){
575 } 575 }
576 } 576 }
577 } 577 }
578 if(verbose) printf("%d candiate peers available\n", num_candidates); 578 if(verbose) printf("%d candidate peers available\n", num_candidates);
579 if(verbose && syncsource_found) printf("synchronization source found\n"); 579 if(verbose && syncsource_found) printf("synchronization source found\n");
580 if(! syncsource_found){ 580 if(! syncsource_found){
581 *status = STATE_UNKNOWN; 581 *status = STATE_UNKNOWN;
@@ -597,7 +597,7 @@ double jitter_request(int *status){
597 /* By spec, putting the variable name "jitter" in the request 597 /* By spec, putting the variable name "jitter" in the request
598 * should cause the server to provide _only_ the jitter value. 598 * should cause the server to provide _only_ the jitter value.
599 * thus reducing net traffic, guaranteeing us only a single 599 * thus reducing net traffic, guaranteeing us only a single
600 * datagram in reply, and making intepretation much simpler 600 * datagram in reply, and making interpretation much simpler
601 */ 601 */
602 /* Older servers doesn't know what jitter is, so if we get an 602 /* Older servers doesn't know what jitter is, so if we get an
603 * error on the first pass we redo it with "dispersion" */ 603 * error on the first pass we redo it with "dispersion" */
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 6842842f..eafafdc0 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -86,7 +86,7 @@ typedef struct {
86 /* NB: not necessarily NULL terminated! */ 86 /* NB: not necessarily NULL terminated! */
87} ntp_control_message; 87} ntp_control_message;
88 88
89/* this is an association/status-word pair found in control packet reponses */ 89/* this is an association/status-word pair found in control packet responses */
90typedef struct { 90typedef struct {
91 uint16_t assoc; 91 uint16_t assoc;
92 uint16_t status; 92 uint16_t status;
@@ -189,7 +189,7 @@ setup_control_request(ntp_control_message *p, uint8_t opcode, uint16_t seq){
189} 189}
190 190
191/* This function does all the actual work; roughly here's what it does 191/* This function does all the actual work; roughly here's what it does
192 * beside setting the offest, jitter and stratum passed as argument: 192 * beside setting the offset, jitter and stratum passed as argument:
193 * - offset can be negative, so if it cannot get the offset, offset_result 193 * - offset can be negative, so if it cannot get the offset, offset_result
194 * is set to UNKNOWN, otherwise OK. 194 * is set to UNKNOWN, otherwise OK.
195 * - jitter and stratum are set to -1 if they cannot be retrieved so any 195 * - jitter and stratum are set to -1 if they cannot be retrieved so any
@@ -306,7 +306,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji
306 /* Putting the wanted variable names in the request 306 /* Putting the wanted variable names in the request
307 * cause the server to provide _only_ the requested values. 307 * cause the server to provide _only_ the requested values.
308 * thus reducing net traffic, guaranteeing us only a single 308 * thus reducing net traffic, guaranteeing us only a single
309 * datagram in reply, and making intepretation much simpler 309 * datagram in reply, and making interpretation much simpler
310 */ 310 */
311 /* Older servers doesn't know what jitter is, so if we get an 311 /* Older servers doesn't know what jitter is, so if we get an
312 * error on the first pass we redo it with "dispersion" */ 312 * error on the first pass we redo it with "dispersion" */
@@ -585,7 +585,7 @@ int main(int argc, char *argv[]){
585 /* set socket timeout */ 585 /* set socket timeout */
586 alarm (socket_timeout); 586 alarm (socket_timeout);
587 587
588 /* This returns either OK or WARNING (See comment preceeding ntp_request) */ 588 /* This returns either OK or WARNING (See comment proceeding ntp_request) */
589 result = ntp_request(server_address, &offset, &offset_result, &jitter, &stratum, &num_truechimers); 589 result = ntp_request(server_address, &offset, &offset_result, &jitter, &stratum, &num_truechimers);
590 590
591 if(offset_result == STATE_UNKNOWN) { 591 if(offset_result == STATE_UNKNOWN) {
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index 391b2df2..46cc604f 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -81,7 +81,7 @@ typedef struct {
81/* this structure holds data about results from querying offset from a peer */ 81/* this structure holds data about results from querying offset from a peer */
82typedef struct { 82typedef struct {
83 time_t waiting; /* ts set when we started waiting for a response */ 83 time_t waiting; /* ts set when we started waiting for a response */
84 int num_responses; /* number of successfully recieved responses */ 84 int num_responses; /* number of successfully received responses */
85 uint8_t stratum; /* copied verbatim from the ntp_message */ 85 uint8_t stratum; /* copied verbatim from the ntp_message */
86 double rtdelay; /* converted from the ntp_message */ 86 double rtdelay; /* converted from the ntp_message */
87 double rtdisp; /* converted from the ntp_message */ 87 double rtdisp; /* converted from the ntp_message */
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index d672dd44..c17c6996 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -273,7 +273,7 @@ main (int argc, char **argv)
273 } 273 }
274 } 274 }
275 275
276 /* filter kernel threads (childs of KTHREAD_PARENT)*/ 276 /* filter kernel threads (children of KTHREAD_PARENT)*/
277 /* TODO adapt for other OSes than GNU/Linux 277 /* TODO adapt for other OSes than GNU/Linux
278 sorry for not doing that, but I've no other OSes to test :-( */ 278 sorry for not doing that, but I've no other OSes to test :-( */
279 if (kthread_filter == 1) { 279 if (kthread_filter == 1) {
@@ -787,7 +787,7 @@ print_help (void)
787 printf (" %s\n", "-C, --command=COMMAND"); 787 printf (" %s\n", "-C, --command=COMMAND");
788 printf (" %s\n", _("Only scan for exact matches of COMMAND (without path).")); 788 printf (" %s\n", _("Only scan for exact matches of COMMAND (without path)."));
789 printf (" %s\n", "-X, --exclude-process"); 789 printf (" %s\n", "-X, --exclude-process");
790 printf (" %s\n", _("Exclude processes which match this comma seperated list")); 790 printf (" %s\n", _("Exclude processes which match this comma separated list"));
791 printf (" %s\n", "-k, --no-kthreads"); 791 printf (" %s\n", "-k, --no-kthreads");
792 printf (" %s\n", _("Only scan for non kernel threads (works on Linux only).")); 792 printf (" %s\n", _("Only scan for non kernel threads (works on Linux only)."));
793 793
diff --git a/plugins/check_real.c b/plugins/check_real.c
index 0f1a1ba7..fbdb70f3 100644
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
@@ -178,7 +178,7 @@ main (int argc, char **argv)
178 178
179 /* watch for the REAL connection string */ 179 /* watch for the REAL connection string */
180 result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0); 180 result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0);
181 buffer[result] = '\0'; /* null terminate recieved buffer */ 181 buffer[result] = '\0'; /* null terminate received buffer */
182 182
183 /* return a CRITICAL status if we couldn't read any data */ 183 /* return a CRITICAL status if we couldn't read any data */
184 if (result == -1) { 184 if (result == -1) {
@@ -436,7 +436,7 @@ print_help (void)
436 436
437 printf ("\n"); 437 printf ("\n");
438 printf ("%s\n", _("This plugin will attempt to open an RTSP connection with the host.")); 438 printf ("%s\n", _("This plugin will attempt to open an RTSP connection with the host."));
439 printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return")); 439 printf ("%s\n", _("Successful connects return STATE_OK, refusals and timeouts return"));
440 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,")); 440 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,"));
441 printf ("%s\n", _("but incorrect response messages from the host result in STATE_WARNING return")); 441 printf ("%s\n", _("but incorrect response messages from the host result in STATE_WARNING return"));
442 printf ("%s\n", _("values.")); 442 printf ("%s\n", _("values."));
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index c1e92dff..eaa7eeba 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -844,7 +844,7 @@ print_help (void)
844 printf (UT_VERBOSE); 844 printf (UT_VERBOSE);
845 845
846 printf("\n"); 846 printf("\n");
847 printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return")); 847 printf ("%s\n", _("Successful connects return STATE_OK, refusals and timeouts return"));
848 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful")); 848 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful"));
849 printf ("%s\n", _("connects, but incorrect response messages from the host result in")); 849 printf ("%s\n", _("connects, but incorrect response messages from the host result in"));
850 printf ("%s\n", _("STATE_WARNING return values.")); 850 printf ("%s\n", _("STATE_WARNING return values."));
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index aefda3d2..c425df3c 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -1274,7 +1274,7 @@ print_help (void)
1274 printf (" %s\n", "--rate-multiplier"); 1274 printf (" %s\n", "--rate-multiplier");
1275 printf (" %s\n", _("Converts rate per second. For example, set to 60 to convert to per minute")); 1275 printf (" %s\n", _("Converts rate per second. For example, set to 60 to convert to per minute"));
1276 printf (" %s\n", "--offset=OFFSET"); 1276 printf (" %s\n", "--offset=OFFSET");
1277 printf (" %s\n", _("Add/substract the specified OFFSET to numeric sensor data")); 1277 printf (" %s\n", _("Add/subtract the specified OFFSET to numeric sensor data"));
1278 1278
1279 /* Tests Against Strings */ 1279 /* Tests Against Strings */
1280 printf (" %s\n", "-s, --string=STRING"); 1280 printf (" %s\n", "-s, --string=STRING");
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 25d5f21d..05f19ad4 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -552,7 +552,7 @@ validate_arguments (void)
552 } 552 }
553 else if ((warn.is_percentage == crit.is_percentage) && (warn.value < crit.value)) { 553 else if ((warn.is_percentage == crit.is_percentage) && (warn.value < crit.value)) {
554 /* This is NOT triggered if warn and crit are different units, e.g warn is percentage 554 /* This is NOT triggered if warn and crit are different units, e.g warn is percentage
555 * and crit is absolut. We cannot determine the condition at this point since we 555 * and crit is absolute. We cannot determine the condition at this point since we
556 * dont know the value of total swap yet 556 * dont know the value of total swap yet
557 */ 557 */
558 usage4(_("Warning should be more than critical")); 558 usage4(_("Warning should be more than critical"));
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 1365b9cb..1d307cf3 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -128,7 +128,7 @@ main (int argc, char **argv)
128 SERVICE[i] = toupper(SERVICE[i]); 128 SERVICE[i] = toupper(SERVICE[i]);
129 } 129 }
130 130
131 /* set up a resonable buffer at first (will be realloc()'ed if 131 /* set up a reasonable buffer at first (will be realloc()'ed if
132 * user specifies other options) */ 132 * user specifies other options) */
133 server_expect = calloc(sizeof(char *), 2); 133 server_expect = calloc(sizeof(char *), 2);
134 134
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 0de37a20..12bce217 100644
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
@@ -507,7 +507,7 @@ process_arguments (int argc, char **argv)
507 usage2 (_("Invalid hostname/address"), optarg); 507 usage2 (_("Invalid hostname/address"), optarg);
508 } 508 }
509 break; 509 break;
510 case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Farenheit) */ 510 case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Fahrenheit) */
511 temp_output_c = 1; 511 temp_output_c = 1;
512 break; 512 break;
513 case 'u': /* ups name */ 513 case 'u': /* ups name */
diff --git a/plugins/picohttpparser/picohttpparser.c b/plugins/picohttpparser/picohttpparser.c
index d9680b79..d0bfac62 100644
--- a/plugins/picohttpparser/picohttpparser.c
+++ b/plugins/picohttpparser/picohttpparser.c
@@ -400,7 +400,7 @@ int phr_parse_request(const char *buf_start, size_t len, const char **method, si
400 *num_headers = 0; 400 *num_headers = 0;
401 401
402 /* if last_len != 0, check if the request is complete (a fast countermeasure 402 /* if last_len != 0, check if the request is complete (a fast countermeasure
403 againt slowloris */ 403 against slowloris */
404 if (last_len != 0 && is_complete(buf, buf_end, last_len, &r) == NULL) { 404 if (last_len != 0 && is_complete(buf, buf_end, last_len, &r) == NULL) {
405 return r; 405 return r;
406 } 406 }
@@ -435,7 +435,7 @@ static const char *parse_response(const char *buf, const char *buf_end, int *maj
435 } 435 }
436 PARSE_INT_3(status); 436 PARSE_INT_3(status);
437 437
438 /* get message includig preceding space */ 438 /* get message including preceding space */
439 if ((buf = get_token_to_eol(buf, buf_end, msg, msg_len, ret)) == NULL) { 439 if ((buf = get_token_to_eol(buf, buf_end, msg, msg_len, ret)) == NULL) {
440 return NULL; 440 return NULL;
441 } 441 }
diff --git a/plugins/popen.c b/plugins/popen.c
index 9eb49b62..723817d5 100644
--- a/plugins/popen.c
+++ b/plugins/popen.c
@@ -14,7 +14,7 @@
14* FILE * spopen(const char *); 14* FILE * spopen(const char *);
15* int spclose(FILE *); 15* int spclose(FILE *);
16* 16*
17* Code taken with liitle modification from "Advanced Programming for the Unix 17* Code taken with little modification from "Advanced Programming for the Unix
18* Environment" by W. Richard Stevens 18* Environment" by W. Richard Stevens
19* 19*
20* This is considered safe in that no shell is spawned, and the environment 20* This is considered safe in that no shell is spawned, and the environment
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index a7155d27..1bd2ca1f 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -203,7 +203,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr)
203 } 203 }
204 204
205 /* parent picks up execution here */ 205 /* parent picks up execution here */
206 /* close childs descriptors in our address space */ 206 /* close children descriptors in our address space */
207 close(pfd[1]); 207 close(pfd[1]);
208 close(pfderr[1]); 208 close(pfderr[1]);
209 209
diff --git a/plugins/t/check_by_ssh.t b/plugins/t/check_by_ssh.t
index 1d2939e9..b6479f1f 100644
--- a/plugins/t/check_by_ssh.t
+++ b/plugins/t/check_by_ssh.t
@@ -19,19 +19,19 @@ plan skip_all => "SSH_HOST and SSH_IDENTITY must be defined" unless ($ssh_servic
19plan tests => 42; 19plan tests => 42;
20 20
21# Some random check strings/response 21# Some random check strings/response
22my @responce = ('OK: Everything is fine', 22my @response = ('OK: Everything is fine',
23 'WARNING: Hey, pick me, pick me', 23 'WARNING: Hey, pick me, pick me',
24 'CRITICAL: Shit happens', 24 'CRITICAL: Shit happens',
25 'UNKNOWN: What can I do for ya', 25 'UNKNOWN: What can I do for ya',
26 'WOOPS: What did I smoke', 26 'WOOPS: What did I smoke',
27); 27);
28my @responce_re; 28my @response_re;
29my @check; 29my @check;
30for (@responce) { 30for (@response) {
31 push(@check, "echo $_"); 31 push(@check, "echo $_");
32 my $re_str = $_; 32 my $re_str = $_;
33 $re_str =~ s{(.)} { "\Q$1" }ge; 33 $re_str =~ s{(.)} { "\Q$1" }ge;
34 push(@responce_re, $re_str); 34 push(@response_re, $re_str);
35} 35}
36 36
37my $result; 37my $result;
@@ -47,7 +47,7 @@ for (my $i=0; $i<4; $i++) {
47 "./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[$i]; exit $i'" 47 "./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[$i]; exit $i'"
48 ); 48 );
49 cmp_ok($result->return_code, '==', $i, "Exit with return code $i"); 49 cmp_ok($result->return_code, '==', $i, "Exit with return code $i");
50 is($result->output, $responce[$i], "Status text is correct for check $i"); 50 is($result->output, $response[$i], "Status text is correct for check $i");
51} 51}
52 52
53$result = NPTest->testCmd( 53$result = NPTest->testCmd(
@@ -84,7 +84,7 @@ $result = NPTest->testCmd(
84 "./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[4]; exit 8'" 84 "./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[4]; exit 8'"
85 ); 85 );
86cmp_ok($result->return_code, '==', 8, "Exit with return code 8 (out of bounds)"); 86cmp_ok($result->return_code, '==', 8, "Exit with return code 8 (out of bounds)");
87is($result->output, $responce[4], "Return proper status text even with unknown status codes"); 87is($result->output, $response[4], "Return proper status text even with unknown status codes");
88 88
89$result = NPTest->testCmd( 89$result = NPTest->testCmd(
90 "./check_by_ssh -i $ssh_key -H $ssh_service -F $ssh_conf -C 'exit 0'" 90 "./check_by_ssh -i $ssh_key -H $ssh_service -F $ssh_conf -C 'exit 0'"
@@ -108,7 +108,7 @@ my %linemap = (
108foreach my $line (0, 2, 4, 6) { 108foreach my $line (0, 2, 4, 6) {
109 my $code = $linemap{$line}; 109 my $code = $linemap{$line};
110 my $statline = $line+1; 110 my $statline = $line+1;
111 is($lines[$line], "$responce[$code]", "multiple checks status text is correct for line $line"); 111 is($lines[$line], "$response[$code]", "multiple checks status text is correct for line $line");
112 is($lines[$statline], "STATUS CODE: $code", "multiple check status code is correct for line $line"); 112 is($lines[$statline], "STATUS CODE: $code", "multiple check status code is correct for line $line");
113} 113}
114 114
@@ -124,7 +124,7 @@ close(PASV) or die("Unable to close '/tmp/check_by_ssh.$$': $!");
124cmp_ok(scalar(@pasv), '==', 1, 'One passive result for one check performed'); 124cmp_ok(scalar(@pasv), '==', 1, 'One passive result for one check performed');
125for (0) { 125for (0) {
126 if ($pasv[$_]) { 126 if ($pasv[$_]) {
127 like($pasv[$_], '/^\[\d+\] PROCESS_SERVICE_CHECK_RESULT;flint;serv;2;' . $responce_re[2] . '$/', 'proper result for passive check'); 127 like($pasv[$_], '/^\[\d+\] PROCESS_SERVICE_CHECK_RESULT;flint;serv;2;' . $response_re[2] . '$/', 'proper result for passive check');
128 } else { 128 } else {
129 fail('proper result for passive check'); 129 fail('proper result for passive check');
130 } 130 }
@@ -144,7 +144,7 @@ for (0, 1, 2, 3, 4) {
144 if ($pasv[$_]) { 144 if ($pasv[$_]) {
145 my $ret = $_; 145 my $ret = $_;
146 $ret = 9 if ($_ == 4); 146 $ret = 9 if ($_ == 4);
147 like($pasv[$_], '/^\[\d+\] PROCESS_SERVICE_CHECK_RESULT;flint;c' . $_ . ';' . $ret . ';' . $responce_re[$_] . '$/', "proper result for passive check $_"); 147 like($pasv[$_], '/^\[\d+\] PROCESS_SERVICE_CHECK_RESULT;flint;c' . $_ . ';' . $ret . ';' . $response_re[$_] . '$/', "proper result for passive check $_");
148 } else { 148 } else {
149 fail("proper result for passive check $_"); 149 fail("proper result for passive check $_");
150 } 150 }
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
index c8f08f51..ca035ce7 100644
--- a/plugins/t/check_disk.t
+++ b/plugins/t/check_disk.t
@@ -326,19 +326,19 @@ cmp_ok( $result->return_code, '==', 0, "grouping: exit ok if the sum of free meg
326$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all - 1) ." -c ". ($free_mb_on_all - 1) ." -p $mountpoint_valid -g group -p $mountpoint2_valid" ); 326$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all - 1) ." -c ". ($free_mb_on_all - 1) ." -p $mountpoint_valid -g group -p $mountpoint2_valid" );
327cmp_ok( $result->return_code, '==', 3, "Invalid options: -p must come after groupname"); 327cmp_ok( $result->return_code, '==', 3, "Invalid options: -p must come after groupname");
328 328
329# regex: exit unknown if given regex is not compileable 329# regex: exit unknown if given regex is not compilable
330$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -r '('" ); 330$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -r '('" );
331cmp_ok( $result->return_code, '==', 3, "Exit UNKNOWN if regex is not compileable"); 331cmp_ok( $result->return_code, '==', 3, "Exit UNKNOWN if regex is not compilable");
332 332
333# ignore: exit unknown, if all pathes are deselected using -i 333# ignore: exit unknown, if all paths are deselected using -i
334$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '$mountpoint_valid' -i '$mountpoint2_valid'" ); 334$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '$mountpoint_valid' -i '$mountpoint2_valid'" );
335cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored (case sensitive)"); 335cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored (case sensitive)");
336 336
337# ignore: exit unknown, if all pathes are deselected using -I 337# ignore: exit unknown, if all paths are deselected using -I
338$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -I '".uc($mountpoint_valid)."' -I '".uc($mountpoint2_valid)."'" ); 338$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -I '".uc($mountpoint_valid)."' -I '".uc($mountpoint2_valid)."'" );
339cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored (case insensitive)"); 339cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored (case insensitive)");
340 340
341# ignore: exit unknown, if all pathes are deselected using -i 341# ignore: exit unknown, if all paths are deselected using -i
342$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '.*'" ); 342$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '.*'" );
343cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored using -i '.*'"); 343cmp_ok( $result->return_code, '==', 3, "ignore-ereg: Unknown if all fs are ignored using -i '.*'");
344 344
@@ -347,7 +347,7 @@ $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mo
347like( $result->output, qr/$mountpoint_valid/, "output data does have $mountpoint_valid in it"); 347like( $result->output, qr/$mountpoint_valid/, "output data does have $mountpoint_valid in it");
348unlike( $result->output, qr/$mountpoint2_valid/, "output data does not have $mountpoint2_valid in it"); 348unlike( $result->output, qr/$mountpoint2_valid/, "output data does not have $mountpoint2_valid in it");
349 349
350# ignore: test if all pathes are listed when ignore regex doesn't match 350# ignore: test if all paths are listed when ignore regex doesn't match
351$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '^barbazJodsf\$'"); 351$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '^barbazJodsf\$'");
352like( $result->output, qr/$mountpoint_valid/, "ignore: output data does have $mountpoint_valid when regex doesn't match"); 352like( $result->output, qr/$mountpoint_valid/, "ignore: output data does have $mountpoint_valid when regex doesn't match");
353like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mountpoint2_valid when regex doesn't match"); 353like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mountpoint2_valid when regex doesn't match");
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index 1ca52f61..1f2fbdfd 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -178,13 +178,13 @@ SKIP: {
178 178
179 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -u http://$host_tcp_http -e 200,301,302"); 179 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -u http://$host_tcp_http -e 200,301,302");
180 is( $res->return_code, 0, "Proxy HTTP works"); 180 is( $res->return_code, 0, "Proxy HTTP works");
181 like($res->output, qr/OK: Status line output matched/, "Proxy HTTP Output is sufficent"); 181 like($res->output, qr/OK: Status line output matched/, "Proxy HTTP Output is sufficient");
182 182
183 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT"); 183 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT");
184 is( $res->return_code, 0, "Proxy HTTP CONNECT works"); 184 is( $res->return_code, 0, "Proxy HTTP CONNECT works");
185 like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficent"); 185 like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficient");
186 186
187 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT:HEAD"); 187 $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT:HEAD");
188 is( $res->return_code, 0, "Proxy HTTP CONNECT works with override method"); 188 is( $res->return_code, 0, "Proxy HTTP CONNECT works with override method");
189 like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficent"); 189 like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficient");
190} 190}
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t
index e426bf59..baf3acc6 100644
--- a/plugins/t/check_mysql.t
+++ b/plugins/t/check_mysql.t
@@ -5,7 +5,7 @@
5# 5#
6# 6#
7# These are the database permissions required for this test: 7# These are the database permissions required for this test:
8# GRANT SELECT ON $db.* TO $user@$host INDENTIFIED BY '$password'; 8# GRANT SELECT ON $db.* TO $user@$host IDENTIFIED BY '$password';
9# GRANT SUPER, REPLICATION CLIENT ON *.* TO $user@$host; 9# GRANT SUPER, REPLICATION CLIENT ON *.* TO $user@$host;
10# Check with: 10# Check with:
11# mysql -u$user -p$password -h$host $db 11# mysql -u$user -p$password -h$host $db
@@ -23,9 +23,9 @@ plan tests => 15;
23my $bad_login_output = '/Access denied for user /'; 23my $bad_login_output = '/Access denied for user /';
24my $mysqlserver = getTestParameter("NP_MYSQL_SERVER", "A MySQL Server hostname or IP with no slaves setup"); 24my $mysqlserver = getTestParameter("NP_MYSQL_SERVER", "A MySQL Server hostname or IP with no slaves setup");
25my $mysqlsocket = getTestParameter("NP_MYSQL_SOCKET", "Full path to a MySQL Server socket with no slaves setup"); 25my $mysqlsocket = getTestParameter("NP_MYSQL_SOCKET", "Full path to a MySQL Server socket with no slaves setup");
26my $mysql_login_details = getTestParameter("NP_MYSQL_LOGIN_DETAILS", "Command line parameters to specify login access (requires REPLICATION CLIENT privleges)", "-u test -ptest"); 26my $mysql_login_details = getTestParameter("NP_MYSQL_LOGIN_DETAILS", "Command line parameters to specify login access (requires REPLICATION CLIENT privileges)", "-u test -ptest");
27my $with_slave = getTestParameter("NP_MYSQL_WITH_SLAVE", "MySQL server with slaves setup"); 27my $with_slave = getTestParameter("NP_MYSQL_WITH_SLAVE", "MySQL server with slaves setup");
28my $with_slave_login = getTestParameter("NP_MYSQL_WITH_SLAVE_LOGIN", "Login details for server with slave (requires REPLICATION CLIENT privleges)", $mysql_login_details || "-u test -ptest"); 28my $with_slave_login = getTestParameter("NP_MYSQL_WITH_SLAVE_LOGIN", "Login details for server with slave (requires REPLICATION CLIENT privileges)", $mysql_login_details || "-u test -ptest");
29 29
30my $result; 30my $result;
31 31
diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t
index 96899ac6..c30245b2 100644
--- a/plugins/t/check_mysql_query.t
+++ b/plugins/t/check_mysql_query.t
@@ -31,7 +31,7 @@ $result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver $
31cmp_ok( $result->return_code, '==', 0, "Can run query"); 31cmp_ok( $result->return_code, '==', 0, "Can run query");
32 32
33$result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_details"); 33$result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_details");
34cmp_ok( $result->return_code, '==', 3, "Missing query parmeter"); 34cmp_ok( $result->return_code, '==', 3, "Missing query parameter");
35like( $result->output, "/Must specify a SQL query to run/", "Missing query error message"); 35like( $result->output, "/Must specify a SQL query to run/", "Missing query error message");
36 36
37$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql"); 37$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql");
diff --git a/plugins/t/check_nagios.t b/plugins/t/check_nagios.t
index 81fc24d8..f38f5e9c 100644
--- a/plugins/t/check_nagios.t
+++ b/plugins/t/check_nagios.t
@@ -36,7 +36,7 @@ cmp_ok( $result->return_code, '==', 1, "Log over 5 minutes old" );
36like ( $result->output, $warningOutput, "Output for warning correct" ); 36like ( $result->output, $warningOutput, "Output for warning correct" );
37 37
38my $now = time; 38my $now = time;
39# This substitution is dependant on the testcase 39# This substitution is dependent on the testcase
40system( "perl -pe 's/1133537544/$now/' $nagios1 > $nagios1.tmp" ) == 0 or die "Problem with munging $nagios1"; 40system( "perl -pe 's/1133537544/$now/' $nagios1 > $nagios1.tmp" ) == 0 or die "Problem with munging $nagios1";
41 41
42$result = NPTest->testCmd( 42$result = NPTest->testCmd(
diff --git a/plugins/t/negate.t b/plugins/t/negate.t
index d96a109b..5ec1c843 100644
--- a/plugins/t/negate.t
+++ b/plugins/t/negate.t
@@ -84,7 +84,7 @@ foreach my $current_state (keys(%state)) {
84 foreach my $new_state (keys(%state)) { 84 foreach my $new_state (keys(%state)) {
85 $res = NPTest->testCmd( "./negate -s --$current_state=$new_state ./check_dummy ".$state{$current_state}." 'Fake $new_state'" ); 85 $res = NPTest->testCmd( "./negate -s --$current_state=$new_state ./check_dummy ".$state{$current_state}." 'Fake $new_state'" );
86 is( $res->return_code, $state{$new_state}, "Got fake $new_state (with substitute)" ); 86 is( $res->return_code, $state{$new_state}, "Got fake $new_state (with substitute)" );
87 is( $res->output, uc($new_state).": Fake $new_state", "Substitued fake $new_state output"); 87 is( $res->output, uc($new_state).": Fake $new_state", "Substituted fake $new_state output");
88 } 88 }
89} 89}
90 90
diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t
index bc03ec60..bfe42e16 100755
--- a/plugins/tests/check_snmp.t
+++ b/plugins/tests/check_snmp.t
@@ -53,7 +53,7 @@ if ($pid) {
53 #print "child\n"; 53 #print "child\n";
54 54
55 print "Please contact SNMP at: $port_snmp\n"; 55 print "Please contact SNMP at: $port_snmp\n";
56 close(STDERR); # Coment out to debug snmpd problems (most errors sent there are OK) 56 close(STDERR); # Comment out to debug snmpd problems (most errors sent there are OK)
57 exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp"); 57 exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp");
58} 58}
59 59
@@ -227,7 +227,7 @@ is($res->output, 'SNMP OK - "555\"I said\"" | ', "Check string with a double quo
227 227
228$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.15 -r 'CUSTOM CHECK OK'" ); 228$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.15 -r 'CUSTOM CHECK OK'" );
229is($res->return_code, 0, "String check should check whole string, not a parsed number" ); 229is($res->return_code, 0, "String check should check whole string, not a parsed number" );
230is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check witn numbers returns whole string"); 230is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check with numbers returns whole string");
231 231
232$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.16 -w -2: -c -3:" ); 232$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.16 -w -2: -c -3:" );
233is($res->return_code, 0, "Negative integer check OK" ); 233is($res->return_code, 0, "Negative integer check OK" );
diff --git a/plugins/utils.h b/plugins/utils.h
index 5b54da3c..c76b3216 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -7,7 +7,7 @@
7/* The purpose of this package is to provide safer alternatives to C 7/* The purpose of this package is to provide safer alternatives to C
8functions that might otherwise be vulnerable to hacking. This 8functions that might otherwise be vulnerable to hacking. This
9currently includes a standard suite of validation routines to be sure 9currently includes a standard suite of validation routines to be sure
10that an string argument acually converts to its intended type and a 10that an string argument actually converts to its intended type and a
11suite of string handling routine that do their own memory management 11suite of string handling routine that do their own memory management
12in order to resist overflow attacks. In addition, a few functions are 12in order to resist overflow attacks. In addition, a few functions are
13provided to standardize version and error reporting across the entire 13provided to standardize version and error reporting across the entire