completed merge from master for psad-2.2 features
authorMichael Rash <mbr@cipherdyne.org>
Wed, 18 Apr 2012 03:30:44 +0000 (23:30 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Wed, 18 Apr 2012 03:30:44 +0000 (23:30 -0400)
1  2 
fwcheck_psad.pl
install.pl
psad
test/test-psad.pl

diff --cc fwcheck_psad.pl
@@@ -90,9 -90,8 +95,11 @@@ if ($fw_file) 
  ### import psad.conf
  &import_config($config_file);
  
+ $enable_ipv6 = 1 if $config{'ENABLE_IPV6_DETECTION'} eq 'Y';
 +### set firewall type
 +&set_fw_type();
 +
  ### import FW_MSG_SEARCH strings
  &import_fw_search($config_file);
  
diff --cc install.pl
Simple merge
diff --cc psad
Simple merge
@@@ -72,38 -72,37 +74,44 @@@ my $help = 0
  my @args_cp = @ARGV;
  
  exit 1 unless GetOptions(
-     'psad-path=s'       => \$psadCmd,
-     'test-include=s'    => \$test_include,
-     'include=s'         => \$test_include,  ### synonym
-     'test-exclude=s'    => \$test_exclude,
-     'exclude=s'         => \$test_exclude,  ### synonym
-     'List-mode'         => \$list_mode,
-     'diff'              => \$diff_mode,
-     'firewall-type=s'   => \$cmdline_fw_type,
-     'fw-type=s'         => \$cmdline_fw_type,  ### synonym
-     'help'              => \$help
+     'psad-path=s'         => \$psadCmd,
+     'test-include=s'      => \$test_include,
+     'include=s'           => \$test_include,  ### synonym
+     'test-exclude=s'      => \$test_exclude,
+     'exclude=s'           => \$test_exclude,  ### synonym
 -    'test-system-install' => \$test_system_install,
+     'List-mode'           => \$list_mode,
+     'diff'                => \$diff_mode,
++    'test-system-install' => \$test_system_install,
++    'firewall-type=s'     => \$cmdline_fw_type,
++    'fw-type=s'           => \$cmdline_fw_type,  ### synonym
+     'help'                => \$help
  );
  
  &usage() if $help;
  
 +&set_fw_type();
 +
- my $psad_def = "$psadCmd --test-mode --fw-type $fw_type";
+ if ($test_system_install) {
+     $normal_root_override_str = "-O $conf_dir/normal_root_override.conf";
+     $psadCmd = '/usr/sbin/psad';
+ }
++my $psad_def = "$psadCmd --test-mode --fw-type $fw_type $normal_root_override_str";
 +
 +my %test_keys = (
 +    'category'        => $REQUIRED,
 +    'subcategory'     => $OPTIONAL,
 +    'detail'          => $REQUIRED,
 +    'function'        => $REQUIRED,
 +    'cmdline'         => $OPTIONAL,
 +    'fatal'           => $OPTIONAL,
 +    'exec_err'        => $OPTIONAL,
 +    'match_all'       => $OPTIONAL,
 +    'firewalls'       => $OPTIONAL,
 +    'postive_output_matches'  => $OPTIONAL,
 +    'negative_output_matches' => $OPTIONAL,
 +);
 +
  ### define all tests
  my @tests = (
      {