82a6ed491c
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16820 3c298f89-4303-0410-b956-a3cf2f4a3e73
43 lines
943 B
Diff
43 lines
943 B
Diff
--- a/src/snort.c
|
|
+++ b/src/snort.c
|
|
@@ -4140,7 +4140,7 @@
|
|
{
|
|
struct stat st;
|
|
int i;
|
|
- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL};
|
|
+ char *conf_files[]={"/etc/snort/snort.conf", NULL};
|
|
char *fname = NULL;
|
|
char *rval = NULL;
|
|
|
|
@@ -4159,30 +4159,6 @@
|
|
i++;
|
|
}
|
|
|
|
- /* search for .snortrc in the HOMEDIR */
|
|
- if(!rval)
|
|
- {
|
|
- char *home_dir = NULL;
|
|
-
|
|
- if((home_dir = getenv("HOME")) != NULL)
|
|
- {
|
|
- char *snortrc = "/.snortrc";
|
|
- int path_len;
|
|
-
|
|
- path_len = strlen(home_dir) + strlen(snortrc) + 1;
|
|
-
|
|
- /* create the full path */
|
|
- fname = (char *)SnortAlloc(path_len);
|
|
-
|
|
- SnortSnprintf(fname, path_len, "%s%s", home_dir, snortrc);
|
|
-
|
|
- if(stat(fname, &st) != -1)
|
|
- rval = fname;
|
|
- else
|
|
- free(fname);
|
|
- }
|
|
- }
|
|
-
|
|
return rval;
|
|
}
|
|
|