]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
IDS nochmal angepasst
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 26 Jul 2007 20:23:40 +0000 (20:23 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 26 Jul 2007 20:23:40 +0000 (20:23 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@722 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

doc/packages-list.txt
html/cgi-bin/ids.cgi
make.sh

index 1a1b9afcfe9a52f6fde1f5586dedc3e65603e7ee..062d74f336e0c0f067d35cf1671567b93ef74ef6 100644 (file)
 * grep-2.5.1a
 * groff-1.18.1.1
 * grub-0.97
+* guardian-1.7.0
 * gzip-1.3.5
 * hddtemp-0.3-beta14
 * hdparm-6.6
index 16a94451181c92967ba3efaba0d7dade4bf01b9d..51c9f8c69cc6276b801d03f06c77805e9fecdb65 100644 (file)
@@ -67,22 +67,27 @@ my $border = '';
 my $checkboxname = '';
 
 if (-e "/etc/snort/snort.conf") {
+
+
        # Open snort.conf file, read it in, close it, and re-open for writing
        open(FILE, "/etc/snort/snort.conf") or die 'Unable to read snort config file.';
        @snortconfig = <FILE>;
        close(FILE);
        open(FILE, ">/etc/snort/snort.conf") or die 'Unable to write snort config file.';
 
+    my @rules = `cd /etc/snort/rules/ && ls *.rules`;    # With this loop the rule might be display with correct rulepath set
+       foreach (@rules) {
+       chomp $_;
+       my $temp = join(";",@snortconfig);
+    if ( $temp =~ /$_/ ){next;}
+    else { push(@snortconfig,"#include \$RULE_PATH/".$_);}
+       }
+       
        # Loop over each line
        foreach my $line (@snortconfig) {
        # Trim the line
                chomp $line;
 
- #   my @rules = `ls $snortrulepath`;     With this loop the rule might be display with correct rulepath set
- #     foreach my $line (@rules) {
- #     # Trim the line
- #             chomp $line;
-
                # Check for a line with .rules
                if ($line =~ /\.rules$/) {
                        # Parse out rule file name
@@ -474,7 +479,7 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable
                if ($ruledisplaycnt > $rulecnt) {
                                print "</TABLE></TD><TD VALIGN='TOP'><TABLE>";
                                $ruledisplaycnt = 0;
-               }
+                       }
 
                        # Check if rule file is enabled
                        if ($snortrules{$rulefile}{"State"} eq 'Enabled') {
@@ -482,7 +487,7 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable
                        }
 
                        # Create rule file link, vars array, and display flag
-               my $rulefilelink = "?RULEFILE=$rulefile";
+                       my $rulefilelink = "?RULEFILE=$rulefile";
                        my $rulefiletoclose = '';
                        my @queryvars = ();
                        my $displayrulefilerules = 0;
@@ -490,12 +495,12 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable
                        # Check for passed in query string
                        if ($ENV{'QUERY_STRING'}) {
                                # Split out vars
-                       @queryvars = split(/\&/, $ENV{'QUERY_STRING'});
+                               @queryvars = split(/\&/, $ENV{'QUERY_STRING'});
 
                                # Loop over values
                                foreach $value (@queryvars) {
                                        # Split out var pairs
-                               ($var, $linkedrulefile) = split(/=/, $value);
+                                       ($var, $linkedrulefile) = split(/=/, $value);
 
                                        # Check if var is 'RULEFILE'
                                        if ($var eq 'RULEFILE') {
@@ -513,6 +518,7 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable
                                        }
                                }
                        }
+
                        # Strip out extra & & ? from rulefilelink
                        $rulefilelink =~ s/^\?\&/\?/i;
 
@@ -576,27 +582,26 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable
 
                                # Close display table
                                print "</TR></TABLE></TD></TR>";
-                       }
+               }
 
                        # Close display table
                        print "</TABLE>";
 
                        # Increment ruledisplaycnt
-                       $ruledisplaycnt++;
+               $ruledisplaycnt++;
                }
-
        print "</TD></TR></TABLE></TD></TR></TABLE>";
        print <<END
-  <table width='100%'>
-  <tr>
+<table width='100%'>
+<tr>
        <td width='33%'>&nbsp;</td>
        <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td>
        <td width='33%'>
                &nbsp; <!-- space for future online help link -->
        </td>
-  </tr>
-  </table>
-  </form>
+</tr>
+</table>
+</form>
 END
 ;
        &Header::closebox();
diff --git a/make.sh b/make.sh
index 4f4500da2a6263e2353a3e468aeffce44bda6aa8..37dffe5b13d7bbc6afe4829efac83ac402b2170f 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -644,6 +644,7 @@ ipfirepackages() {
   ipfiredist cyrus-sasl
 #  ipfiredist fetchmail
 #  ipfiredist gnump3d
+  ipfiredist guardian
   ipfiredist ipfireseeder
   ipfiredist java
   ipfiredist libogg