Re: Patch for logwatch 7.3.6 sudo service to handle usernames with dots

MrC <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Matthew Joyce wrote:
> Hi
> Logwatch sudo service doesn't handle user names with dots in them (which
> I'm blessed with supporting).
> 
> Patch for LogWatch 7.3.6 to handle user names with dots in them:
> Regards
> Matthew Joyce

Thanks Matthew,

Committed, revision: 1.12.

MrC

> 
> --- sudo.org    2007-08-02 11:54:11.000000000 +0100
> +++ sudo        2007-08-02 12:01:18.000000000 +0100
> @@ -31,10 +31,10 @@
>  my ($user, $error, $tty, $dir, $euser, $cmd, $args);
> 
>  while (defined(my $ThisLine = <STDIN>)) {
> -   if ( ($user, $error, $tty, $dir, $euser, $cmd, $args) = $ThisLine =~
> m/^\s*(\w+) : (.*; )?TTY=(\S+) ; PWD=(.*?) ; USER=(\S+) ; COMMAND=(\S+)(
> ?.*)/) {
> +   if ( ($user, $error, $tty, $dir, $euser, $cmd, $args) = $ThisLine =~
> m/^\s*(\S+) : (.*; )?TTY=(\S+) ; PWD=(.*?) ; USER=(\S+) ; COMMAND=(\S+)(
> ?.*)/) {
>        push @{$byUser{$user}{$euser}}, [$error . $cmd,$args, $dir, $tty];
>        $byUserSum{$user}{$euser}{$cmd} += 1;
> -   } elsif ( ($user,$euser) = $ThisLine =~ /^\s*(\w+) : no passwd entry
> for (\w+)\!$/) {
> +   } elsif ( ($user,$euser) = $ThisLine =~ /^\s*(\S+) : no passwd entry
> for (\S+)\!$/) {
>        push @{$byUser{$user}{$euser . " (No such user)"}}, ["No password
> entry"];
>     } else {
>     chomp($ThisLine);
> 
> _______________________________________________
> Logwatch-Devel mailing list
> [email protected]
> http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.