From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 30 09:50:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7701065675 for ; Thu, 30 Aug 2012 09:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 81FAF8FC19 for ; Thu, 30 Aug 2012 09:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7U9o1m8047081 for ; Thu, 30 Aug 2012 09:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7U9o1Jj047080; Thu, 30 Aug 2012 09:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 30 Aug 2012 09:50:01 GMT Resent-Message-Id: <201208300950.q7U9o1Jj047080@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, freebsd@nagilum.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80B4F106564A for ; Thu, 30 Aug 2012 09:43:08 +0000 (UTC) (envelope-from root@cakebox.homeunix.net) Received: from mo6-p05-ob.rzone.de (mo6-p05-ob.rzone.de [IPv6:2a01:238:20a:202:5305::1]) by mx1.freebsd.org (Postfix) with ESMTP id 11E1F8FC12 for ; Thu, 30 Aug 2012 09:43:07 +0000 (UTC) Received: from cakebox.homeunix.net (164-010-186-093.dialin.vsenet.de [93.186.10.164]) by smtp.strato.de (josoe mo37) (RZmta 30.12 DYNA|AUTH) with (DHE-RSA-AES256-SHA encrypted) ESMTPA id 406b87o7U99tUF ; Thu, 30 Aug 2012 11:43:04 +0200 (CEST) Received: from cakebox.homeunix.net (localhost [127.0.0.1]) by cakebox.homeunix.net (Postfix) with ESMTP id A0DE36791E; Thu, 30 Aug 2012 11:42:15 +0200 (CEST) Received: by cakebox.homeunix.net (Postfix, from userid 0) id 7481167908; Thu, 30 Aug 2012 11:42:12 +0200 (CEST) Message-Id: <20120830094212.7481167908@cakebox.homeunix.net> Date: Thu, 30 Aug 2012 11:42:12 +0200 (CEST) From: freebsd@nagilum.org To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: kensmith@FreeBSD.org Subject: misc/171180: make 460.chkportsum also report missing files X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 09:50:01 -0000 >Number: 171180 >Category: misc >Synopsis: make 460.chkportsum also report missing files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 30 09:50:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: freebsd@nagilum.org >Release: FreeBSD 10.0-CURRENT i386 >Organization: >Environment: System: FreeBSD cakebox.tis 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Wed Aug 29 13:01:13 CEST 2012 root@cakebox.tis:/usr/obj/export/src/sys/net5501 i386 >Description: The security daily script /etc/periodic/security/460.chkportsum fails to notify if a file from a port is missing. >How-To-Repeat: 1) add 'daily_status_security_chkportsum_enable="YES"' to your /etc/periodic.conf 2) delete/rename a file that was installed via a port 3) run "/etc/periodic/security/460.chkportsum" or wait for the daily security run output e-mail >Fix: Apply attached patch. --- 460.chkportsum.patch begins here --- --- /etc/periodic/security/460.chkportsum.old 2012-07-15 01:36:21.000000000 +0200 +++ /etc/periodic/security/460.chkportsum 2012-08-30 11:33:27.000000000 +0200 @@ -43,7 +43,7 @@ case "${daily_status_security_chkportsum_enable}" in [Yy][Ee][Ss]) set -f - pkg_info -ga 2>/dev/null | \ + stdbuf -o L pkg_info -ga 2>&1 | \ while IFS= read -r line; do set -- $line case $1 in @@ -55,7 +55,7 @@ ;; Mismatched|'') ;; *) [ -n "${name}" ] && - echo "${name}: ${line%% fails the original MD5 checksum}" + echo "${name}: ${line%% fails the original MD5 checksum}"|sed -e 's/pkg_info: //' -e "s/doesn't\ exist/is\ missing/" ;; esac done --- 460.chkportsum.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: