Wouter Koolen-Wijkstra
2004-Sep-23 06:49 UTC
[Logcheck-devel] Bug#272969: logcheck-database: violations.ignore.d/logcheck-sudo can not handle spaces in directory names
Package: logcheck-database Version: 1.2.27 Severity: normal Dear maintainer, The file violations.ignore.d/logcheck-sudo contains the following pattern to filter out normal uses of sudo: ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ sudo:[[:space:]]+[_[:alnum:]-]+ : TTY=(unknown|pts/[0-9]+) ; PWD=[^[:space:]]+ ; USER=[ ^[:space:]]+ ; COMMAND=/(usr|etc|bin|sbin)/.*$ The problem is the part that maches the directory where sudo was executed by the user: PWD=[^[:space:]]+ ; This regexp presupposes that directory names do not contain spaces. Spaces are not specially marked (e.g. '\ ') in the log. I propose to not bother about them and just match upto the next ';' instead. PWD=[^;]+; This of course presupposes that directories do not contain ';'s. This problem will remain, as directory names can contain anything, and sudo does not mark the beginning or end. But directories containin ';' are (I suppose) far less common than those containing sp aces. Best regards, Wouter Koolen-Wijkstra -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.8optimized.1.8 Locale: LANG=C, LC_CTYPE=C Versions of packages logcheck-database depends on: ii debconf [debconf-2.0] 1.4.36 Debian configuration management sy -- debconf information: logcheck-database/conffile-cleanup: false * logcheck-database/rules-directories-note: logcheck-database/standard-rename-note:
maks attems
2004-Sep-25 20:44 UTC
Bug#272969: [Logcheck-devel] Bug#272969: logcheck-database: violations.ignore.d/logcheck-sudo can not handle spaces in directory names
On Thu, 23 Sep 2004, Wouter Koolen-Wijkstra wrote: ..> The problem is the part that maches the directory where sudo was > executed by the user: > PWD=[^[:space:]]+ ; > > This regexp presupposes that directory names do not contain spaces. > Spaces are not specially marked (e.g. '\ ') in the log. I propose to > not bother about them and just match upto the next ';' instead. > PWD=[^;]+;my be were that linux users don't like spaces in their dir, but you are right.> This of course presupposes that directories do not contain ';'s. This > problem will remain, as directory names can contain anything, and sudo > does not mark the beginning or end. But directories containin ';' are (I > suppose) far less common than those containing sp > aces.fully agreed, a path can contain any char beside the '\0', i prefer to use 'PWD=.+;' to fullfill your wishes, and will commit that soon to logcheck cvs, if nobody disagrees. :) have a nice weekend. -- maks
Debian Bug Tracking System
2004-Oct-17 00:03 UTC
[Logcheck-devel] Bug#272969: marked as done (logcheck-database: violations.ignore.d/logcheck-sudo can not handle spaces in directory names)
Your message dated Sat, 16 Oct 2004 19:47:08 -0400 with message-id <E1CIyGS-0006nw-00 at newraff.debian.org> and subject line Bug#272969: fixed in logcheck 1.2.29 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; 23 Sep 2004 06:47:25 +0000>From wmkoolen at science.uva.nl Wed Sep 22 23:47:25 2004Return-path: <wmkoolen at science.uva.nl> Received: from a31046.upc-a.chello.nl (smtp.weespernet.nl) [62.163.31.46] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CANO1-0001dl-00; Wed, 22 Sep 2004 23:47:25 -0700 Received: from [192.168.100.17] (helo=WenS) by smtp.weespernet.nl with esmtp (Exim 3.35 #1 (Debian)) id 1CANNz-0000A3-00; Thu, 23 Sep 2004 08:47:23 +0200 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by WenS with esmtp (Exim 4.34) id 1CANQ1-0001yN-J8; Thu, 23 Sep 2004 08:49:29 +0200 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Wouter Koolen-Wijkstra <wmkoolen at science.uva.nl> To: Debian Bug Tracking System <submit at bugs.debian.org> Subject: logcheck-database: violations.ignore.d/logcheck-sudo can not handle spaces in directory names Bcc: Wouter Koolen-Wijkstra <wmkoolen at science.uva.nl> X-Mailer: reportbug 2.99.3 Date: Thu, 23 Sep 2004 08:49:29 +0200 Message-ID: <E1CANQ1-0001yN-J8 at WenS> Delivered-To: submit at bugs.debian.org X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 (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_2004_03_25 X-Spam-Level: Package: logcheck-database Version: 1.2.27 Severity: normal Dear maintainer, The file violations.ignore.d/logcheck-sudo contains the following pattern to filter out normal uses of sudo: ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ sudo:[[:space:]]+[_[:alnum:]-]+ : TTY=(unknown|pts/[0-9]+) ; PWD=[^[:space:]]+ ; USER=[ ^[:space:]]+ ; COMMAND=/(usr|etc|bin|sbin)/.*$ The problem is the part that maches the directory where sudo was executed by the user: PWD=[^[:space:]]+ ; This regexp presupposes that directory names do not contain spaces. Spaces are not specially marked (e.g. '\ ') in the log. I propose to not bother about them and just match upto the next ';' instead. PWD=[^;]+; This of course presupposes that directories do not contain ';'s. This problem will remain, as directory names can contain anything, and sudo does not mark the beginning or end. But directories containin ';' are (I suppose) far less common than those containing sp aces. Best regards, Wouter Koolen-Wijkstra -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.8optimized.1.8 Locale: LANG=C, LC_CTYPE=C Versions of packages logcheck-database depends on: ii debconf [debconf-2.0] 1.4.36 Debian configuration management sy -- debconf information: logcheck-database/conffile-cleanup: false * logcheck-database/rules-directories-note: logcheck-database/standard-rename-note: --------------------------------------- Received: (at 272969-close) by bugs.debian.org; 16 Oct 2004 23:53:04 +0000>From katie at ftp-master.debian.org Sat Oct 16 16:53:04 2004Return-path: <katie at ftp-master.debian.org> Received: from newraff.debian.org [208.185.25.31] (mail) by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CIyMC-0006lR-00; Sat, 16 Oct 2004 16:53:04 -0700 Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian)) id 1CIyGS-0006nw-00; Sat, 16 Oct 2004 19:47:08 -0400 From: Todd Troxell <ttroxell at debian.org> To: 272969-close at bugs.debian.org X-Katie: $Revision: 1.51 $ Subject: Bug#272969: fixed in logcheck 1.2.29 Message-Id: <E1CIyGS-0006nw-00 at newraff.debian.org> Sender: Archive Administrator <katie at ftp-master.debian.org> Date: Sat, 16 Oct 2004 19:47:08 -0400 Delivered-To: 272969-close at bugs.debian.org X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 (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_2004_03_25 X-Spam-Level: X-CrossAssassin-Score: 3 Source: logcheck Source-Version: 1.2.29 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.29_all.deb to pool/main/l/logcheck/logcheck-database_1.2.29_all.deb logcheck_1.2.29.dsc to pool/main/l/logcheck/logcheck_1.2.29.dsc logcheck_1.2.29.tar.gz to pool/main/l/logcheck/logcheck_1.2.29.tar.gz logcheck_1.2.29_all.deb to pool/main/l/logcheck/logcheck_1.2.29_all.deb logtail_1.2.29_all.deb to pool/main/l/logcheck/logtail_1.2.29_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 272969 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, 16 Oct 2004 19:14:03 -0500 Source: logcheck Binary: logcheck logtail logcheck-database Architecture: source all Version: 1.2.29 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: 270019 270677 272969 273433 276063 276317 Changes: logcheck (1.2.29) unstable; urgency=low . maks: * Don't report sudo calls where pwd contains spaces (Closes: #272969) * Fix trailing space in perdition rule. (Closes: #273433) * Small documentation update how to test rules without fiddling with trailing space. * sed fine tuning to speed up + remove trailing tabs. thanks alfie * Don't use -m switch from sort, it basically disables sorting. Remove gratious call to uniq that should be done with SORTUNIQ. (Closes: #270677) * Add violations.ignore.d/su on old logfiles to be removed on sarge upgrade. * Add rules for kdm/wdm/xdm, kernel (usb, keyboard) on level workstation. * Only show "rules-directories-note" on upgrade. * Enhance ppp rules on level workstation. (Closes: #270019) Add pppoa3 rules to the ppp rules. * Small update concerning reject messages in postfix + new rule. * Added pptpd rules at level workstation. thanks to Erich Schubert <erich at debian.org> * Added first pure-ftpd rules at level server. * Fix cyrus violations.ignore.d rules for higher pids. todd: * Add 1 dovecot rule * Fix another permission issue involving rulefiles. Added chown to debian/ rules. * Simpler formatting on version string. jamie: * Updated rules for innd, added rule for cleanfeed. * Small correction to gps rules. * Added SPF postfix policy server rule for 'SPF pass'. * Fix spelling mistake in dhcp rules. (Closes: #276063) * Change dhcp rules to reflect ISC's change of name. Thanks to Dirk Prosdorf for the patch. (Closes: #276317) Files: f7720d493d22ecc98da401f694d4b894 668 admin optional logcheck_1.2.29.dsc 6eb2aca5a62e1506ff9da91f70c5c5dc 83385 admin optional logcheck_1.2.29.tar.gz a16f72d33f2f74b99454ed59ff088e14 40122 admin optional logcheck_1.2.29_all.deb 22c9bc92215aa4917125903264492df0 50294 admin optional logcheck-database_1.2.29_all.deb 0be6a2f4354e5eb85654aeab28020c4e 23734 admin optional logtail_1.2.29_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBcawf4u3oQ3FHP2YRAploAKCeVtHWvKgupv3HIiRtX3b2nt2nZACeJ8Xu oHXCzqSgmE6v9mCNWbspCNY=qAeK -----END PGP SIGNATURE-----