From 1fb876ed6f244868845064b4e6d1d48d961ae302 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Mar 10 2010 09:56:55 +0000 Subject: Update to 1.4.14 --- diff --git a/.cvsignore b/.cvsignore index 6cfe1bf..878d3b2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -nagios-plugins-1.4.13.tar.gz +nagios-plugins-1.4.14.tar.gz diff --git a/check_smtp.recvline.diff.2 b/check_smtp.recvline.diff.2 deleted file mode 100644 index ab25ccf..0000000 --- a/check_smtp.recvline.diff.2 +++ /dev/null @@ -1,201 +0,0 @@ ---- plugins/check_smtp.c (revision 1769) -+++ plugins/check_smtp.c (working copy) -@@ -40,6 +40,8 @@ - const char *copyright = "2000-2006"; - const char *email = "nagiosplug-devel@lists.sourceforge.net"; - -+#include -+ - #include "common.h" - #include "netutils.h" - #include "utils.h" -@@ -74,6 +76,8 @@ - int validate_arguments (void); - void print_help (void); - void print_usage (void); -+int recvline(char *, size_t); -+int recvlines(char *, size_t); - int my_close(void); - - #include "regex.h" -@@ -115,7 +119,6 @@ - enum { - TCP_PROTOCOL = 1, - UDP_PROTOCOL = 2, -- MAXBUF = 1024 - }; - - /* written by lauri alanko */ -@@ -221,7 +224,7 @@ - - /* watch for the SMTP connection string and */ - /* return a WARNING status if we couldn't read any data */ -- if (recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0) == -1) { -+ if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { - printf (_("recv() failed\n")); - result = STATE_WARNING; - } -@@ -245,11 +248,10 @@ - send(sd, helocmd, strlen(helocmd), 0); - - /* allow for response to helo command to reach us */ -- if(read (sd, buffer, MAXBUF - 1) < 0){ -+ if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { - printf (_("recv() failed\n")); - return STATE_WARNING; - } else if(use_ehlo){ -- buffer[MAXBUF-1]='\0'; - if(strstr(buffer, "250 STARTTLS") != NULL || - strstr(buffer, "250-STARTTLS") != NULL){ - supports_tls=TRUE; -@@ -267,7 +269,7 @@ - /* send the STARTTLS command */ - send(sd, SMTP_STARTTLS, strlen(SMTP_STARTTLS), 0); - -- recv(sd,buffer, MAX_INPUT_BUFFER-1, 0); /* wait for it */ -+ recvlines(buffer, MAX_INPUT_BUFFER); /* wait for it */ - if (!strstr (buffer, server_expect)) { - printf (_("Server does not support STARTTLS\n")); - send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0); -@@ -301,13 +303,12 @@ - } - if (verbose) - printf(_("sent %s"), helocmd); -- if ((n = my_recv(buffer, MAX_INPUT_BUFFER - 1)) <= 0) { -+ if ((n = recvlines(buffer, MAX_INPUT_BUFFER)) <= 0) { - printf("%s\n", _("SMTP UNKNOWN - Cannot read EHLO response via TLS.")); - my_close(); - return STATE_UNKNOWN; - } - if (verbose) { -- buffer[n] = '\0'; - printf("%s", buffer); - } - -@@ -336,16 +337,14 @@ - */ - if (smtp_use_dummycmd) { - my_send(cmd_str, strlen(cmd_str)); -- my_recv(buffer, MAX_INPUT_BUFFER-1); -- if (verbose) -+ if (recvlines(buffer, MAX_INPUT_BUFFER) >= 1 && verbose) - printf("%s", buffer); - } - - while (n < ncommands) { - asprintf (&cmd_str, "%s%s", commands[n], "\r\n"); - my_send(cmd_str, strlen(cmd_str)); -- my_recv(buffer, MAX_INPUT_BUFFER-1); -- if (verbose) -+ if (recvlines(buffer, MAX_INPUT_BUFFER) >= 1 && verbose) - printf("%s", buffer); - strip (buffer); - if (n < nresponses) { -@@ -394,12 +393,11 @@ - if (verbose) - printf (_("sent %s\n"), "AUTH LOGIN"); - -- if((ret = my_recv(buffer, MAXBUF - 1)) < 0){ -+ if ((ret = recvlines(buffer, MAX_INPUT_BUFFER)) <= 0) { - asprintf(&error_msg, _("recv() failed after AUTH LOGIN, ")); - result = STATE_WARNING; - break; - } -- buffer[ret] = 0; - if (verbose) - printf (_("received %s\n"), buffer); - -@@ -416,12 +414,11 @@ - if (verbose) - printf (_("sent %s\n"), abuf); - -- if ((ret = my_recv(buffer, MAX_INPUT_BUFFER-1)) == -1) { -+ if ((ret = recvlines(buffer, MAX_INPUT_BUFFER)) <= 0) { - result = STATE_CRITICAL; - asprintf(&error_msg, _("recv() failed after sending authuser, ")); - break; - } -- buffer[ret] = 0; - if (verbose) { - printf (_("received %s\n"), buffer); - } -@@ -437,12 +434,11 @@ - if (verbose) { - printf (_("sent %s\n"), abuf); - } -- if ((ret = my_recv(buffer, MAX_INPUT_BUFFER-1)) == -1) { -+ if ((ret = recvlines(buffer, MAX_INPUT_BUFFER)) <= 0) { - result = STATE_CRITICAL; - asprintf(&error_msg, _("recv() failed after sending authpass, ")); - break; - } -- buffer[ret] = 0; - if (verbose) { - printf (_("received %s\n"), buffer); - } -@@ -700,6 +696,65 @@ - } - - -+/* -+ * Receive one line, copy it into buf and nul-terminate it. Returns the -+ * number of bytes written to buf (excluding the '\0') or 0 on EOF or <0 on -+ * error. -+ * -+ * TODO: Reading one byte at a time is very inefficient. Replace this by a -+ * function which buffers the data, move that to netutils.c and change -+ * check_smtp and other plugins to use that. Also, remove (\r)\n. -+ */ -+int -+recvline(char *buf, size_t bufsize) -+{ -+ int result; -+ unsigned i; -+ -+ for (i = result = 0; i < bufsize - 1; i++) { -+ if ((result = my_recv(&buf[i], 1)) != 1) -+ break; -+ if (buf[i] == '\n') { -+ buf[++i] = '\0'; -+ return i; -+ } -+ } -+ return (result == 1 || i == 0) ? -2 : result; /* -2 if out of space */ -+} -+ -+ -+/* -+ * Receive one or more lines, copy them into buf and nul-terminate it. Returns -+ * the number of bytes written to buf (excluding the '\0') or 0 on EOF or <0 on -+ * error. Works for all protocols which format multiline replies as follows: -+ * -+ * ``The format for multiline replies requires that every line, except the last, -+ * begin with the reply code, followed immediately by a hyphen, `-' (also known -+ * as minus), followed by text. The last line will begin with the reply code, -+ * followed immediately by , optionally some text, and . As noted -+ * above, servers SHOULD send the if subsequent text is not sent, but -+ * clients MUST be prepared for it to be omitted.'' (RFC 2821, 4.2.1) -+ * -+ * TODO: Move this to netutils.c. Also, remove \r and possibly the final \n. -+ */ -+int -+recvlines(char *buf, size_t bufsize) -+{ -+ int result; -+ unsigned i; -+ -+ for (i = 0; /* forever */; i += result) -+ if (!((result = recvline(buf + i, bufsize - i)) > 3 && -+ isdigit(buf[i]) && -+ isdigit(buf[i + 1]) && -+ isdigit(buf[i + 2]) && -+ buf[i + 3] == '-')) -+ break; -+ -+ return (result <= 0) ? result : result + (int)i; -+} -+ -+ - int - my_close (void) - { diff --git a/import.log b/import.log new file mode 100644 index 0000000..2265108 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +nagios-plugins-1_4_14-1_fc12:HEAD:nagios-plugins-1.4.14-1.fc12.src.rpm:1268214975 diff --git a/nagios-plugins-1.4.11-pgsql-fix.patch b/nagios-plugins-1.4.11-pgsql-fix.patch deleted file mode 100644 index f9d0c6c..0000000 --- a/nagios-plugins-1.4.11-pgsql-fix.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- plugins/check_pgsql.c.orig 2008-04-30 16:42:20.000000000 -0500 -+++ plugins/check_pgsql.c 2008-04-30 16:42:37.000000000 -0500 -@@ -39,6 +39,7 @@ - const char *copyright = "1999-2006"; - const char *email = "nagiosplug-devel@lists.sourceforge.net"; - -+#include "pg_config_manual.h" - #include "common.h" - #include "utils.h" - diff --git a/nagios-plugins-1.4.11-ping_timeout.patch b/nagios-plugins-1.4.11-ping_timeout.patch deleted file mode 100644 index 0346f98..0000000 --- a/nagios-plugins-1.4.11-ping_timeout.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- t/nagios-plugins-1.4.11/configure 2007-12-13 16:42:38.000000000 -0600 -+++ nagios-plugins-1.4.11/configure 2008-04-09 10:42:30.000000000 -0500 -@@ -25332,7 +25332,7 @@ - fi - - elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ -- $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ -+ $PATH_TO_PING -n -s 127.0.0.1 56 1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -U -c %d %s" -@@ -25349,7 +25349,7 @@ - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ -+elif $PATH_TO_PING -n -U -c 1 127.0.0.1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -U -c %d %s" -@@ -25357,7 +25357,7 @@ - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ -+elif $PATH_TO_PING -n -c 1 127.0.0.1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -c %d %s" -@@ -25365,35 +25365,35 @@ - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ -+elif $PATH_TO_PING -n 127.0.0.1 -c 1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n %s -c %d" - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ -+elif $PATH_TO_PING 127.0.0.1 -n 1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING %s -n %d" - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ -+elif $PATH_TO_PING -n -s 127.0.0.1 56 1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -s %s 56 %d" - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ -+elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ -+elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" -@@ -25401,7 +25401,7 @@ - { echo "$as_me:$LINENO: result: $with_ping_command" >&5 - echo "${ECHO_T}$with_ping_command" >&6; } - --elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ -+elif $PATH_TO_PING -n -c 1 127.0.0.1 -w 5 2>/dev/null | \ - egrep -i "^round-trip|^rtt" >/dev/null - then - with_ping_command="$PATH_TO_PING -n -c %d %s" diff --git a/nagios-plugins-1.4.13-linux_raid.patch b/nagios-plugins-1.4.13-linux_raid.patch deleted file mode 100644 index 897c2ec..0000000 --- a/nagios-plugins-1.4.13-linux_raid.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- contrib/check_linux_raid.pl.orig 2008-09-28 23:11:13.000000000 -0500 -+++ contrib/check_linux_raid.pl 2008-09-28 23:12:22.000000000 -0500 -@@ -23,7 +23,7 @@ - # WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min - - use strict; --use lib "/usr/local/nagios/libexec"; -+use lib utils.pm; - use utils qw(%ERRORS); - - # die with an error if we're not on Linux diff --git a/nagios-plugins-1.4.13-ntp.patch b/nagios-plugins-1.4.13-ntp.patch deleted file mode 100644 index b80c775..0000000 --- a/nagios-plugins-1.4.13-ntp.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- nagiosplug/trunk/plugins/check_ntp.c 2008/11/19 05:59:22 2085 -+++ nagiosplug/trunk/plugins/check_ntp.c 2008/11/19 05:59:33 2086 -@@ -198,7 +198,7 @@ - /* NTP control message header is 12 bytes, plus any data in the data - * field, plus null padding to the nearest 32-bit boundary per rfc. - */ --#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((m.count)?4-(ntohs(m.count)%4):0)) -+#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((ntohs(m.count)%4)?4-(ntohs(m.count)%4):0)) - - /* finally, a little helper or two for debugging: */ - #define DBG(x) do{if(verbose>1){ x; }}while(0); ---- nagiosplug/trunk/plugins/check_ntp_peer.c 2008/11/19 05:59:22 2085 -+++ nagiosplug/trunk/plugins/check_ntp_peer.c 2008/11/19 05:59:33 2086 -@@ -131,7 +131,7 @@ - /* NTP control message header is 12 bytes, plus any data in the data - * field, plus null padding to the nearest 32-bit boundary per rfc. - */ --#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((m.count)?4-(ntohs(m.count)%4):0)) -+#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((ntohs(m.count)%4)?4-(ntohs(m.count)%4):0)) - - /* finally, a little helper or two for debugging: */ - #define DBG(x) do{if(verbose>1){ x; }}while(0); - diff --git a/nagios-plugins-1.4.3-ntpd.patch b/nagios-plugins-1.4.3-ntpd.patch deleted file mode 100644 index 53c9aa2..0000000 --- a/nagios-plugins-1.4.3-ntpd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- plugins-scripts/check_ntp.pl.orig 2006-07-23 20:57:10.000000000 +0200 -+++ plugins-scripts/check_ntp.pl 2006-07-23 20:57:46.000000000 +0200 -@@ -314,7 +314,6 @@ - } - } else { - print "No match!\n" if $verbose; -- $jitter = '(not parsed)'; - } - - } - diff --git a/nagios-plugins-1.4.3-subst.patch b/nagios-plugins-1.4.3-subst.patch deleted file mode 100644 index b5927f3..0000000 --- a/nagios-plugins-1.4.3-subst.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- nagios-plugins-1.4.3/plugins-scripts/subst.in.orig 2006-07-24 03:53:45.000000000 +0200 -+++ nagios-plugins-1.4.3/plugins-scripts/subst.in 2006-07-24 03:54:24.000000000 +0200 -@@ -62,11 +62,11 @@ - # subst will replace the fully qualified command with whatever is - # returned from the which subroutine - # --/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { -- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); -- c=substr($0,RSTART,RLENGTH); -- sub(c,which(c,path)); --} -+#/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { -+# match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); -+# c=substr($0,RSTART,RLENGTH); -+# sub(c,which(c,path)); -+#} - - { - print; diff --git a/nagios-plugins-1.4.4-check_ide_smart.patch b/nagios-plugins-1.4.4-check_ide_smart.patch deleted file mode 100644 index e8ddec0..0000000 --- a/nagios-plugins-1.4.4-check_ide_smart.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- nagios-plugins-1.4.4/plugins/check_ide_smart.c.orig 2006-10-19 03:25:16.000000000 +0300 -+++ nagios-plugins-1.4.4/plugins/check_ide_smart.c 2006-10-26 11:28:53.000000000 +0300 -@@ -439,7 +439,7 @@ print_values (values_t * p, thresholds_t - - - void --print_thresholds (thresholds_t * p) -+smart_print_thresholds (thresholds_t * p) - { - threshold_t * threshold = p->thresholds; - int i; -@@ -541,7 +541,7 @@ print_help (void) - void - print_usage (void) - { -- printf (_("Usage:"); -+ printf (_("Usage:")); - printf ("%s [-d ] [-i ] [-q quiet] [-1 ]",progname); -- pritnf (" [-O ] [-n ]\n"); -+ printf (" %s\n", "[-O ] [-n ]"); - } diff --git a/nagios-plugins-1.4.4-linux_raid.patch b/nagios-plugins-1.4.4-linux_raid.patch deleted file mode 100644 index b3a0c64..0000000 --- a/nagios-plugins-1.4.4-linux_raid.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- contrib/check_linux_raid.pl 2006-10-27 15:25:54.000000000 +0200 -+++ contrib/check_linux_raid.pl 2006-10-27 15:24:02.000000000 +0200 -@@ -23,7 +23,7 @@ - # WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min - - use strict; --use lib utils.pm; -+use lib '/usr/lib/nagios/plugins'; - use utils qw(%ERRORS); - diff --git a/nagios-plugins-1.4.6-radius-ng.patch b/nagios-plugins-1.4.6-radius-ng.patch deleted file mode 100644 index a25d6b2..0000000 --- a/nagios-plugins-1.4.6-radius-ng.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- plugins/check_radius.c.orig 2007-02-23 14:25:25.000000000 -0600 -+++ plugins/check_radius.c 2007-02-23 14:26:50.000000000 -0600 -@@ -43,7 +43,7 @@ - #include "utils.h" - #include "netutils.h" - --#include -+#include - - int process_arguments (int, char **); - void print_help (void); -@@ -124,6 +124,7 @@ - int result = STATE_UNKNOWN; - UINT4 client_id; - char *str; -+ rc_handle *rh; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); -@@ -133,33 +134,32 @@ - usage4 (_("Could not parse arguments")); - - str = strdup ("dictionary"); -- if ((config_file && rc_read_config (config_file)) || -- rc_read_dictionary (rc_conf_str (str))) -+ if (!config_file || ((rh = rc_read_config(config_file)) == NULL)) - die (STATE_UNKNOWN, _("Config file error")); -+ -+ if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0) -+ die (STATE_UNKNOWN, _("Config file error")); - - service = PW_AUTHENTICATE_ONLY; -+ data.send_pairs = NULL; -+ data.receive_pairs = NULL; - - memset (&data, 0, sizeof(data)); -- if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) && -- rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) && -- rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) && -- (nasid==NULL || rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0)))) -- die (STATE_UNKNOWN, _("Out of Memory?")); - - /* - * Fill in NAS-IP-Address - */ - -- if ((client_id = rc_own_ipaddress ()) == 0) -+ if ((client_id = rc_own_ipaddress (rh)) == 0) - return (ERROR_RC); - -- if (rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) == -+ if (rc_avpair_add (rh, &data.send_pairs, PW_NAS_IP_ADDRESS, &client_id, 0, 0) == - NULL) return (ERROR_RC); - -- rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval, -+ rc_buildreq (rh, &data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval, - retries); - -- result = rc_send_server (&data, msg); -+ result = rc_send_server (rh, &data, msg); - rc_avpair_free (data.send_pairs); - if (data.receive_pairs) - rc_avpair_free (data.receive_pairs); ---- configure.orig 2007-02-23 14:24:52.000000000 -0600 -+++ configure 2007-02-23 14:26:21.000000000 -0600 -@@ -20983,13 +20983,13 @@ - - _SAVEDLIBS="$LIBS" - --echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient" >&5 --echo $ECHO_N "checking for rc_read_config in -lradiusclient... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient-ng" >&5 -+echo $ECHO_N "checking for rc_read_config in -lradiusclient-ng... $ECHO_C" >&6 - if test "${ac_cv_lib_radiusclient_rc_read_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lradiusclient $LIBS" -+LIBS="-lradiusclient-ng $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -21051,13 +21051,13 @@ - #define HAVE_LIBRADIUSCLIENT 1 - _ACEOF - -- LIBS="-lradiusclient $LIBS" -+ LIBS="-lradiusclient-ng $LIBS" - - fi - - if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then - EXTRAS="$EXTRAS check_radius" -- RADIUSLIBS="-lradiusclient" -+ RADIUSLIBS="-lradiusclient-ng" - - else - { echo "$as_me:$LINENO: WARNING: Skipping radius plugin" >&5 ---- configure.in.orig 2007-02-23 14:25:00.000000000 -0600 -+++ configure.in 2007-02-23 14:26:31.000000000 -0600 -@@ -199,7 +199,7 @@ - AC_CHECK_LIB(radiusclient,rc_read_config) - if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then - EXTRAS="$EXTRAS check_radius" -- RADIUSLIBS="-lradiusclient" -+ RADIUSLIBS="-lradiusclient-ng" - AC_SUBST(RADIUSLIBS) - else - AC_MSG_WARN([Skipping radius plugin]) diff --git a/nagios-plugins-check_log-path.patch b/nagios-plugins-check_log-path.patch deleted file mode 100644 index fe14fd3..0000000 --- a/nagios-plugins-check_log-path.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- nagios-plugins-1.4.8/plugins-scripts/check_log.sh.orig 2007-11-22 12:19:57.000000000 +0000 -+++ nagios-plugins-1.4.8/plugins-scripts/check_log.sh 2007-11-22 12:20:13.000000000 +0000 -@@ -62,8 +62,8 @@ - - ECHO="/bin/echo" - GREP="/bin/egrep" --DIFF="/bin/diff" --TAIL="/bin/tail" -+DIFF="/usr/bin/diff" -+TAIL="/usr/bin/tail" - CAT="/bin/cat" - RM="/bin/rm" - CHMOD="/bin/chmod" - diff --git a/nagios-plugins.spec b/nagios-plugins.spec index 3b3ef33..b2f3a25 100644 --- a/nagios-plugins.spec +++ b/nagios-plugins.spec @@ -1,6 +1,6 @@ Name: nagios-plugins -Version: 1.4.13 -Release: 17%{?dist} +Version: 1.4.14 +Release: 1%{?dist} Summary: Host/service/network monitoring program plugins for Nagios Group: Applications/System @@ -8,11 +8,10 @@ License: GPLv2+ URL: http://nagiosplug.sourceforge.net/ Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz Source1: nagios-plugins.README.Fedora -Patch0: nagios-plugins-1.4.3-subst.patch -Patch1: nagios-plugins-1.4.3-ntpd.patch -Patch2: nagios-plugins-check_log-path.patch -Patch3: nagios-plugins-1.4.13-linux_raid.patch -Patch4: nagios-plugins-1.4.13-ntp.patch +Patch1: nagios-pugins-0001-Do-not-use-usr-local-for-perl.patch +Patch2: nagios-pugins-0002-Remove-assignment-of-not-parsed-to-jitter.patch +Patch3: nagios-pugins-0003-Fedora-specific-fixes-for-searching-for-diff-and-tai.patch +Patch4: nagios-pugins-0004-Fedora-specific-patch-for-not-to-fixing-fully-qualif.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -511,11 +510,10 @@ Provides check_wave support for Nagios. %prep %setup -q -%patch0 -p1 -%patch1 -p0 -%patch2 -p1 -%patch3 -p0 -%patch4 -p2 +%patch1 -p1 -b .no_usr_local +%patch2 -p1 -b .not_parsed +%patch3 -p1 -b .proper_paths +%patch4 -p1 -b .no_need_fo_fix_paths %build %configure \ @@ -809,6 +807,10 @@ rm -rf %{buildroot} %{_libdir}/nagios/plugins/utils.sh %changelog +* Wed Mar 10 2010 Peter Lemenkov - 1.4.14-1 +- Ver. 1.4.14 +- Rebased patches. + * Fri Aug 21 2009 Tomas Mraz - 1.4.13-17 - rebuilt with new openssl diff --git a/nagios-pugins-0001-Do-not-use-usr-local-for-perl.patch b/nagios-pugins-0001-Do-not-use-usr-local-for-perl.patch new file mode 100644 index 0000000..1c4f3b6 --- /dev/null +++ b/nagios-pugins-0001-Do-not-use-usr-local-for-perl.patch @@ -0,0 +1,25 @@ +From 73739072f928639592ea37c45b3f63c505b8f62a Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Wed, 10 Mar 2010 12:02:00 +0300 +Subject: [PATCH 1/4] Do not use /usr/local for perl + +--- + contrib/check_linux_raid.pl | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl +index da1aff8..11bc3cd 100644 +--- a/contrib/check_linux_raid.pl ++++ b/contrib/check_linux_raid.pl +@@ -23,7 +23,7 @@ + # WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min + + use strict; +-use lib "/usr/local/nagios/libexec"; ++use lib utils.pm; + use utils qw(%ERRORS); + + # die with an error if we're not on Linux +-- +1.6.6.1 + diff --git a/nagios-pugins-0002-Remove-assignment-of-not-parsed-to-jitter.patch b/nagios-pugins-0002-Remove-assignment-of-not-parsed-to-jitter.patch new file mode 100644 index 0000000..756afa0 --- /dev/null +++ b/nagios-pugins-0002-Remove-assignment-of-not-parsed-to-jitter.patch @@ -0,0 +1,24 @@ +From 983d069d97b3bdf0c8986c24e6042a68282f3a9f Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Wed, 10 Mar 2010 12:08:35 +0300 +Subject: [PATCH 2/4] Remove assignment of (not parsed) to jitter + +--- + plugins-scripts/check_ntp.pl | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl +index 5c87e0a..0733a63 100755 +--- a/plugins-scripts/check_ntp.pl ++++ b/plugins-scripts/check_ntp.pl +@@ -313,7 +313,6 @@ if ($have_ntpq) { + } + } else { + print "No match!\n" if $verbose; +- $jitter = '(not parsed)'; + } + + } +-- +1.6.6.1 + diff --git a/nagios-pugins-0003-Fedora-specific-fixes-for-searching-for-diff-and-tai.patch b/nagios-pugins-0003-Fedora-specific-fixes-for-searching-for-diff-and-tai.patch new file mode 100644 index 0000000..30ba527 --- /dev/null +++ b/nagios-pugins-0003-Fedora-specific-fixes-for-searching-for-diff-and-tai.patch @@ -0,0 +1,27 @@ +From ccb5810ba28d726c29617d4544ca16ce20d97e03 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Wed, 10 Mar 2010 12:10:16 +0300 +Subject: [PATCH 3/4] Fedora-specific fixes for searching for diff and tail + +--- + plugins-scripts/check_log.sh | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh +index a1bfb48..20fc2b2 100755 +--- a/plugins-scripts/check_log.sh ++++ b/plugins-scripts/check_log.sh +@@ -62,8 +62,8 @@ + + ECHO="/bin/echo" + GREP="/bin/egrep" +-DIFF="/bin/diff" +-TAIL="/bin/tail" ++DIFF="/usr/bin/diff" ++TAIL="/usr/bin/tail" + CAT="/bin/cat" + RM="/bin/rm" + CHMOD="/bin/chmod" +-- +1.6.6.1 + diff --git a/nagios-pugins-0004-Fedora-specific-patch-for-not-to-fixing-fully-qualif.patch b/nagios-pugins-0004-Fedora-specific-patch-for-not-to-fixing-fully-qualif.patch new file mode 100644 index 0000000..c61c296 --- /dev/null +++ b/nagios-pugins-0004-Fedora-specific-patch-for-not-to-fixing-fully-qualif.patch @@ -0,0 +1,33 @@ +From a6aaae514c0a1c85dcefe8bad78ec24bf1db099e Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Wed, 10 Mar 2010 12:15:08 +0300 +Subject: [PATCH 4/4] Fedora-specific patch for not to fixing fully qualified paths in scripts + +--- + plugins-scripts/subst.in | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/plugins-scripts/subst.in b/plugins-scripts/subst.in +index a70ad88..08f2895 100644 +--- a/plugins-scripts/subst.in ++++ b/plugins-scripts/subst.in +@@ -52,11 +52,11 @@ BEGIN { + # returned from the which subroutine. run before changes to INC to add libexecdir + # FIXME: Prepend executables with a substitution keyword instead. + # +-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { +- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); +- c=substr($0,RSTART,RLENGTH); +- sub(c,which(c,path)); +-} ++#/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { ++# match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); ++# c=substr($0,RSTART,RLENGTH); ++# sub(c,which(c,path)); ++#} + + # add to libexecdir to INC for perl utils.pm + /^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } } +-- +1.6.6.1 + diff --git a/nagiosplugins-checksnmp-crash.patch b/nagiosplugins-checksnmp-crash.patch deleted file mode 100644 index 6fc9540..0000000 --- a/nagiosplugins-checksnmp-crash.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- plugins/check_snmp.c.old 2007-05-29 07:22:32.000000000 +0200 -+++ plugins/check_snmp.c 2007-10-17 22:08:49.000000000 +0200 -@@ -219,12 +219,16 @@ main (int argc, char **argv) - - ptr = output; - -- strcat(perfstr, "| "); -+ strncat(perfstr, "| ", sizeof(perfstr)-strlen(perfstr)-1); - while (ptr) { - char *foo; -+ unsigned int copylen; - - foo = strstr (ptr, delimiter); -- strncat(perfstr, ptr, foo-ptr); -+ copylen = foo-ptr; -+ if (copylen > sizeof(perfstr)-strlen(perfstr)-1) -+ copylen = sizeof(perfstr)-strlen(perfstr)-1; -+ strncat(perfstr, ptr, copylen); - ptr = foo; - - if (ptr == NULL) -@@ -357,11 +361,11 @@ main (int argc, char **argv) - - i++; - -- strcat(perfstr, "="); -- strcat(perfstr, show); -+ strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1); -+ strncat(perfstr, show, sizeof(perfstr)-strlen(perfstr)-1); - if (type) -- strcat(perfstr, type); -- strcat(perfstr, " "); -+ strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1); -+ strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1); - - } /* end while (ptr) */ - diff --git a/sources b/sources index 48c8119..34181b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -be6cc7699fff3ee29d1fd4d562377386 nagios-plugins-1.4.13.tar.gz +a1835a48a777863ed2583de3c82446a9 nagios-plugins-1.4.14.tar.gz