1
0

500-no-config-search.patch 943 B

1234567891011121314151617181920212223242526272829303132333435
  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. - /* search for .snortrc in the HOMEDIR */
  16. - if(!rval)
  17. - {
  18. - if((home_dir = getenv("HOME")))
  19. - {
  20. - /* create the full path */
  21. - fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1);
  22. - if(!fname)
  23. - FatalError("Out of memory searching for config file\n");
  24. -
  25. - if(stat(fname, &st) != -1)
  26. - rval = fname;
  27. - else
  28. - free(fname);
  29. - }
  30. - }
  31. -
  32. return rval;
  33. }