Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Nov 2013 20:14:11 GMT
From:      Christopher <christomania@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/183820: error in /usr/local/etc/periodic/security/410.pkg-audit
Message-ID:  <201311092014.rA9KEBqC056546@oldred.freebsd.org>
Resent-Message-ID: <201311092020.rA9KK06C001742@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183820
>Category:       misc
>Synopsis:       error in /usr/local/etc/periodic/security/410.pkg-audit
>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:   Sat Nov 09 20:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Christopher
>Release:        9.2-RELEASE
>Organization:
>Environment:
FreeBSD ******** 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I think I found an error in one of the periodic security pkg scripts: /usr/local/etc/periodic/security/410.pkg-audit

the awk expression to set PKG_DBDIR variable is
awk -F: '$1 ~ /PKG_DBDIR$/ { print $2 }'

this does not work because the line is as
PKG_DBDIR: /.../....

so the variable PKG_DBDIR is " /.../..."
there is a space at the beginning of the script.

next the stat command failed because of the space
stat -f %m " /.../...."

>How-To-Repeat:
you can run :

sh -f -x /usr/local/etc/periodic/security/410.pkg-audit
>Fix:
I suggest the following modification:

awk -F ': ' '$1 ~ /PKG_DBDIR$/ { print $2 }'

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311092014.rA9KEBqC056546>