Re: Tripwire Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scot L. Harris wrote:

On Sat, 2005-03-05 at 13:02, Mark Sargent wrote:


Mark Sargent wrote:





Hi All,

here is the script,


#! /usr/bin/perl -w

$Additions = 0;
$Removals = 0;
while ($line = <STDIN>) {
if ( $line =~ /^\s*#\s*(\/\S+)/ ) {
if ( -e $1 ) {
$line =~ s/^\s*#//;
$Additions++;
}
}elsif ( $line =~ /^\s*(\/\S+)/ ) {
if ( ! -e $1 ) {
$line = "#" . $line;
$Removals++;
}
}
}
print STDERR "Number of additions: $Additions\n";
print STDERR "Number of removals: $Removals\n";



You said the script does not generate a policy file? Looking at the
script it does not look like it outputs anything but the counts it
generated.


Of course I have not done any serious perl programing so I may be
missing how this script is suppose to process a servers file systems and
generate a policy file.

This may be a script fragment for doing that but it does not look
complete.



Hi All,

Scott, the command sends the content of twpol.txt.orig in to the cleanpol.pl and then when completed, puts the results into twpol.txt. The < > characters in the command are supposed to do exactly that. But, for me, it isn't working. Anyway, as this is a study box, I've re-installed FC3, as the previous was an upgrade from 2, and some things may have been corrupted. Cheers.

MArk Sargent.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux