From owner-freebsd-current@FreeBSD.ORG Mon Mar 20 00:07:02 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 162B316A420 for ; Mon, 20 Mar 2006 00:07:02 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A740943D45 for ; Mon, 20 Mar 2006 00:07:01 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id k2K06v8S015481; Sun, 19 Mar 2006 19:06:57 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <441DE4B9.8080708@bitfreak.org> References: <99353.1142604012@critter.freebsd.dk> <441DE4B9.8080708@bitfreak.org> Date: Sun, 19 Mar 2006 19:06:56 -0500 To: Darren Pilgrim From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.4 Cc: freebsd-current@FreeBSD.org Subject: Re: PROPOSAL for periodic/security/800.loginfail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 00:07:02 -0000 At 3:09 PM -0800 3/19/06, Darren Pilgrim wrote: >Garance A Drosehn wrote: >> >> When printing the user-specific information, it only prints >> the second line of "to users: " when there was more than one >> userid found. If only one userid was found, then it just >> tacks something like "u: root*3" on the first line. > >A common, single-line format would make automated parsing simpler. >Instead of entries like this: > > 5 from 127.0.225.154 @ 14:39 -> 14:40 Dec 28 > to users: root*3 + 1 others > 3 from 127.0.73.182 @ 21:57 -> 21:58 Dec 26 u: root*3 > >Do something like this: > > 5 from 127.0.225.154 @ 14:39 -> 14:40 Dec 28 to >users: root*3 + 1 others > 3 from 127.0.73.182 @ 21:57 -> 21:58 Dec 26 to >users: root*3 XML would make parsing even easier. That is not meant as a sarcastic comment, it is just an observation (and one that I did think about when working on this fmt). In any case, I wanted to keep the message readable by humans, not by other scripts. When I'm reading these security emails, I'm always reading them in an 80-column window. I read them the emails, I don't have scripts read them. So that's why I wanted to avoid line wrap. While I'm sure we can improve on this format if we sat around and brain-stormed for awhile, I would prefer something like this for now, just so I have a chance to get it committed in time for 6.1-release. We can always improve on it later. And the setup is also flexible enough that anyone can select a different script if they want a different format. ...Still, I might try something along the lines you suggest, probably as a selectable option, if I have some time while cleaning up other details. It might be trivial to support. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA