From nobody@FreeBSD.org  Thu May  8 06:44:57 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1845106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 May 2008 06:44:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id CEEB48FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 May 2008 06:44:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m486i2hr076102
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 8 May 2008 06:44:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m486i26e076101;
	Thu, 8 May 2008 06:44:02 GMT
	(envelope-from nobody)
Message-Id: <200805080644.m486i26e076101@www.freebsd.org>
Date: Thu, 8 May 2008 06:44:02 GMT
From: Will <disposable_freebsd@therag.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Daily Security Logs Not Reporting Failed Logins
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123516
>Category:       conf
>Synopsis:       [periodic] Daily Security Logs Not Reporting Failed Logins
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 08 06:50:01 UTC 2008
>Closed-Date:    Sun Aug 29 12:46:28 UTC 2010
>Last-Modified:  Sun Aug 29 12:46:28 UTC 2010
>Originator:     Will
>Release:        7.0
>Organization:
>Environment:
FreeBSD Dogbert.NameBrandHandle.Net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
My daily mails have stoped reporting failed logins when there are failed logins in /etc/auth.log

I have traced this down as a formatting issue in the yestarday variable of /etc/periodic/800.loginfail

When egrep runs it is using the yesterday variable which reads: "May 7 "

The log files are being written to start "May  7 "

This causes the egrep to fail, thus not displaying any logs
>How-To-Repeat:
When I look at the syntax of the yestarday variable date command, it outputs the correct format when run from the command line.

/etc/periodic/security/800.loginfail:
yesterday=`date -v-1d "+%b %e"`
           -------------------

Script Output: "May 7"
Command Line Output: "May  7"
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-standards->freebsd-bugs 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Thu May 8 08:26:10 UTC 2008 
Responsible-Changed-Why:  

reclassify 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123516 
State-Changed-From-To: open->closed 
State-Changed-By: vwe 
State-Changed-When: Sun Aug 29 12:45:52 UTC 2010 
State-Changed-Why:  
fixed by r180111, thank you for your report 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123516 
>Unformatted:
note: the issue is two spaces between the weekday and the day-of-month
