Re: Tripwire Questions

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

 



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.

-- 
Scot L. Harris
webid@xxxxxxxxxx

VMS version 2.0 ==> 


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

  Powered by Linux