Index: base/checks.c
--- base/checks.c.orig	2006-06-21 02:59:19 +0200
+++ base/checks.c	2006-10-20 20:44:43 +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 +0100
+++ base/logging.c	2006-10-20 20:44:43 +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 +0200
+++ base/utils.c	2006-10-20 20:44:43 +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.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
@@ -25123,8 +25123,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"
 
 
 
@@ -29931,17 +29931,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.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 <alloca.h>
+#include <stdlib.h>
 
 #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
@@ -213,7 +213,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 {
