diff -urN snort-2.3.3.orig/etc/snort.conf snort-2.3.3/etc/snort.conf --- snort-2.3.3.orig/etc/snort.conf 2005-04-23 21:48:52.000000000 +0200 +++ snort-2.3.3/etc/snort.conf 2005-05-11 12:24:47.000000000 +0200 @@ -106,7 +106,7 @@ # Path to your rules files (this can be a relative path) # Note for Windows users: You are advised to make this an absolute path, # such as: c:\snort\rules -var RULE_PATH ../rules +var RULE_PATH . # Configure the snort decoder # ============================ diff -urN snort-2.3.3.orig/src/parser.c snort-2.3.3/src/parser.c --- snort-2.3.3.orig/src/parser.c 2005-03-10 23:38:04.000000000 +0100 +++ snort-2.3.3/src/parser.c 2005-05-11 12:24:32.000000000 +0200 @@ -3205,7 +3205,7 @@ } else { - strlcpy(buffer, "/var/log/snort", STD_BUF); + strlcpy(buffer, "@PREFIX@/var/log/snort", STD_BUF); } strlcat(buffer, "/", STD_BUF - strlen(buffer)); diff -urN snort-2.3.3.orig/src/snort.c snort-2.3.3/src/snort.c --- snort-2.3.3.orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100 +++ snort-2.3.3/src/snort.c 2005-05-11 12:24:32.000000000 +0200 @@ -1949,7 +1949,7 @@ { struct stat st; int i; - char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL}; + char *conf_files[]={"@PREFIX@/etc/snort.conf", "./snort.conf", NULL}; char *fname = NULL; char *home_dir = NULL; char *rval = NULL; diff -urN snort-2.3.3.orig/src/snort.h snort-2.3.3/src/snort.h --- snort-2.3.3.orig/src/snort.h 2005-04-23 21:27:57.000000000 +0200 +++ snort-2.3.3/src/snort.h 2005-05-11 12:24:32.000000000 +0200 @@ -69,7 +69,7 @@ #endif #ifndef WIN32 - #define DEFAULT_LOG_DIR "/var/log/snort" + #define DEFAULT_LOG_DIR "@PREFIX@/var/log/snort" #define DEFAULT_DAEMON_ALERT_FILE "alert" #else #define DEFAULT_LOG_DIR "log" diff -urN snort-2.3.3.orig/src/util.c snort-2.3.3/src/util.c --- snort-2.3.3.orig/src/util.c 2005-01-13 21:36:20.000000000 +0100 +++ snort-2.3.3/src/util.c 2005-05-11 12:24:32.000000000 +0200 @@ -715,7 +715,7 @@ } #ifndef _PATH_VARRUN #ifndef WIN32 - strlcpy(_PATH_VARRUN, "/var/run/", 10); + strlcpy(_PATH_VARRUN, "@PREFIX@/var/run/", 10); #else if (GetCurrentDirectory(sizeof (dir)-1, dir)) strncpy (_PATH_VARRUN, dir, sizeof(dir)-1); @@ -733,8 +733,8 @@ if(!S_ISDIR(pt.st_mode) || access(_PATH_VARRUN, W_OK) == -1) { LogMessage("WARNING: _PATH_VARRUN is invalid, trying " - "/var/log...\n"); - strncpy(pv.pid_path, "/var/log/", strlen("/var/log/")); + "@PREFIX@/var/log...\n"); + strncpy(pv.pid_path, "@PREFIX@/var/log/", strlen("@PREFIX@/var/log/")); stat(pv.pid_path, &pt); if(!S_ISDIR(pt.st_mode) || access(pv.pid_path, W_OK) == -1) diff -urN snort-2.3.3.orig/src/util.h snort-2.3.3/src/util.h --- snort-2.3.3.orig/src/util.h 2005-01-13 21:36:20.000000000 +0100 +++ snort-2.3.3/src/util.h 2005-05-11 12:24:32.000000000 +0200 @@ -42,6 +42,8 @@ #include "sfsnprintfappend.h" +#include + extern u_long netmasks[33]; /* Self preservation memory control struct */