head 1.20; access; symbols OPENPKG_E1_MP_HEAD:1.9 OPENPKG_E1_MP:1.9 OPENPKG_E1_MP_2_STABLE:1.7.2.3 OPENPKG_E1_FP:1.7.2.3 OPENPKG_2_STABLE_MP:1.8 OPENPKG_2_STABLE_20061018:1.7.2.2 OPENPKG_2_STABLE:1.7.0.2 OPENPKG_CW_FP:1.2 OPENPKG_1_STABLE_MP:1.2; locks; strict; comment @# @; 1.20 date 2009.09.19.07.58.46; author rse; state Exp; branches; next 1.19; commitid c5jLQD3XVBoeng4u; 1.19 date 2009.03.27.11.17.28; author rse; state Exp; branches; next 1.18; commitid 1wkRDkIB8Y9a8FHt; 1.18 date 2008.05.28.06.32.19; author rse; state Exp; branches; next 1.17; commitid EU7X8ym84OTaiH4t; 1.17 date 2008.03.13.18.21.21; author rse; state Exp; branches; next 1.16; commitid l0SlmCFpeGMSEZUs; 1.16 date 2007.12.14.09.04.56; author rse; state Exp; branches; next 1.15; commitid pxFuqo306F9mtnJs; 1.15 date 2007.09.29.10.24.37; author rse; state Exp; branches; next 1.14; commitid okTl7xw6HhJ9mCzs; 1.14 date 2007.06.04.15.27.10; author rse; state Exp; branches; next 1.13; commitid z6K7GeLkwSb7NBks; 1.13 date 2007.04.11.15.59.09; author rse; state Exp; branches; next 1.12; commitid TU04Ypymhf7IHFds; 1.12 date 2007.04.11.07.39.01; author rse; state Exp; branches; next 1.11; commitid Bgh16IFB5h38WCds; 1.11 date 2007.03.29.18.09.22; author rse; state Exp; branches; next 1.10; commitid vpLUNhDwzDwhQ0cs; 1.10 date 2007.03.09.07.01.30; author rse; state Exp; branches; next 1.9; commitid E3ZLmbVrmff1Nn9s; 1.9 date 2006.11.02.16.22.59; author rse; state Exp; branches; next 1.8; commitid 6kGhTT5FuJHKY6Tr; 1.8 date 2006.10.20.18.51.08; author rse; state Exp; branches; next 1.7; commitid RJSeWl03Q6ztdsRr; 1.7 date 2006.10.12.18.50.40; author rse; state Exp; branches 1.7.2.1; next 1.6; commitid 2ZqNDZYdEVegtqQr; 1.6 date 2006.06.01.08.36.32; author rse; state Exp; branches; next 1.5; commitid KJal9ehEtThDlhzr; 1.5 date 2006.04.21.07.19.00; author rse; state Exp; branches; next 1.4; commitid xOLzHYNMlHcJe0ur; 1.4 date 2006.04.20.19.51.08; author rse; state Exp; branches; next 1.3; commitid 0BnAyakokuuLqWtr; 1.3 date 2006.04.20.07.56.48; author rse; state Exp; branches; next 1.2; commitid rMdHi1UoqjCHtStr; 1.2 date 2003.06.28.15.17.31; author rse; state Exp; branches; next 1.1; 1.1 date 2003.06.25.13.36.35; author thl; state Exp; branches; next ; 1.7.2.1 date 2006.10.12.18.50.40; author rse; state dead; branches; next 1.7.2.2; commitid iZxwRSmmWscPXUQr; 1.7.2.2 date 2006.10.16.14.53.07; author rse; state Exp; branches; next 1.7.2.3; commitid iZxwRSmmWscPXUQr; 1.7.2.3 date 2006.10.22.15.34.22; author rse; state Exp; branches; next ; commitid Nsm8gwj0NuuZ3HRr; desc @@ 1.20 log @modifying package: nagios-3.2.0 20090815 -> 20090919 @ text @Index: base/logging.c --- base/logging.c.orig 2007-10-29 00:21:29 +0100 +++ base/logging.c 2008-05-28 08:27:03 +0200 @@@@ -204,6 +204,7 @@@@ /* write something to the syslog facility */ int write_to_syslog(char *buffer, unsigned long data_type){ +static int logopen = 0; if(buffer==NULL) return ERROR; @@@@ -220,6 +221,12 @@@@ if(!(data_type & syslog_options)) return OK; + /* OSSP fsl identification */ + if (!logopen) { + openlog("nagios", LOG_NDELAY, LOG_USER); + logopen = 1; + } + /* write the buffer to the syslog facility */ syslog(LOG_USER|LOG_INFO,"%s",buffer); Index: base/utils.c --- base/utils.c.orig 2008-03-10 21:58:33 +0100 +++ base/utils.c 2008-05-28 08:27:03 +0200 @@@@ -499,7 +499,7 @@@@ /* report an error if we couldn't run the command */ if(fp==NULL){ - strncpy(buffer,"(Error: Could not execute command)\n",sizeof(buffer)-1); + snprintf(buffer,sizeof(buffer)-1,"(Error: Could not execute command \"%s\")", cmd); buffer[sizeof(buffer)-1]='\x0'; /* write the error back to the parent process */ Index: nagios-plugins-1.4.14/configure --- nagios-plugins-1.4.14/configure.orig 2008-05-28 00:05:10 +0200 +++ nagios-plugins-1.4.14/configure 2008-05-28 08:27:03 +0200 @@@@ -22427,8 +22427,8 @@@@ fi if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" + LDAPLIBS="-lldap -llber -lssl -lcrypto" + LDAPINCLUDE="-I$prefix/include" @@@@ -26074,17 +26074,10 @@@@ { echo "$as_me:$LINENO: checking for ICMP ping syntax" >&5 echo $ECHO_N "checking for ICMP ping syntax... $ECHO_C" >&6; } -ac_cv_ping_packets_first=no -ac_cv_ping_has_timeout=no if test -n "$with_ping_command" then { echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5 echo "${ECHO_T}(command-line) $with_ping_command" >&6; } - if test -n "$ac_cv_ping_packets_first" - then - ac_cv_ping_packets_first=yes - ac_cv_ping_has_timeout=yes - fi elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ @ 1.19 log @upgrading package: nagios 3.0.6 -> 3.1.0 @ text @d37 3 a39 3 Index: nagios-plugins-1.4.13/configure --- nagios-plugins-1.4.13/configure.orig 2008-05-28 00:05:10 +0200 +++ nagios-plugins-1.4.13/configure 2008-05-28 08:27:03 +0200 @ 1.18 log @modifying package: nagios-3.0.2 20080521 -> 20080528 @ text @d37 3 a39 3 Index: nagios-plugins-1.4.12/configure --- nagios-plugins-1.4.12/configure.orig 2008-05-28 00:05:10 +0200 +++ nagios-plugins-1.4.12/configure 2008-05-28 08:27:03 +0200 @ 1.17 log @upgrading package: nagios 2.11 -> 3.0 @ text @d3 1 a3 1 +++ base/logging.c 2008-03-13 18:28:21 +0100 d27 1 a27 1 +++ base/utils.c 2008-03-13 18:28:21 +0100 d37 4 a40 4 Index: nagios-plugins-1.4.11/configure --- nagios-plugins-1.4.11/configure.orig 2007-12-13 23:42:38 +0100 +++ nagios-plugins-1.4.11/configure 2008-03-13 18:28:21 +0100 @@@@ -21902,8 +21902,8 @@@@ d51 1 a51 1 @@@@ -25319,17 +25319,10 @@@@ a68 12 Index: nagios-plugins-1.4.11/plugins/common.h --- nagios-plugins-1.4.11/plugins/common.h.orig 2007-04-26 00:10:13 +0200 +++ nagios-plugins-1.4.11/plugins/common.h 2008-03-13 18:28:21 +0100 @@@@ -188,7 +188,7 @@@@ /* Solaris does not have floorf, but floor works. Should probably be in configure */ #if defined(__sun) || defined(__sun__) -static inline float floorf (float x) { return floor(x); } +#define floorf(x) (float)floor((double)(x)) #endif enum { @ 1.16 log @modifying package: nagios-2.10 20071213 -> 20071214 @ text @a0 22 Index: base/checks.c --- base/checks.c.orig 2007-10-21 01:18:28 +0200 +++ base/checks.c 2007-12-14 09:59:28 +0100 @@@@ -486,7 +486,8 @@@@ _exit(STATE_UNKNOWN); /* default return string in case nothing was returned */ - strcpy(plugin_output,"(No output!)"); + snprintf(plugin_output,sizeof(plugin_output)-1,"(No output from command \"%s\")", processed_command); + plugin_output[sizeof(plugin_output)-1]='\x0'; /* grab the plugin output and clean it */ fgets(plugin_output,sizeof(plugin_output)-1,fp); @@@@ -508,7 +509,7 @@@@ /* record check result info */ strncpy(svc_msg.output,plugin_output,sizeof(svc_msg.output)-1); svc_msg.output[sizeof(svc_msg.output)-1]='\x0'; - svc_msg.return_code=WEXITSTATUS(pclose_result); + svc_msg.return_code=(WIFEXITED(pclose_result) ? WEXITSTATUS(pclose_result) : -1); svc_msg.exited_ok=TRUE; svc_msg.check_type=SERVICE_CHECK_ACTIVE; svc_msg.finish_time=end_time; d2 3 a4 3 --- base/logging.c.orig 2005-12-13 01:42:45 +0100 +++ base/logging.c 2007-12-14 09:59:28 +0100 @@@@ -208,6 +208,7 @@@@ d10 3 a12 3 #ifdef DEBUG0 printf("write_to_syslog() start\n"); @@@@ -225,6 +226,12 @@@@ d26 3 a28 3 --- base/utils.c.orig 2007-04-30 23:22:32 +0200 +++ base/utils.c 2007-12-14 09:59:28 +0100 @@@@ -2811,7 +2811,7 @@@@ a36 33 @@@@ -2822,7 +2822,8 @@@@ else{ /* default return string in case nothing was returned */ - strcpy(buffer,"(No output!)"); + snprintf(buffer,sizeof(buffer)-1,"(No output from command \"%s\")", cmd); + buffer[sizeof(buffer)-1]='\x0'; /* read in the first line of output from the command */ fgets(buffer,sizeof(buffer)-1,fp); @@@@ -2838,7 +2839,7 @@@@ if(status==-1) result=STATE_CRITICAL; else { - result=WEXITSTATUS(status); + result=(WIFEXITED(status) ? WEXITSTATUS(status) : -1); if(result==0 && WIFSIGNALED(status)){ /* like bash */ result=128+WTERMSIG(status); @@@@ -2882,11 +2883,11 @@@@ #endif /* get the exit code returned from the program */ - result=WEXITSTATUS(status); + result=(WIFEXITED(status) ? WEXITSTATUS(status) : -1); /* check for possibly missing scripts/binaries/etc */ if(result==126 || result==127){ - snprintf(buffer,sizeof(buffer)-1,"Warning: Attempting to execute the command \"%s\" resulted in a return code of %d. Make sure the script or binary you are trying to execute actually exists...\n",cmd,result); + snprintf(buffer,sizeof(buffer)-1,"Warning: Attempting to execute the command \"%s\" (timeout %ds) resulted in a return code of %d. Make sure the script or binary you are trying to execute actually exists...\n",cmd,timeout,result); buffer[sizeof(buffer)-1]='\x0'; write_to_logs_and_console(buffer,NSLOG_RUNTIME_WARNING,TRUE); } d39 1 a39 1 +++ nagios-plugins-1.4.11/configure 2007-12-14 10:00:14 +0100 d71 1 a71 1 +++ nagios-plugins-1.4.11/plugins/common.h 2007-12-14 09:59:28 +0100 @ 1.15 log @modifying package: nagios-2.9 20070925 -> 20070929 @ text @d2 2 a3 2 --- base/checks.c.orig 2007-04-10 16:50:22 +0200 +++ base/checks.c 2007-04-11 08:41:13 +0200 d25 1 a25 1 +++ base/logging.c 2007-04-11 08:41:13 +0200 d48 2 a49 2 --- base/utils.c.orig 2007-04-10 16:50:22 +0200 +++ base/utils.c 2007-04-11 08:43:42 +0200 d92 4 a95 4 Index: nagios-plugins-1.4.10/configure --- nagios-plugins-1.4.10/configure.orig 2007-03-29 12:55:12 +0200 +++ nagios-plugins-1.4.10/configure 2007-04-11 08:41:13 +0200 @@@@ -21070,8 +21070,8 @@@@ d106 1 a106 1 @@@@ -24310,17 +24310,10 @@@@ d108 2 a109 2 echo "$as_me:$LINENO: checking for ICMP ping syntax" >&5 echo $ECHO_N "checking for ICMP ping syntax... $ECHO_C" >&6 d114 2 a115 2 echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5 echo "${ECHO_T}(command-line) $with_ping_command" >&6 d124 4 a127 4 Index: nagios-plugins-1.4.10/plugins/common.h --- nagios-plugins-1.4.10/plugins/common.h.orig 2007-03-22 18:54:16 +0100 +++ nagios-plugins-1.4.10/plugins/common.h 2007-04-11 08:41:13 +0200 @@@@ -176,7 +176,7 @@@@ @ 1.14 log @modifying package: nagios-2.9 20070418 -> 20070604 @ text @d92 3 a94 3 Index: nagios-plugins-1.4.9/configure --- nagios-plugins-1.4.9/configure.orig 2007-03-29 12:55:12 +0200 +++ nagios-plugins-1.4.9/configure 2007-04-11 08:41:13 +0200 d124 3 a126 3 Index: nagios-plugins-1.4.9/plugins/common.h --- nagios-plugins-1.4.9/plugins/common.h.orig 2007-03-22 18:54:16 +0100 +++ nagios-plugins-1.4.9/plugins/common.h 2007-04-11 08:41:13 +0200 @ 1.13 log @modifying package: nagios-2.9 20070411 again @ text @d92 3 a94 3 Index: nagios-plugins-1.4.8/configure --- nagios-plugins-1.4.8/configure.orig 2007-03-29 12:55:12 +0200 +++ nagios-plugins-1.4.8/configure 2007-04-11 08:41:13 +0200 d124 3 a126 3 Index: nagios-plugins-1.4.8/plugins/common.h --- nagios-plugins-1.4.8/plugins/common.h.orig 2007-03-22 18:54:16 +0100 +++ nagios-plugins-1.4.8/plugins/common.h 2007-04-11 08:41:13 +0200 @ 1.12 log @upgrading package: nagios 2.8 -> 2.9 @ text @d92 3 a94 3 Index: nagios-plugins-1.4.7/configure --- nagios-plugins-1.4.7/configure.orig 2007-03-29 12:55:12 +0200 +++ nagios-plugins-1.4.7/configure 2007-04-11 08:41:13 +0200 d124 3 a126 3 Index: nagios-plugins-1.4.7/plugins/common.h --- nagios-plugins-1.4.7/plugins/common.h.orig 2007-03-22 18:54:16 +0100 +++ nagios-plugins-1.4.7/plugins/common.h 2007-04-11 08:41:13 +0200 @ 1.11 log @modifying package: nagios-2.8 20070309 -> 20070329 @ text @d2 2 a3 2 --- base/checks.c.orig 2006-06-21 02:59:19 +0200 +++ base/checks.c 2006-10-20 20:44:43 +0200 d25 1 a25 1 +++ base/logging.c 2006-10-20 20:44:43 +0200 d48 3 a50 3 --- base/utils.c.orig 2006-07-13 23:55:10 +0200 +++ base/utils.c 2006-10-20 20:44:43 +0200 @@@@ -2806,7 +2806,7 @@@@ d59 1 a59 1 @@@@ -2817,7 +2817,8 @@@@ d69 1 a69 1 @@@@ -2833,7 +2834,7 @@@@ d72 1 a72 1 else d74 5 a78 5 + result=(WIFEXITED(status) ? WEXITSTATUS(status) : -1); /* write the output back to the parent process */ write(fd[1],buffer,strlen(buffer)+1); @@@@ -2870,11 +2871,11 @@@@ d93 3 a95 3 --- nagios-plugins-1.4.7/configure.orig 2006-10-19 22:08:11 +0200 +++ nagios-plugins-1.4.7/configure 2006-10-20 20:44:43 +0200 @@@@ -25123,8 +25123,8 @@@@ d106 1 a106 1 @@@@ -29931,17 +29931,10 @@@@ d125 3 a127 3 --- nagios-plugins-1.4.7/plugins/common.h.orig 2006-07-29 03:43:34 +0200 +++ nagios-plugins-1.4.7/plugins/common.h 2006-10-20 20:44:43 +0200 @@@@ -213,7 +213,7 @@@@ @ 1.10 log @upgrading package: nagios 2.7 -> 2.8 @ text @d92 3 a94 3 Index: nagios-plugins-1.4.6/configure --- nagios-plugins-1.4.6/configure.orig 2006-10-19 22:08:11 +0200 +++ nagios-plugins-1.4.6/configure 2006-10-20 20:44:43 +0200 d124 3 a126 3 Index: nagios-plugins-1.4.6/plugins/common.h --- nagios-plugins-1.4.6/plugins/common.h.orig 2006-07-29 03:43:34 +0200 +++ nagios-plugins-1.4.6/plugins/common.h 2006-10-20 20:44:43 +0200 @ 1.9 log @modifying package: nagios-2.5 20061024 -> 20061102 @ text @d92 3 a94 3 Index: nagios-plugins-1.4.5/configure --- nagios-plugins-1.4.5/configure.orig 2006-10-19 22:08:11 +0200 +++ nagios-plugins-1.4.5/configure 2006-10-20 20:44:43 +0200 d124 3 a126 15 Index: nagios-plugins-1.4.5/lib/regex_internal.h --- nagios-plugins-1.4.5/lib/regex_internal.h.orig 2006-05-25 14:33:24 +0200 +++ nagios-plugins-1.4.5/lib/regex_internal.h 2006-10-20 20:47:51 +0200 @@@@ -455,7 +455,7 @@@@ #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) -#include +#include #ifndef _LIBC # if HAVE_ALLOCA Index: nagios-plugins-1.4.5/plugins/common.h --- nagios-plugins-1.4.5/plugins/common.h.orig 2006-07-29 03:43:34 +0200 +++ nagios-plugins-1.4.5/plugins/common.h 2006-10-20 20:44:43 +0200 @ 1.8 log @modifying package: nagios-2.5 20061013 -> 20061020 @ text @d92 3 a94 3 Index: nagios-plugins-1.4.4/configure --- nagios-plugins-1.4.4/configure.orig 2006-10-19 22:08:11 +0200 +++ nagios-plugins-1.4.4/configure 2006-10-20 20:44:43 +0200 d124 3 a126 3 Index: nagios-plugins-1.4.4/lib/regex_internal.h --- nagios-plugins-1.4.4/lib/regex_internal.h.orig 2006-05-25 14:33:24 +0200 +++ nagios-plugins-1.4.4/lib/regex_internal.h 2006-10-20 20:47:51 +0200 d136 3 a138 3 Index: nagios-plugins-1.4.4/plugins/common.h --- nagios-plugins-1.4.4/plugins/common.h.orig 2006-07-29 03:43:34 +0200 +++ nagios-plugins-1.4.4/plugins/common.h 2006-10-20 20:44:43 +0200 @ 1.7 log @fix building under Solaris @ text @d2 2 a3 2 --- base/checks.c.orig 2006-06-21 02:59:19.000000000 +0200 +++ base/checks.c 2006-10-12 19:43:15.687168262 +0200 d24 2 a25 2 --- base/logging.c.orig 2005-12-13 01:42:45.000000000 +0100 +++ base/logging.c 2006-10-12 19:43:15.687570530 +0200 d48 2 a49 2 --- base/utils.c.orig 2006-07-13 23:55:10.000000000 +0200 +++ base/utils.c 2006-10-12 19:43:15.689542314 +0200 d92 4 a95 4 Index: nagios-plugins-1.4.3/configure --- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19.000000000 +0200 +++ nagios-plugins-1.4.3/configure 2006-10-12 19:43:15.705072958 +0200 @@@@ -25122,8 +25122,8 @@@@ d106 1 a106 1 @@@@ -29844,17 +29844,10 @@@@ d124 16 a139 4 Index: nagios-plugins-1.4.3/plugins/common.h --- nagios-plugins-1.4.3/plugins/common.h.orig 2005-12-07 16:10:27.000000000 +0100 +++ nagios-plugins-1.4.3/plugins/common.h 2006-10-12 20:16:46.061238204 +0200 @@@@ -193,7 +193,7 @@@@ @ 1.7.2.1 log @file nagios.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:53:07 +0000 @ text @d1 135 @ 1.7.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 135 Index: base/checks.c --- base/checks.c.orig 2006-06-21 02:59:19.000000000 +0200 +++ base/checks.c 2006-10-12 19:43:15.687168262 +0200 @@@@ -486,7 +486,8 @@@@ _exit(STATE_UNKNOWN); /* default return string in case nothing was returned */ - strcpy(plugin_output,"(No output!)"); + snprintf(plugin_output,sizeof(plugin_output)-1,"(No output from command \"%s\")", processed_command); + plugin_output[sizeof(plugin_output)-1]='\x0'; /* grab the plugin output and clean it */ fgets(plugin_output,sizeof(plugin_output)-1,fp); @@@@ -508,7 +509,7 @@@@ /* record check result info */ strncpy(svc_msg.output,plugin_output,sizeof(svc_msg.output)-1); svc_msg.output[sizeof(svc_msg.output)-1]='\x0'; - svc_msg.return_code=WEXITSTATUS(pclose_result); + svc_msg.return_code=(WIFEXITED(pclose_result) ? WEXITSTATUS(pclose_result) : -1); svc_msg.exited_ok=TRUE; svc_msg.check_type=SERVICE_CHECK_ACTIVE; svc_msg.finish_time=end_time; Index: base/logging.c --- base/logging.c.orig 2005-12-13 01:42:45.000000000 +0100 +++ base/logging.c 2006-10-12 19:43:15.687570530 +0200 @@@@ -208,6 +208,7 @@@@ /* write something to the syslog facility */ int write_to_syslog(char *buffer, unsigned long data_type){ +static int logopen = 0; #ifdef DEBUG0 printf("write_to_syslog() start\n"); @@@@ -225,6 +226,12 @@@@ if(!(data_type & syslog_options)) return OK; + /* OSSP fsl identification */ + if (!logopen) { + openlog("nagios", LOG_NDELAY, LOG_USER); + logopen = 1; + } + /* write the buffer to the syslog facility */ syslog(LOG_USER|LOG_INFO,"%s",buffer); Index: base/utils.c --- base/utils.c.orig 2006-07-13 23:55:10.000000000 +0200 +++ base/utils.c 2006-10-12 19:43:15.689542314 +0200 @@@@ -2806,7 +2806,7 @@@@ /* report an error if we couldn't run the command */ if(fp==NULL){ - strncpy(buffer,"(Error: Could not execute command)\n",sizeof(buffer)-1); + snprintf(buffer,sizeof(buffer)-1,"(Error: Could not execute command \"%s\")", cmd); buffer[sizeof(buffer)-1]='\x0'; /* write the error back to the parent process */ @@@@ -2817,7 +2817,8 @@@@ else{ /* default return string in case nothing was returned */ - strcpy(buffer,"(No output!)"); + snprintf(buffer,sizeof(buffer)-1,"(No output from command \"%s\")", cmd); + buffer[sizeof(buffer)-1]='\x0'; /* read in the first line of output from the command */ fgets(buffer,sizeof(buffer)-1,fp); @@@@ -2833,7 +2834,7 @@@@ if(status==-1) result=STATE_CRITICAL; else - result=WEXITSTATUS(status); + result=(WIFEXITED(status) ? WEXITSTATUS(status) : -1); /* write the output back to the parent process */ write(fd[1],buffer,strlen(buffer)+1); @@@@ -2870,11 +2871,11 @@@@ #endif /* get the exit code returned from the program */ - result=WEXITSTATUS(status); + result=(WIFEXITED(status) ? WEXITSTATUS(status) : -1); /* check for possibly missing scripts/binaries/etc */ if(result==126 || result==127){ - snprintf(buffer,sizeof(buffer)-1,"Warning: Attempting to execute the command \"%s\" resulted in a return code of %d. Make sure the script or binary you are trying to execute actually exists...\n",cmd,result); + snprintf(buffer,sizeof(buffer)-1,"Warning: Attempting to execute the command \"%s\" (timeout %ds) resulted in a return code of %d. Make sure the script or binary you are trying to execute actually exists...\n",cmd,timeout,result); buffer[sizeof(buffer)-1]='\x0'; write_to_logs_and_console(buffer,NSLOG_RUNTIME_WARNING,TRUE); } Index: nagios-plugins-1.4.3/configure --- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19.000000000 +0200 +++ nagios-plugins-1.4.3/configure 2006-10-12 19:43:15.705072958 +0200 @@@@ -25122,8 +25122,8 @@@@ fi if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" + LDAPLIBS="-lldap -llber -lssl -lcrypto" + LDAPINCLUDE="-I$prefix/include" @@@@ -29844,17 +29844,10 @@@@ echo "$as_me:$LINENO: checking for ICMP ping syntax" >&5 echo $ECHO_N "checking for ICMP ping syntax... $ECHO_C" >&6 -ac_cv_ping_packets_first=no -ac_cv_ping_has_timeout=no if test -n "$with_ping_command" then echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5 echo "${ECHO_T}(command-line) $with_ping_command" >&6 - if test -n "$ac_cv_ping_packets_first" - then - ac_cv_ping_packets_first=yes - ac_cv_ping_has_timeout=yes - fi elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ Index: nagios-plugins-1.4.3/plugins/common.h --- nagios-plugins-1.4.3/plugins/common.h.orig 2005-12-07 16:10:27.000000000 +0100 +++ nagios-plugins-1.4.3/plugins/common.h 2006-10-12 20:16:46.061238204 +0200 @@@@ -193,7 +193,7 @@@@ /* Solaris does not have floorf, but floor works. Should probably be in configure */ #if defined(__sun) || defined(__sun__) -static inline float floorf (float x) { return floor(x); } +#define floorf(x) (float)floor((double)(x)) #endif enum { @ 1.7.2.3 log @MFC: newer versions, cleaned up configuration, Perl modules @ text @d2 2 a3 2 --- base/checks.c.orig 2006-06-21 02:59:19 +0200 +++ base/checks.c 2006-10-20 20:44:43 +0200 d24 2 a25 2 --- base/logging.c.orig 2005-12-13 01:42:45 +0100 +++ base/logging.c 2006-10-20 20:44:43 +0200 d48 2 a49 2 --- base/utils.c.orig 2006-07-13 23:55:10 +0200 +++ base/utils.c 2006-10-20 20:44:43 +0200 d92 4 a95 4 Index: nagios-plugins-1.4.4/configure --- nagios-plugins-1.4.4/configure.orig 2006-10-19 22:08:11 +0200 +++ nagios-plugins-1.4.4/configure 2006-10-20 20:44:43 +0200 @@@@ -25123,8 +25123,8 @@@@ d106 1 a106 1 @@@@ -29931,17 +29931,10 @@@@ d124 4 a127 16 Index: nagios-plugins-1.4.4/lib/regex_internal.h --- nagios-plugins-1.4.4/lib/regex_internal.h.orig 2006-05-25 14:33:24 +0200 +++ nagios-plugins-1.4.4/lib/regex_internal.h 2006-10-20 20:47:51 +0200 @@@@ -455,7 +455,7 @@@@ #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) -#include +#include #ifndef _LIBC # if HAVE_ALLOCA Index: nagios-plugins-1.4.4/plugins/common.h --- nagios-plugins-1.4.4/plugins/common.h.orig 2006-07-29 03:43:34 +0200 +++ nagios-plugins-1.4.4/plugins/common.h 2006-10-20 20:44:43 +0200 @@@@ -213,7 +213,7 @@@@ @ 1.6 log @upgrading package: nagios 2.3.1 -> 2.4 @ text @d2 3 a4 3 --- base/checks.c.orig 2006-02-16 05:47:55 +0100 +++ base/checks.c 2006-06-01 10:34:34 +0200 @@@@ -483,7 +483,8 @@@@ d14 1 a14 1 @@@@ -505,7 +506,7 @@@@ d24 2 a25 2 --- base/logging.c.orig 2005-12-13 01:42:45 +0100 +++ base/logging.c 2006-06-01 10:34:34 +0200 d48 2 a49 2 --- base/utils.c.orig 2006-05-20 20:37:29 +0200 +++ base/utils.c 2006-06-01 10:34:34 +0200 d93 2 a94 2 --- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19 +0200 +++ nagios-plugins-1.4.3/configure 2006-06-01 10:34:34 +0200 d124 12 @ 1.5 log @I'm still trying to track down why to the hell Nagios thinks the plugins return 127 on exit although they work fine on the command line @ text @d1 22 d25 1 a25 1 +++ base/logging.c 2006-04-20 20:13:22 +0200 d39 4 a42 4 + if (!logopen) { + openlog("nagios", LOG_NDELAY, LOG_USER); + logopen = 1; + } a46 32 Index: nagios-plugins-1.4.3/configure --- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19 +0200 +++ nagios-plugins-1.4.3/configure 2006-04-20 20:14:05 +0200 @@@@ -25122,8 +25122,8 @@@@ fi if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" + LDAPLIBS="-lldap -llber -lssl -lcrypto" + LDAPINCLUDE="-I$prefix/include" @@@@ -29844,17 +29844,10 @@@@ echo "$as_me:$LINENO: checking for ICMP ping syntax" >&5 echo $ECHO_N "checking for ICMP ping syntax... $ECHO_C" >&6 -ac_cv_ping_packets_first=no -ac_cv_ping_has_timeout=no if test -n "$with_ping_command" then echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5 echo "${ECHO_T}(command-line) $with_ping_command" >&6 - if test -n "$ac_cv_ping_packets_first" - then - ac_cv_ping_packets_first=yes - ac_cv_ping_has_timeout=yes - fi elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ d48 2 a49 2 --- base/utils.c.orig 2006-04-07 23:45:33 +0200 +++ base/utils.c 2006-04-20 22:52:43 +0200 d55 1 a55 1 + snprintf(buffer,sizeof(buffer)-1,"(Error: Could not execute command \"%s\"", cmd); d64 1 a64 1 + snprintf(buffer,sizeof(buffer)-1,"(No output from command \"%s\"", cmd); d78 1 a78 1 @@@@ -2870,7 +2871,7 @@@@ d87 20 a106 5 Index: base/checks.c --- base/checks.c.orig 2006-02-16 05:47:55 +0100 +++ base/checks.c 2006-04-20 22:52:42 +0200 @@@@ -483,7 +483,8 @@@@ _exit(STATE_UNKNOWN); d108 13 a120 4 /* default return string in case nothing was returned */ - strcpy(plugin_output,"(No output!)"); + snprintf(plugin_output,sizeof(plugin_output)-1,"(No output from command \"%s\"", processed_command); + plugin_output[sizeof(plugin_output)-1]='\x0'; d122 2 a123 11 /* grab the plugin output and clean it */ fgets(plugin_output,sizeof(plugin_output)-1,fp); @@@@ -505,7 +506,7 @@@@ /* record check result info */ strncpy(svc_msg.output,plugin_output,sizeof(svc_msg.output)-1); svc_msg.output[sizeof(svc_msg.output)-1]='\x0'; - svc_msg.return_code=WEXITSTATUS(pclose_result); + svc_msg.return_code=(WIFEXITED(pclose_result) ? WEXITSTATUS(pclose_result) : -1); svc_msg.exited_ok=TRUE; svc_msg.check_type=SERVICE_CHECK_ACTIVE; svc_msg.finish_time=end_time; @ 1.4 log @next round on improving the Nagios packaging: provide an own and more correct command/plugin configuration than provided by the vendor; add SNMP support; remove partly broken LDAP support; fix moving of p1.pl script; remove more crap from the installation hierarchy; small cleanups to the ping command fiddling @ text @d57 62 @ 1.3 log @packaging cleanups and a build fix @ text @d3 1 a3 1 +++ base/logging.c 2006-04-20 09:45:56 +0200 d25 32 @ 1.2 log @more clean ISO C; always use -p option; remove extra comment @ text @d1 4 a4 3 --- base/logging.c.orig Tue Feb 26 05:03:28 2002 +++ base/logging.c Wed Jun 25 14:02:52 2003 @@@@ -130,6 +130,7 @@@@ d12 1 a12 2 @@@@ -142,6 +143,12 @@@@ /* make sure we should log this type of entry */ d15 1 a15 1 + d21 1 a21 1 d24 1 @ 1.1 log @add/improve fsl support; fix typos; use openlog(2); inhibit use of plain log file @ text @d7 1 a7 1 + static logopen = 0; d16 1 a16 1 + /* fsl identification */ @