[Logwatch-Devel] Patch for logwatch 7.3.6 sudo service to handle usernames with dots

MrC lists-logwatch at cappella.us
Sat Sep 1 18:40:25 MST 2007


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
> Logwatch-Devel at logwatch.org
> http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel



More information about the Logwatch-Devel mailing list