Skip to content

Commit

Permalink
read config from CONFDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Jun 17, 2010
1 parent e074e69 commit 96cf398
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#Makefile
#CC=gcc
LDFLAGS=-lpcap -lpcre
CFLAGS=-O3
CONFDIR=../etc
CFLAGS=-O3 -DCONFDIR='"${CONFDIR}"'
DCFLAGS=-g
PCFLAGS=-g -pg
ifneq (${DEBUG},)
Expand Down
12 changes: 6 additions & 6 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ void set_default_config_options()
// default source net owns everything
config.s_net = "0.0.0.0/0,::/0";
config.errbuf[0] = '\0';
config.configpath = "../etc/";
config.configpath = CONFDIR "";
// files should be relative to configpath somehow
config.sig_file_syn = "../etc/tcp-syn.fp";
config.sig_file_synack = "../etc/tcp-synack.fp";
config.sig_file_ack = "../etc/tcp-stray-ack.fp";
config.sig_file_fin = "../etc/tcp-fin.fp";
config.sig_file_rst = "../etc/tcp-rst.fp";
config.sig_file_syn = CONFDIR "tcp-syn.fp";
config.sig_file_synack = CONFDIR "tcp-synack.fp";
config.sig_file_ack = CONFDIR "tcp-stray-ack.fp";
config.sig_file_fin = CONFDIR "tcp-fin.fp";
config.sig_file_rst = CONFDIR "tcp-rst.fp";
config.sig_syn = NULL;
config.sig_synack = NULL;
config.sig_ack = NULL;
Expand Down

0 comments on commit 96cf398

Please sign in to comment.