Code

check_dns needs a space between 'time' and the hostname
[nagiosplug.git] / plugins / popen.c
index 98ba085b79bb9e989643849b1297cee2cf02f361..94ad583f78770dfac294e5ee3b91376c0b2b3fc4 100644 (file)
@@ -16,10 +16,11 @@ int spclose(FILE *);
  * path passed to the exec'd program are esstially empty. (popen create a shell
  * and passes the environment to it).
  *
+ * $Id$
+ *
  ******************************************************************************/
 
-#include <config.h>
-#include <common.h>
+#include "common.h"
 
 /* extern so plugin has pid to kill exec'd process on timeouts */
 extern int timeout_interval;
@@ -111,6 +112,7 @@ spopen (const char *cmdstring)
        /* there cannot be more args than characters */
        argc = strlen (cmdstring) + 1;  /* add 1 for NULL termination */
        argv = malloc (sizeof(char*)*argc);
+       
        if (argv == NULL) {
                printf ("Could not malloc argv array in popen()\n");
                return NULL;
@@ -122,7 +124,7 @@ spopen (const char *cmdstring)
                str += strspn (str, " \t\r\n"); /* trim any leading whitespace */
 
                if (i >= argc - 2) {
-                       printf ("You've got a big problem buddy! You need more args!!!\n");
+                       printf ("CRITICAL - You need more args!!!\n");
                        return (NULL);
                }