Add vnstati (#4311)
[openwrt/svn-archive/archive.git] / net / snort / patches / 500-no-config-search.patch
1 --- snort-2.3.2-orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100
2 +++ snort-2.3.2-1/src/snort.c 2005-04-04 20:03:34.000000000 +0200
3 @@ -1949,7 +1949,7 @@
4 {
5 struct stat st;
6 int i;
7 - char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL};
8 + char *conf_files[]={"/etc/snort/snort.conf", NULL};
9 char *fname = NULL;
10 char *home_dir = NULL;
11 char *rval = NULL;
12 @@ -1970,23 +1970,6 @@
13 i++;
14 }
15
16 - /* search for .snortrc in the HOMEDIR */
17 - if(!rval)
18 - {
19 - if((home_dir = getenv("HOME")))
20 - {
21 - /* create the full path */
22 - fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1);
23 - if(!fname)
24 - FatalError("Out of memory searching for config file\n");
25 -
26 - if(stat(fname, &st) != -1)
27 - rval = fname;
28 - else
29 - free(fname);
30 - }
31 - }
32 -
33 return rval;
34 }
35