diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rwxr-xr-x | NP-VERSION-GEN | 2 | ||||
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/RELEASING | 38 | ||||
-rw-r--r-- | plugins-root/check_icmp.c | 7 | ||||
-rw-r--r-- | plugins/check_apt.c | 2 | ||||
-rw-r--r-- | plugins/check_ntp.c | 25 | ||||
-rw-r--r-- | plugins/check_real.c | 2 | ||||
-rw-r--r-- | plugins/check_tcp.c | 2 |
11 files changed, 41 insertions, 49 deletions
@@ -35,6 +35,7 @@ NP-VERSION-FILE | |||
35 | /build-aux/install-sh | 35 | /build-aux/install-sh |
36 | /build-aux/missing | 36 | /build-aux/missing |
37 | /build-aux/mkinstalldirs | 37 | /build-aux/mkinstalldirs |
38 | /build-aux/test-driver | ||
38 | 39 | ||
39 | # /doc/ | 40 | # /doc/ |
40 | /doc/developer-guidelines.html | 41 | /doc/developer-guidelines.html |
@@ -18,6 +18,14 @@ This file documents the major additions and syntax changes between releases. | |||
18 | changed to comply with the development guidelines | 18 | changed to comply with the development guidelines |
19 | check_ssh not returns CRITICAL for protocal/version errors | 19 | check_ssh not returns CRITICAL for protocal/version errors |
20 | 20 | ||
21 | 2.1.1 2nd December 2014 | ||
22 | FIXES | ||
23 | Fix check_ntp's jitter checking | ||
24 | Fix check_ntp's handling of invalid server responses | ||
25 | Fix check_apt's handling of invalid regular expressions | ||
26 | Fix check_real's server response processing | ||
27 | Fix backslash escaping in check_tcp's --help output | ||
28 | |||
21 | 2.1 15th October 2014 | 29 | 2.1 15th October 2014 |
22 | ENHANCEMENTS | 30 | ENHANCEMENTS |
23 | New check_hpjd -p option for port specification (abrist) | 31 | New check_hpjd -p option for port specification (abrist) |
diff --git a/NP-VERSION-GEN b/NP-VERSION-GEN index 1878eb9..12efad7 100755 --- a/NP-VERSION-GEN +++ b/NP-VERSION-GEN | |||
@@ -6,7 +6,7 @@ | |||
6 | SRC_ROOT=`dirname $0` | 6 | SRC_ROOT=`dirname $0` |
7 | 7 | ||
8 | NPVF=NP-VERSION-FILE | 8 | NPVF=NP-VERSION-FILE |
9 | DEF_VER=2.1.git | 9 | DEF_VER=2.1.1.git |
10 | 10 | ||
11 | LF=' | 11 | LF=' |
12 | ' | 12 | ' |
@@ -333,3 +333,4 @@ Frederic Krueger | |||
333 | Simon Meggle | 333 | Simon Meggle |
334 | Jonas Genannt | 334 | Jonas Genannt |
335 | Nick Peelman | 335 | Nick Peelman |
336 | Sebastian Herbszt | ||
diff --git a/configure.ac b/configure.ac index 3cc3d03..fb8f950 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,6 +1,6 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.59) | 2 | AC_PREREQ(2.59) |
3 | AC_INIT(monitoring-plugins,2.1) | 3 | AC_INIT(monitoring-plugins,2.1.1) |
4 | AC_CONFIG_SRCDIR(NPTest.pm) | 4 | AC_CONFIG_SRCDIR(NPTest.pm) |
5 | AC_CONFIG_FILES([gl/Makefile]) | 5 | AC_CONFIG_FILES([gl/Makefile]) |
6 | AC_CONFIG_AUX_DIR(build-aux) | 6 | AC_CONFIG_AUX_DIR(build-aux) |
diff --git a/doc/RELEASING b/doc/RELEASING index 1eaec9d..eee53d7 100644 --- a/doc/RELEASING +++ b/doc/RELEASING | |||
@@ -1,4 +1,4 @@ | |||
1 | NOTES ON RELEASING NEW VERSION OF NAGIOSPLUG | 1 | NOTES ON RELEASING NEW VERSION OF MONITORING-PLUGINS |
2 | 2 | ||
3 | *** Pre-release | 3 | *** Pre-release |
4 | git pull | 4 | git pull |
@@ -6,25 +6,23 @@ git pull | |||
6 | check compilation, check tinderbox screens | 6 | check compilation, check tinderbox screens |
7 | 7 | ||
8 | *** Prepare and commit files | 8 | *** Prepare and commit files |
9 | Update BUGS, NEWS file | 9 | Update NEWS file |
10 | Update AUTHORS if new members | 10 | Update AUTHORS if new members |
11 | Update configure.in, package.def and NP-VERSION-GEN with version | 11 | Update configure.ac and NP-VERSION-GEN with version |
12 | Run git2cl (get from http://josefsson.org/git2cl/): | 12 | commit NEWS configure.ac NP-VERSION-GEN |
13 | git2cl >Changelog | ||
14 | commit BUGS NEWS configure.in package.def ChangeLog | ||
15 | 13 | ||
16 | *** Create new annotated tag | 14 | *** Create new annotated tag |
17 | git tag -a release-1.4.14 -m release-1.4.14 | 15 | git tag -a v2.1.1 -m v2.1.1 |
18 | 16 | ||
19 | *** Push the code and tag to origin | 17 | *** Push the code and tag to origin |
20 | git push origin master | 18 | git push origin master |
21 | git push origin release-1.4.14 | 19 | git push origin v2.1.1 |
22 | 20 | ||
23 | *** Checkout new version | 21 | *** Checkout new version |
24 | rm -fr /tmp/monitoringlug | 22 | rm -fr /tmp/monitoringlug |
25 | # If you need to checkout the tag, don't forget to "checkout master" later to | 23 | # If you need to checkout the tag, don't forget to "checkout master" later to |
26 | # get back to your development branch: | 24 | # get back to your development branch: |
27 | git checkout tags/release-1.4.14 | 25 | git checkout tags/v2.1.1 |
28 | # Beware: the trailing slash of --prefix is REQUIRED | 26 | # Beware: the trailing slash of --prefix is REQUIRED |
29 | git checkout-index --prefix=/tmp/monitoringlug/ -a | 27 | git checkout-index --prefix=/tmp/monitoringlug/ -a |
30 | 28 | ||
@@ -34,27 +32,7 @@ tools/setup | |||
34 | ./configure | 32 | ./configure |
35 | make dist | 33 | make dist |
36 | 34 | ||
37 | *** Upload generated tarball to sourceforge | 35 | *** Upload generated tarball to our Project Site |
38 | sftp frs.sourceforge.net | ||
39 | SF username and password | ||
40 | cd /uploads | ||
41 | put file | ||
42 | |||
43 | SF -> Submit News about release. Make sure it is called "Monitoring Plugins" (with those caps) | ||
44 | Link to download at http://sourceforge.net/project/showfiles.php?group_id=29880 | ||
45 | Include contents of NEWS for this release | ||
46 | List all people on team involved. | ||
47 | Add acknowledgement to contributors | ||
48 | Submit. Get URL to news item | ||
49 | |||
50 | SF -> Admin -> File Releases | ||
51 | Add a release to nagiosplug and create a file release | ||
52 | Name: 1.4.14 | ||
53 | Create release | ||
54 | Step 1: Add release notes pointing to news item | ||
55 | Step 2: add file | ||
56 | Step 3: *.tar.gz, Platform Independent, Source .gz | ||
57 | Step 4: Send notice | ||
58 | 36 | ||
59 | *** Announce new release | 37 | *** Announce new release |
60 | Send email to help, announce with the news text | 38 | Send email to help, announce with the news text |
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 44c6826..3982def 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -786,7 +786,8 @@ wait_for_reply(int sock, u_int t) | |||
786 | memcpy(&data, icp.icmp_data, sizeof(data)); | 786 | memcpy(&data, icp.icmp_data, sizeof(data)); |
787 | if (debug > 2) | 787 | if (debug > 2) |
788 | printf("ICMP echo-reply of len %lu, id %u, seq %u, cksum 0x%X\n", | 788 | printf("ICMP echo-reply of len %lu, id %u, seq %u, cksum 0x%X\n", |
789 | sizeof(data), ntohs(icp.icmp_id), ntohs(icp.icmp_seq), icp.icmp_cksum); | 789 | (unsigned long)sizeof(data), ntohs(icp.icmp_id), |
790 | ntohs(icp.icmp_seq), icp.icmp_cksum); | ||
790 | 791 | ||
791 | host = table[ntohs(icp.icmp_seq)/packets]; | 792 | host = table[ntohs(icp.icmp_seq)/packets]; |
792 | tdiff = get_timevaldiff(&data.stime, &now); | 793 | tdiff = get_timevaldiff(&data.stime, &now); |
@@ -865,7 +866,9 @@ send_icmp_ping(int sock, struct rta_host *host) | |||
865 | 866 | ||
866 | if (debug > 2) | 867 | if (debug > 2) |
867 | printf("Sending ICMP echo-request of len %lu, id %u, seq %u, cksum 0x%X to host %s\n", | 868 | printf("Sending ICMP echo-request of len %lu, id %u, seq %u, cksum 0x%X to host %s\n", |
868 | sizeof(data), ntohs(packet.icp->icmp_id), ntohs(packet.icp->icmp_seq), packet.icp->icmp_cksum, host->name); | 869 | (unsigned long)sizeof(data), ntohs(packet.icp->icmp_id), |
870 | ntohs(packet.icp->icmp_seq), packet.icp->icmp_cksum, | ||
871 | host->name); | ||
869 | 872 | ||
870 | memset(&iov, 0, sizeof(iov)); | 873 | memset(&iov, 0, sizeof(iov)); |
871 | iov.iov_base = packet.buf; | 874 | iov.iov_base = packet.buf; |
diff --git a/plugins/check_apt.c b/plugins/check_apt.c index 07622c2..8747f90 100644 --- a/plugins/check_apt.c +++ b/plugins/check_apt.c | |||
@@ -224,7 +224,7 @@ int run_upgrade(int *pkgcount, int *secpkgcount){ | |||
224 | char *cmdline=NULL, rerrbuf[64]; | 224 | char *cmdline=NULL, rerrbuf[64]; |
225 | 225 | ||
226 | /* initialize ereg as it is possible it is printed while uninitialized */ | 226 | /* initialize ereg as it is possible it is printed while uninitialized */ |
227 | memset(&ereg, "\0", sizeof(ereg.buffer)); | 227 | memset(&ereg, '\0', sizeof(ereg.buffer)); |
228 | 228 | ||
229 | if(upgrade==NO_UPGRADE) return STATE_OK; | 229 | if(upgrade==NO_UPGRADE) return STATE_OK; |
230 | 230 | ||
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 09a923e..a7d278d 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c | |||
@@ -517,14 +517,13 @@ setup_control_request(ntp_control_message *p, uint8_t opcode, uint16_t seq){ | |||
517 | double jitter_request(const char *host, int *status){ | 517 | double jitter_request(const char *host, int *status){ |
518 | int conn=-1, i, npeers=0, num_candidates=0, syncsource_found=0; | 518 | int conn=-1, i, npeers=0, num_candidates=0, syncsource_found=0; |
519 | int run=0, min_peer_sel=PEER_INCLUDED, num_selected=0, num_valid=0; | 519 | int run=0, min_peer_sel=PEER_INCLUDED, num_selected=0, num_valid=0; |
520 | int peers_size=0, peer_offset=0, bytes_read=0; | 520 | int peers_size=0, peer_offset=0; |
521 | ntp_assoc_status_pair *peers=NULL; | 521 | ntp_assoc_status_pair *peers=NULL; |
522 | ntp_control_message req; | 522 | ntp_control_message req; |
523 | const char *getvar = "jitter"; | 523 | const char *getvar = "jitter"; |
524 | double rval = 0.0, jitter = -1.0; | 524 | double rval = 0.0, jitter = -1.0; |
525 | char *startofvalue=NULL, *nptr=NULL; | 525 | char *startofvalue=NULL, *nptr=NULL; |
526 | void *tmp; | 526 | void *tmp; |
527 | int ntp_cm_ints = sizeof(uint16_t) * 5 + sizeof(uint8_t) * 2; | ||
528 | 527 | ||
529 | /* Long-winded explanation: | 528 | /* Long-winded explanation: |
530 | * Getting the jitter requires a number of steps: | 529 | * Getting the jitter requires a number of steps: |
@@ -591,6 +590,9 @@ double jitter_request(const char *host, int *status){ | |||
591 | for (i = 0; i < npeers; i++){ | 590 | for (i = 0; i < npeers; i++){ |
592 | /* Only query this server if it is the current sync source */ | 591 | /* Only query this server if it is the current sync source */ |
593 | if (PEER_SEL(peers[i].status) >= min_peer_sel){ | 592 | if (PEER_SEL(peers[i].status) >= min_peer_sel){ |
593 | char jitter_data[MAX_CM_SIZE+1]; | ||
594 | size_t jitter_data_count; | ||
595 | |||
594 | num_selected++; | 596 | num_selected++; |
595 | setup_control_request(&req, OP_READVAR, 2); | 597 | setup_control_request(&req, OP_READVAR, 2); |
596 | req.assoc = peers[i].assoc; | 598 | req.assoc = peers[i].assoc; |
@@ -609,15 +611,7 @@ double jitter_request(const char *host, int *status){ | |||
609 | 611 | ||
610 | req.count = htons(MAX_CM_SIZE); | 612 | req.count = htons(MAX_CM_SIZE); |
611 | DBG(printf("recieving READVAR response...\n")); | 613 | DBG(printf("recieving READVAR response...\n")); |
612 | 614 | read(conn, &req, SIZEOF_NTPCM(req)); | |
613 | /* cov-66524 - req.data not null terminated before usage. Also covers verifying struct was returned correctly*/ | ||
614 | if ((bytes_read = read(conn, &req, SIZEOF_NTPCM(req))) == -1) | ||
615 | die(STATE_UNKNOWN, _("Cannot read from socket: %s"), strerror(errno)); | ||
616 | if (bytes_read != ntp_cm_ints + req.count) | ||
617 | die(STATE_UNKNOWN, _("Invalid NTP response: %d bytes read does not equal %d plus %d data segment"), bytes_read, ntp_cm_ints, req.count); | ||
618 | /* else null terminate */ | ||
619 | strncpy(req.data[req.count], "\0", 1); | ||
620 | |||
621 | DBG(print_ntp_control_message(&req)); | 615 | DBG(print_ntp_control_message(&req)); |
622 | 616 | ||
623 | if(req.op&REM_ERROR && strstr(getvar, "jitter")) { | 617 | if(req.op&REM_ERROR && strstr(getvar, "jitter")) { |
@@ -632,7 +626,14 @@ double jitter_request(const char *host, int *status){ | |||
632 | if(verbose) { | 626 | if(verbose) { |
633 | printf("parsing jitter from peer %.2x: ", ntohs(peers[i].assoc)); | 627 | printf("parsing jitter from peer %.2x: ", ntohs(peers[i].assoc)); |
634 | } | 628 | } |
635 | startofvalue = strchr(req.data, '='); | 629 | if((jitter_data_count = ntohs(req.count)) >= sizeof(jitter_data)){ |
630 | die(STATE_UNKNOWN, | ||
631 | _("jitter response too large (%lu bytes)\n"), | ||
632 | (unsigned long)jitter_data_count); | ||
633 | } | ||
634 | memcpy(jitter_data, req.data, jitter_data_count); | ||
635 | jitter_data[jitter_data_count] = '\0'; | ||
636 | startofvalue = strchr(jitter_data, '='); | ||
636 | if(startofvalue != NULL) { | 637 | if(startofvalue != NULL) { |
637 | startofvalue++; | 638 | startofvalue++; |
638 | jitter = strtod(startofvalue, &nptr); | 639 | jitter = strtod(startofvalue, &nptr); |
diff --git a/plugins/check_real.c b/plugins/check_real.c index e7ab9d0..00bd4d2 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 recieved 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) { |
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index fc0adba..63f9fd9 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -643,7 +643,7 @@ print_help (void) | |||
643 | printf (UT_IPv46); | 643 | printf (UT_IPv46); |
644 | 644 | ||
645 | printf (" %s\n", "-E, --escape"); | 645 | printf (" %s\n", "-E, --escape"); |
646 | printf (" %s\n", _("Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or quit option")); | 646 | printf (" %s\n", _("Can use \\n, \\r, \\t or \\\\ in send or quit string. Must come before send or quit option")); |
647 | printf (" %s\n", _("Default: nothing added to send, \\r\\n added to end of quit")); | 647 | printf (" %s\n", _("Default: nothing added to send, \\r\\n added to end of quit")); |
648 | printf (" %s\n", "-s, --send=STRING"); | 648 | printf (" %s\n", "-s, --send=STRING"); |
649 | printf (" %s\n", _("String to send to the server")); | 649 | printf (" %s\n", _("String to send to the server")); |