Marcin Owsiany
2005-Apr-02 11:21 UTC
[Logcheck-devel] Bug#302689: treats non-zero egrep exit status as failure
Package: logcheck Version: 1.2.36 Severity: important Tags: patch "debdiff logcheck_1.2.35.dsc logcheck_1.2.36.dsc" shows this among other changes: - egrep --text -v -f $clean/$file $TMPDIR/checked | cat \ - >> $TMPDIR/checked.1 \ - || error "Could not output to TMPDIR/checked.1 Disk Full?" + (egrep --text -v -f $clean/$file $TMPDIR/checked \ + || warn "Could not process file $file") | cat \ + >> $TMPDIR/checked.1 \ + || error "Could not output to $TMPDIR/checked.1 Disk Full?" However this causes spurious reports looking like this: | System Events | =-=-=-=-=-=-| | | Logcheck Warnings | =-=-=-=-=-=-=-=-| Could not process file spamassassin | This is because egrep returns 1 if no lines are found: | DIAGNOSTICS | Normally, exit status is 0 if selected lines are found and 1 otherwise. | But the exit status is 2 if an error occurred, unless the -q or --quiet | or --silent option is used and a selected line is found. The quick fix is to simply revert that change. A better one would be to write a more elaborate condition on whether egrep returned exit code 2. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.4.27-2-k7 Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2) Versions of packages logcheck depends on: ii adduser 3.63 Add and remove users and groups ii cron 3.0pl1-87 management of regular background p ii debconf [debconf 1.4.47 Debian configuration management sy ii debianutils 2.13.2 Miscellaneous utilities specific t ii exim4 4.50-4 metapackage to ease exim MTA (v4) ii exim4-daemon-hea 4.50-4 exim MTA (v4) daemon with extended ii lockfile-progs 0.1.10 Programs for locking and unlocking ii logcheck-databas 1.2.36 A database of system log rules for ii logtail 1.2.36 Print log file lines that have not ii mailx 1:8.1.2-0.20040524cvs-4 A simple mail user agent ii sysklogd [system 1.4.1-16 System Logging Daemon -- debconf information: logcheck/changes: * logcheck/install-note:
maximilian attems
2005-Apr-02 19:42 UTC
Bug#302689: [Logcheck-devel] Bug#302689: treats non-zero egrep exit status as failure
severity 302689 serious thanks On Sat, 02 Apr 2005, Marcin Owsiany wrote:> Tags: patch > > "debdiff logcheck_1.2.35.dsc logcheck_1.2.36.dsc" shows this among other > changes: > > - egrep --text -v -f $clean/$file $TMPDIR/checked | cat \ > - >> $TMPDIR/checked.1 \ > - || error "Could not output to TMPDIR/checked.1 Disk Full?" > + (egrep --text -v -f $clean/$file $TMPDIR/checked \ > + || warn "Could not process file $file") | cat \ > + >> $TMPDIR/checked.1 \ > + || error "Could not output to $TMPDIR/checked.1 Disk Full?" > > However this causes spurious reports looking like this:urrgs thanks for your report, pumping up the severity to keep that version out of sarge. thanks Matthew for your patch, will add it to cvs and retest. -- maks
Debian Bug Tracking System
2005-Apr-03 00:48 UTC
[Logcheck-devel] Bug#302689: marked as done (treats non-zero egrep exit status as failure)
Your message dated Sat, 02 Apr 2005 19:32:08 -0500 with message-id <E1DHt28-0001S2-00 at newraff.debian.org> and subject line Bug#302689: fixed in logcheck 1.2.37 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; 2 Apr 2005 11:20:23 +0000>From marcin at owsiany.pl Sat Apr 02 03:20:23 2005Return-path: <marcin at owsiany.pl> Received: from gluck.debian.org [192.25.206.10] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DHgfu-0001du-00; Sat, 02 Apr 2005 03:20:22 -0800 Received: from starnet.skynet.com.pl (skynet.skynet.com.pl) [213.25.173.230] by gluck.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DHgfs-0003P2-00; Sat, 02 Apr 2005 04:20:21 -0700 Received: from spider.ds11.agh.edu.pl ([149.156.124.11] helo=melina11.ds11.agh.edu.pl) by skynet.skynet.com.pl with asmtp (Exim 3.35 #1 (Debian)) id 1DHgch-0008Mf-00; Sat, 02 Apr 2005 13:17:03 +0200 Received: from porridge by melina11.ds11.agh.edu.pl with local (Exim kuku 4.50) id 1DHggc-0002n3-HX; Sat, 02 Apr 2005 13:21:06 +0200 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Marcin Owsiany <marcin at owsiany.pl> To: Debian Bug Tracking System <submit at bugs.debian.org> Subject: treats non-zero egrep exit status as failure X-Mailer: reportbug 3.9 Date: Sat, 02 Apr 2005 13:21:06 +0200 Message-Id: <E1DHggc-0002n3-HX at melina11.ds11.agh.edu.pl> X-Scanner: exiscan *1DHgch-0008Mf-00*tHvwUkWdW52* Delivered-To: submit at bugs.debian.org 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: Package: logcheck Version: 1.2.36 Severity: important Tags: patch "debdiff logcheck_1.2.35.dsc logcheck_1.2.36.dsc" shows this among other changes: - egrep --text -v -f $clean/$file $TMPDIR/checked | cat \ - >> $TMPDIR/checked.1 \ - || error "Could not output to TMPDIR/checked.1 Disk Full?" + (egrep --text -v -f $clean/$file $TMPDIR/checked \ + || warn "Could not process file $file") | cat \ + >> $TMPDIR/checked.1 \ + || error "Could not output to $TMPDIR/checked.1 Disk Full?" However this causes spurious reports looking like this: | System Events | =-=-=-=-=-=-| | | Logcheck Warnings | =-=-=-=-=-=-=-=-| Could not process file spamassassin | This is because egrep returns 1 if no lines are found: | DIAGNOSTICS | Normally, exit status is 0 if selected lines are found and 1 otherwise. | But the exit status is 2 if an error occurred, unless the -q or --quiet | or --silent option is used and a selected line is found. The quick fix is to simply revert that change. A better one would be to write a more elaborate condition on whether egrep returned exit code 2. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.4.27-2-k7 Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2) Versions of packages logcheck depends on: ii adduser 3.63 Add and remove users and groups ii cron 3.0pl1-87 management of regular background p ii debconf [debconf 1.4.47 Debian configuration management sy ii debianutils 2.13.2 Miscellaneous utilities specific t ii exim4 4.50-4 metapackage to ease exim MTA (v4) ii exim4-daemon-hea 4.50-4 exim MTA (v4) daemon with extended ii lockfile-progs 0.1.10 Programs for locking and unlocking ii logcheck-databas 1.2.36 A database of system log rules for ii logtail 1.2.36 Print log file lines that have not ii mailx 1:8.1.2-0.20040524cvs-4 A simple mail user agent ii sysklogd [system 1.4.1-16 System Logging Daemon -- debconf information: logcheck/changes: * logcheck/install-note: --------------------------------------- Received: (at 302689-close) by bugs.debian.org; 3 Apr 2005 00:38:59 +0000>From katie at ftp-master.debian.org Sat Apr 02 16:38:59 2005Return-path: <katie at ftp-master.debian.org> Received: from gluck.debian.org [192.25.206.10] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DHt8l-0002wx-00; Sat, 02 Apr 2005 16:38:59 -0800 Received: from newraff.debian.org [208.185.25.31] (mail) by gluck.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DHt8l-0004qn-00; Sat, 02 Apr 2005 17:38:59 -0700 Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian)) id 1DHt28-0001S2-00; Sat, 02 Apr 2005 19:32:08 -0500 From: Todd Troxell <ttroxell at debian.org> To: 302689-close at bugs.debian.org X-Katie: $Revision: 1.55 $ Subject: Bug#302689: fixed in logcheck 1.2.37 Message-Id: <E1DHt28-0001S2-00 at newraff.debian.org> Sender: Archive Administrator <katie at ftp-master.debian.org> Date: Sat, 02 Apr 2005 19:32:08 -0500 Delivered-To: 302689-close at bugs.debian.org 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=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: X-CrossAssassin-Score: 3 Source: logcheck Source-Version: 1.2.37 We believe that the bug you reported is fixed in the latest version of logcheck, which is due to be installed in the Debian FTP archive: logcheck-database_1.2.37_all.deb to pool/main/l/logcheck/logcheck-database_1.2.37_all.deb logcheck_1.2.37.dsc to pool/main/l/logcheck/logcheck_1.2.37.dsc logcheck_1.2.37.tar.gz to pool/main/l/logcheck/logcheck_1.2.37.tar.gz logcheck_1.2.37_all.deb to pool/main/l/logcheck/logcheck_1.2.37_all.deb logtail_1.2.37_all.deb to pool/main/l/logcheck/logtail_1.2.37_all.deb 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 302689 at bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Todd Troxell <ttroxell at debian.org> (supplier of updated logcheck 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 ftpmaster at debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Saturday, 2 Apr 2005 17:57:00 -0500 Source: logcheck Binary: logcheck logtail logcheck-database Architecture: source all Version: 1.2.37 Distribution: unstable Urgency: low Maintainer: Debian logcheck Team <logcheck-devel at lists.alioth.debian.org> Changed-By: Todd Troxell <ttroxell at debian.org> Description: logcheck - Mails anomalies in the system logfiles to the administrator logcheck-database - A database of system log rules for the use of log checkers logtail - Print log file lines that have not been read Closes: 298495 302678 302689 302744 Changes: logcheck (1.2.37) unstable; urgency=low . maks: * Fix routine message when resolvconf is installed. thanks for patch to Thomas Hood <jdthood at aglu.demon.nl> (Closes: #302678) * Add postfix rules for local procmail delivery. (Closes: #302744) * Fix logcheck su rule reporting valid `su -' use. * Add nagios rule for UNREACHABLE messages. thanks for patch to Geoff Crompton <geoff.crompton at strategicdata.com.au> (Closes: #298495) todd: * Revert warning on bad regex code (Closes: #302689) Files: e9c78a935df9b4636f90ac8665c672b7 703 admin optional logcheck_1.2.37.dsc f1ae8e497884da1a52797e7785729cbc 92707 admin optional logcheck_1.2.37.tar.gz def864951111cc13ed067c3abfe2b96c 43912 admin optional logcheck_1.2.37_all.deb b1c78bd4f290d8997d7c37628e8f3d40 60432 admin optional logcheck-database_1.2.37_all.deb 7ad622c61e77b262efbb2d12db0831f4 26874 admin optional logtail_1.2.37_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCTyQQ4u3oQ3FHP2YRAvY1AKDGbqYSxrpwxtZaNSVdmqkHF2qqBgCgkbis 6xz/33sY3zVwcdoiax48wwk=VsgA -----END PGP SIGNATURE-----