1 diff -Nur demarc-1.05-RC1.orig/bin/demarcd demarc-1.05-RC1/bin/demarcd
2 --- demarc-1.05-RC1.orig/bin/demarcd Wed Aug 29 20:05:11 2001
3 +++ demarc-1.05-RC1/bin/demarcd Fri Sep 28 20:09:16 2001
5 # Get all options from the command line / conf file:
6 getopts("hDi:c:Ff:SkI",\%opts) || &print_usage;
7 &print_usage if $opts{'h'};
8 -my $config_file = $opts{'f'} || "/usr/local/demarc/conf/demarcd.conf";
9 +my $config_file = $opts{'f'} || "/etc/demarcd/demarcd.conf";
10 %conf = &parse_config;
16 # Path/filename of logfile
17 -my $logfile = &get_config_value("logfile") || "/usr/local/demarc/log/demarcd_log";
18 +my $logfile = &get_config_value("logfile") || "/var/log/demarcd";
22 # Path/filename of allowed commands file
23 -my $cmdfile = &get_config_value("cmdfile") || "/usr/local/demarc/conf/regen.cmds";
24 +my $cmdfile = &get_config_value("cmdfile") || "/etc/demarcd/regen.cmds";
27 my $temp_binary_directories = &get_config_value("binary_dirs");
28 @binary_dirs = split(/,/,$temp_binary_directories);
31 - @binary_dirs = qw ( /sbin /usr/sbin/ /usr/local/sbin
32 + @binary_dirs = qw ( /sbin /usr/sbin /usr/local/sbin
33 /bin /usr/bin /usr/local/bin
34 /usr/libexec /usr/local/libexec
37 my $w_binary = &binary_search($conf{'w_binary'},"w");
38 my $su_binary = &binary_search($conf{'su_binary'},"su");
39 my $ping_binary = &binary_search($conf{'ping_binary'},"ping");
40 -my $mailprog = &binary_search($conf{'mailprog'},"sendmail");
41 +my $mailprog = &binary_search($conf{'mailprog'},"/usr/lib/sendmail");
42 my $ps_binary = &binary_search($conf{'ps_binary'},"ps");
43 my $df_binary = &binary_search($conf{'df_binary'},"df");
44 my $lynx_binary = &binary_search($conf{'lynx_binary'},"lynx",1);
47 if ($run_snort_locally){
48 $snort_binary_path = &binary_search($conf{'snort_binary'},"snort");
49 - $snort_conf_file = $opts{'c'} || &get_config_value("snort_conf_file") || "/usr/local/demarc/conf/snort.conf";
50 + $snort_conf_file = $opts{'c'} || &get_config_value("snort_conf_file") || "/var/lib/demarcd/snort.conf";
51 $snort_options = &get_config_value("snort_options") || " -o -D -q ";#Special options for snort
54 diff -Nur demarc-1.05-RC1.orig/cgi/DEMARC_config.pm demarc-1.05-RC1/cgi/DEMARC_config.pm
55 --- demarc-1.05-RC1.orig/cgi/DEMARC_config.pm Wed Aug 29 15:59:49 2001
56 +++ demarc-1.05-RC1/cgi/DEMARC_config.pm Fri Sep 28 20:05:56 2001
59 $conf{'whois_command'} = "/usr/bin/whois";
60 $conf{'traceroute_command'} = "/usr/sbin/traceroute";
61 -$conf{'nslookup_command'} = "/usr/sbin/nslookup";
62 +$conf{'nslookup_command'} = "/usr/bin/nslookup";
63 $conf{'ping_command'} = "/usr/sbin/ping";
65 $conf{'allow_anonymous_access'} = 0;
66 diff -Nur demarc-1.05-RC1.orig/cgi/demarc demarc-1.05-RC1/cgi/demarc
67 --- demarc-1.05-RC1.orig/cgi/demarc Wed Aug 29 20:05:11 2001
68 +++ demarc-1.05-RC1/cgi/demarc Fri Sep 28 20:05:57 2001
71 # CHANGE this to reflect where you have your StaticServices.pm module
72 # which SHOULD be the same as where this script resides
73 - push (@INC,"/usr/local/demarc/cgi");
74 + push (@INC,"/usr/share/demarc/cgi");
77 use StaticServices; #Make SURE your cgi-bin directory is in your INC array above
79 my $v_graphics_path = "/dm_images";
80 my $this_program = "demarc";
81 my $v_base_path = $conf{'v_base_path'};
82 -my $base_path = "/usr/local/demarc/cgi";
83 +my $base_path = "/usr/share/demarc/cgi";
84 my $template_subdir = "/templates";
85 my $home_url = "$v_base_path/$this_program";
86 ##############################################
87 diff -Nur demarc-1.05-RC1.orig/conf/demarcd.conf demarc-1.05-RC1/conf/demarcd.conf
88 --- demarc-1.05-RC1.orig/conf/demarcd.conf Wed Aug 29 16:04:18 2001
89 +++ demarc-1.05-RC1/conf/demarcd.conf Fri Sep 28 20:09:00 2001
93 # Base path where DEMARC is installed: "/usr/local/demarc" is the default / suggested location
94 -base_path = /usr/local/demarc
95 -config_file = /usr/local/demarc/conf/demarcd.conf
96 -pid_path = /usr/local/demarc/run
97 +base_path = /usr/share/demarc
98 +config_file = /etc/demarcd/demarcd.conf
102 # Path/filename of logfile
103 -logfile = "/usr/local/demarc/log/demarcd_log"
104 +logfile = "/var/log/demarcd"
106 # Path to allowed regenration commands/users list
107 -cmdfile = "/usr/local/demarc/conf/regen.cmds"
108 +cmdfile = "/etc/demarcd/regen.cmds"
113 run_snort_locally = yes
115 # Paths to snort related files
116 -snort_binary_path = "/usr/local/bin/snort"
117 -snort_conf_file = "/usr/local/demarc/conf/snort.conf"
118 +snort_binary_path = "/usr/sbin/snort"
119 +snort_conf_file = "/var/lib/demarcd/snort.conf"
121 # If you have multiple interfaces and want to have snort monitor ONLY one of them,
122 # name the interface you wish to monitor below (ie "eth0")
126 # Directories in which to search for needed binaries
127 -binary_dirs = "/sbin,/usr/sbin/,/usr/local/sbin,/bin,/usr/bin,/usr/local/bin,/usr/libexec,/usr/locl/libexec"
128 +binary_dirs = "/sbin,/usr/sbin,/usr/local/sbin,/bin,/usr/bin,/usr/local/bin,/usr/libexec,/usr/locl/libexec"
130 ## Paths to general system binaries
133 #listed above in the "binary_dirs" variable
135 #grep_binary = "/bin/grep"
136 -#w_binary = "/usr/bin/w"
137 -#su_binary = "/usr/bin/su"
138 +#w_binary = "/usr/bin/w"
139 +#su_binary = "/bin/su"
140 #ping_binary = "/sbin/ping"
141 -#mailprog = "/usr/sbin/sendmail"
142 -#ps_binary = "/bin/ps"
143 -#df_binary = "/bin/df"
144 -#lynx_binary = "/usr/local/bin/lynx -width=1000000000000000"
145 -#tar_binary = "/usr/bin/tar"
146 +#mailprog = "/usr/lib/sendmail"
147 +#ps_binary = "/bin/ps"
148 +#df_binary = "/bin/df"
149 +#lynx_binary = "/usr/bin/lynx -width=1000000000000000"
150 +#tar_binary = "/bin/tar"