[Pkg-logwatch-general] r85 - in trunk: debian patches
Willi Mann
willi-guest at alioth.debian.org
Thu Sep 10 06:31:17 UTC 2009
Author: willi-guest
Date: 2009-09-10 06:31:16 +0000 (Thu, 10 Sep 2009)
New Revision: 85
Added:
trunk/patches/06-bug505432-sudo-command-continued.diff
Modified:
trunk/debian/changelog
Log:
* Support "command continues" lines in sudo. closes: #505432
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-09-09 18:32:40 UTC (rev 84)
+++ trunk/debian/changelog 2009-09-10 06:31:16 UTC (rev 85)
@@ -9,6 +9,7 @@
Marcin Szewczyk, closes: #541152
* scripts/services/denyhosts: Output one host per line, not one possibly
very long line with all hosts. closes: #507042
+ * Support "command continues" lines in sudo. closes: #505432
-- Willi Mann <willi at wm1.at> Mon, 07 Sep 2009 17:04:43 +0200
Added: trunk/patches/06-bug505432-sudo-command-continued.diff
===================================================================
--- trunk/patches/06-bug505432-sudo-command-continued.diff (rev 0)
+++ trunk/patches/06-bug505432-sudo-command-continued.diff 2009-09-10 06:31:16 UTC (rev 85)
@@ -0,0 +1,41 @@
+# Patch by Willi Mann
+# support "command continues" lines
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505432
+diff --git a/scripts/services/sudo b/scripts/services/sudo
+index 7f49ae7..4eae283 100755
+--- a/scripts/services/sudo
++++ b/scripts/services/sudo
+@@ -54,6 +54,8 @@ my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
+ my $CmdsThresh = $ENV{'command_run_threshold'} || 0;
+
+ my ($user, $error, $tty, $dir, $euser, $cmd, $args);
++my $contlines = 0;
++my $argsprinted = 0;
+
+ while (defined(my $ThisLine = <STDIN>)) {
+ if ($ThisLine =~ /pam_unix\(sudo:auth\): authentication failure; logname=\S* uid=[0-9]* euid=[0-9]* tty=\S* ruser=\S* rhost=\S* user=\S*/
+@@ -66,6 +68,8 @@ while (defined(my $ThisLine = <STDIN>)) {
+ $byUserSum{$user}{$euser}{$cmd} += 1;
+ } elsif ( ($user,$euser) = $ThisLine =~ /^\s*(\S+) : no passwd entry for (\S+)\!$/) {
+ push @{$byUser{$user}{$euser . " (No such user)"}}, ["No password entry"];
++ } elsif ( ($user, $error, $tty, $dir, $euser, $cmd, $args) = $ThisLine =~ m/^\s*\S+ : \(command continued\)/) {
++ $contlines++;
+ } else {
+ chomp($ThisLine);
+ $OtherList{$ThisLine}++;
+@@ -93,11 +97,15 @@ foreach my $user (sort keys %byUser) {
+ $ttydetail = "($tty) " if $Detail >= 30;
+ print "\t$ttydetail$dir\n";
+ } # if $Detail >= 20
++ $argsprinted=1;
+ } # if $Detail >= 10
+ } # foreach $row
+ } # foreach $euser
+ } # foreach $user
+
++if($contlines && $argsprinted) {
++ print "\nThe argument list of some of above commands might be incomplete\n";
++}
+
+ if (keys %OtherList) {
+ print "\n\n**Unmatched Entries**";
More information about the Pkg-logwatch-general
mailing list