Your message dated Mon, 28 Nov 2005 02:47:13 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#317913: fixed in logwatch 7.1-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Jul 2005 11:57:17 +0000
>From [EMAIL PROTECTED] Tue Jul 12 04:57:17 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mallorn.ii.uj.edu.pl [149.156.65.90] (postfix)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DsJO0-0006rY-00; Tue, 12 Jul 2005 04:57:17 -0700
Received: by mallorn.ii.uj.edu.pl (Postfix, from userid 1000)
        id A7918967; Tue, 12 Jul 2005 13:57:14 +0200 (CEST)
Date: Tue, 12 Jul 2005 13:57:14 +0200
From: Piotr Krukowiecki <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: logwatch: Fixes for pure-ftpd service
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS"
Content-Disposition: inline
X-Reportbug-Version: 3.8
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 


--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: logwatch
Version: 6.1.2-1
Severity: normal
Tags: patch


[CC to [EMAIL PROTECTED]
[E-mail has a spam trap! Remove _s__p__a__m]

Script for pure-ftpd log checking does not catches file transfers
correctly (at least not with spaces in file names).

Attached patch:
- fixes this problem, making the script catch downloads and uploads
  correctly
- removes catching of 'deleted' files (this needs to be reimplemented; I
  can do that if you say that you can't apply the patch without it, but
  I think it's worth applying anyway)
- adds ignoring of moved or renamed files (previously they went to
  Unmatched)
- renames $IngoreUnmatched to $IgnoreUnmatched and initializes it from 
  $ENV{'pureftpd_ignore_unmatched'}
- adds transfer statistics section and variables connected with it:
  $ENV{'show_data_stats'}, $ENV{'min_avg_file_size'}, $ENV{'top_people_nr'}
  (they can be left at their default values)
    
I'm using pure-ftpd 1.0.19-4


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.31-ow1
Locale: LANG=C, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages logwatch depends on:
ii  mailx            1:8.1.2-0.20040524cvs-4 A simple mail user agent
ii  perl             5.8.4-8                 Larry Wall's Practical Extraction 

-- no debconf information

-- 
Piotrek
irc: #debian.pl
Mors Drosophilis melanogastribus!

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pureftpd.diff"

--- pureftpd.org        2005-07-12 10:22:37.000000000 +0200
+++ pureftpd    2005-07-12 13:40:05.000000000 +0200
@@ -28,8 +28,12 @@
 $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'};
 $ShowLogins  = $ENV{'show_logins'};
 $ShowLogouts = $ENV{'show_logouts'};
+$ShowDataStats = $ENV{'show_data_stats'};
 $ShowDataTransfers = $ENV{'show_data_transfers'};
 $ShowNewConnections = $ENV{'show_new_connections'};
+$IgnoreUnmatched = $ENV{'pureftpd_ignore_unmatched'};
+$MinAvgSize = 200*1024 if (!defined ($MinAvgSize = $ENV{'min_avg_file_size'}));
+$TopPeopleNr = 3 if (!defined ($TopPeopleNr = $ENV{'top_people_nr'}));
 
 $PureShutdown = 0;
 
@@ -38,6 +42,7 @@ while (defined($ThisLine = <STDIN>)) {
       ( $ThisLine =~ /last message repeated/ ) or
       ( $ThisLine =~ /Timeout/) or
       ( $ThisLine =~ /Can't change directory/) or
+      ( $ThisLine =~ /File successfully renamed or moved/) or
       ( $ThisLine =~ /pure-ftpd startup( |) succeeded/)
    ) {
       #We don't care about these
@@ -51,11 +56,17 @@ while (defined($ThisLine = <STDIN>)) {
       $Logins->{$IP}->{$User}++;
    } elsif (($j,$ConnectionCount,$IP) = ($ThisLine =~ /(.*?)too many 
connections \((.*?)\) from this ip\: \[(.*?)\]/i )) {
       $TooManyConnections->{$ConnectionCount}->{$IP}++;
-   } elsif (($User,$Location,$File,$Direction) = ($ThisLine =~ 
/\((.*?)\@(.*?)\)\s+\[\w+\]\s+(.*?)\s+(\w+)\s+/)) {
-      $Direction->{$User}->{$Location}->{$File}++;
-   } elsif (($User,$Location,$File) = ($ThisLine =~ 
/\((.*?)\@(.*?)\)\s+\[\w+\]\s+ Deleted ([^ ]+)/)) {
-      $Direction = "Deleted";
-      $Direction->{$User}->{$Location}->{$File}++;
+   } elsif (($User,$Location,$File,$Direction, $Size, $Speed) = ($ThisLine =~ 
/\((.*?)\@(.*?)\)\s+\[\w+\]\s+(.*?)\s(downloaded|uploaded)\s+\((\d+) bytes, 
(.+)KB\/sec\)/)) {
+      $Transfers->{$Direction}->{$User}->{$Location}->{$File}++;
+      $Stats->{$Direction}->{"files_count"}++;
+      $Stats->{$Direction}->{"files_size"} += $Size;
+      $Stats->{$Direction}->{"people"}->{$User} += $Size;
+      if ($Size >= $MinAvgSize) {
+         $Stats->{$Direction}->{"speed"}->{"max"} = $Speed
+            if ($Stats->{$Direction}->{"speed"}->{"max"} < $Speed);
+         $Stats->{$Direction}->{"speed"}->{"tmp_size"} += $Size;
+         $Stats->{$Direction}->{"speed"}->{"tmp_time"} += $Size/($Speed*1024);
+      }
    } elsif ($ThisLine =~ m/pure-ftpd shutdown( |) succeeded/) {
       $PureShutdown++;
    } else {
@@ -100,17 +111,35 @@ if (keys %{$TooManyConnections}) {
    }
 }
 
+if ($ShowDataStats) {
+   foreach $Direction (keys %{$Stats}) {
+      print "\nTransfer statistics - $Direction files:\n";
+      
+      print "\t$Stats->{$Direction}->{files_count} $Direction files\n";
+      printf "\t%.2f $Direction MB\n", 
($Stats->{$Direction}->{'files_size'}/1024)/1024;
+      print "\t$Stats->{$Direction}->{speed}->{max}KB max speed\n";
+      printf "\t%.2fKB/s average speed\n", 
$Stats->{$Direction}->{'speed'}->{'tmp_size'}/$Stats->{$Direction}->{'speed'}->{'tmp_time'}/1024;
+      @top_people = sort { $Stats->{$Direction}->{'people'}->{$b} <=> 
$Stats->{$Direction}->{'people'}->{$a} } keys %{ 
$Stats->{$Direction}->{'people'} };
+      if (@top_people) {
+         print "\tTop $TopPeopleNr people:\n";
+         foreach $User (splice @top_people, 0, $TopPeopleNr) {
+            printf "\t\t%7.2fMB $User\n", 
$Stats->{$Direction}->{'people'}->{$User}/1024/1024;
+         }
+      }
+   }
+}
+
 if ($ShowDataTransfers) {
-   if (keys %{$Direction}) {
-      print "\nData Transferred:\n";
-      foreach $User (sort {$a cmp $b} keys %{$Direction}) {
-         foreach $Location (sort {$a cmp $b} keys %{$Direction->{$User}}) {
-            foreach $Filename (sort {$a cmp $b} keys 
%{$Direction->{$User}->{$Location}}) {
+   foreach $Direction (keys %{$Transfers}) {
+      print "\nData $Direction:\n";
+      foreach $User (sort {$a cmp $b} keys %{ $Transfers->{$Direction} }) {
+         foreach $Location (sort {$a cmp $b} keys %{ 
$Transfers->{$Direction}->{$User} }) {
+            foreach $Filename (sort {$a cmp $b} keys %{ 
$Transfers->{$Direction}->{$User}->{$Location}}) {
                print "\tUser " . $User . " " . $Direction . " " . $Filename . 
" from " . $Location . " - ". $Direction->{$User}->{$Location}->{$Filename} . " 
Time(s)\n";
             }
          }
       }
-   }
+   }   
 }
 
 if (keys %SecureAnon) {
@@ -129,7 +158,7 @@ if ($ShowLogouts) {
    }
 }
 
-if (($#OtherList >= 0) and (not $IngoreUnmatched)){
+if (($#OtherList >= 0) and (not $IgnoreUnmatched)){
    print "\n**Unmatched Entries**\n";
    print @OtherList;
 }

--qMm9M+Fa2AknHoGS--

---------------------------------------
Received: (at 317913-close) by bugs.debian.org; 28 Nov 2005 10:51:29 +0000
>From [EMAIL PROTECTED] Mon Nov 28 02:51:29 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 4.50)
        id 1EggXR-000328-6r; Mon, 28 Nov 2005 02:47:13 -0800
From: Willi Mann <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.60 $
Subject: Bug#317913: fixed in logwatch 7.1-1
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Mon, 28 Nov 2005 02:47:13 -0800
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Source: logwatch
Source-Version: 7.1-1

We believe that the bug you reported is fixed in the latest version of
logwatch, which is due to be installed in the Debian FTP archive:

logwatch_7.1-1.diff.gz
  to pool/main/l/logwatch/logwatch_7.1-1.diff.gz
logwatch_7.1-1.dsc
  to pool/main/l/logwatch/logwatch_7.1-1.dsc
logwatch_7.1-1_all.deb
  to pool/main/l/logwatch/logwatch_7.1-1_all.deb
logwatch_7.1.orig.tar.gz
  to pool/main/l/logwatch/logwatch_7.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Willi Mann <[EMAIL PROTECTED]> (supplier of updated logwatch package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 19 Nov 2005 16:39:24 +0100
Source: logwatch
Binary: logwatch
Architecture: source all
Version: 7.1-1
Distribution: unstable
Urgency: low
Maintainer: Willi Mann <[EMAIL PROTECTED]>
Changed-By: Willi Mann <[EMAIL PROTECTED]>
Description: 
 logwatch   - log analyser with nice output written in Perl
Closes: 317894 317913 323919
Changes: 
 logwatch (7.1-1) unstable; urgency=low
 .
   * New upstream release
     - new standards version 3.6.2 (no changes)
     - Closes: #317894, frequent typo "IngnoreUnmatched" in various scripts,
       Closes: #317913, fixes in pure-ftpd
       both fixes by Piotr Krukowiecki (thanks)
     - Closes: #323919, regexes for http exploits did not escape "."
       thanks to Taco IJsselmuiden for the report
   * Cope with the new directory layout.
     - There is a preinst script now, the removes unneeded config files.
     - README.Debian updated
     - NEWS.Debian added
     - debian/rules updated
   * This package is now maintained as project "pkg-logwatch" on
     alioth.debian.org. The svn repository is on svn.debian.org.
   * Depend on gawk, and explicity use it in zz-disk_space. Seems that there is
     some GNUism.
Files: 
 fbd5d72d4a790ab87674cd70ec2d8820 560 admin optional logwatch_7.1-1.dsc
 6abe774abb10f45472c387f5e646a251 209486 admin optional logwatch_7.1.orig.tar.gz
 d04dbce6dba7101b8256d601996b8e19 13514 admin optional logwatch_7.1-1.diff.gz
 f1ee084fb39704424e06c069afaf1f3b 216712 admin optional logwatch_7.1-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDitxKliSD4VZixzQRAgfZAJ428Q8EvJ5tBDR+BOZ3qLVwAu+ZwACcC1i1
tXtxKjeq8hOi5/6n0DOh3sQ=
=OPzF
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to