diff options
author | Erich Eckner <git@eckner.net> | 2020-04-16 00:24:39 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-04-16 00:24:39 +0200 |
commit | ecb99fa08f92ce5ff6ae7ecc2d5e7193be3f34ed (patch) | |
tree | bd656734d80c30ad3ec7c22e7b008537802e2a22 /cron | |
parent | 0c7942d700be27e72f0a8adac4e38cd5526dc6fe (diff) | |
download | logwatch-overrides-ecb99fa08f92ce5ff6ae7ecc2d5e7193be3f34ed.tar.xz |
minimal stuff from fileserver
Diffstat (limited to 'cron')
-rw-r--r-- | cron | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -47,7 +47,8 @@ while (defined($ThisLine = <STDIN>)) { # Ignore } elsif ( ($ThisLine =~ s/^([^ ]+) \([^ ]+\)\s+//) or - ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[(\d+)\]:\s+\((\S+)\)\s+//) + ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[(\d+)\]:\s+\((\S+)\)\s+//) or + ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[\d+\]:\s+//) ) { $PID = $1; $User = $2; @@ -55,7 +56,12 @@ while (defined($ThisLine = <STDIN>)) { if ($ThisLine =~ s/^CMD \((.+)\)\s*$/$1/) { $Runs->{$User}->{$ThisLine}++; $ExecutedCommand{$PID} = {command=>$ThisLine, user=>$User}; - } elsif ($ThisLine =~ s/^CMD FINISH \((.+)\)\s*$/$1/) { + } elsif ($ThisLine =~ s/^FILE .+ USER (\S+) PID (\d+) //) { + $PID = $2; + $User = $1; + $Runs->{$User}->{$ThisLine}++; + $ExecutedCommand{$PID} = {command=>$ThisLine, user=>$User}; + } elsif ($ThisLine =~ s/^CMD FINISH \((.+)\)\s*$/$1/) { $Runs->{$User}->{$ThisLine}++; } elsif ($ThisLine =~ s/^(END|CMD START) \((.+)\)\s*$/$1/) { #Ignore for now, NetBSD users could get tricky with |