Date: Tue, 18 Feb 2003 13:56:11 -0800 (PST) From: Alan Batie <alan@agora.rdrop.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/48443: /usr/sbin/periodic executes too many files Message-ID: <200302182156.h1ILuBLt066189@agora.rdrop.com>
next in thread | raw e-mail | index | archive | help
>Number: 48443
>Category: bin
>Synopsis: /usr/sbin/periodic executes too many 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: Tue Feb 18 14:00:26 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Alan Batie
>Release: FreeBSD 4.7-STABLE i386
>Organization:
RainDrop Laboratories
>Environment:
System: FreeBSD agora.rdrop.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Mon Feb 3 00:57:16 PST 2003 root@agora.rdrop.com:/usr/src/freebsd/src/sys/compile/AGORA i386
>Description:
I was adding some functionality to the kernel message security
check, and in the debugging process found that the extra script
I added was getting executed independently. Further investigation
found that /usr/sbin/periodic runs $dir/*. Since the file
security_functions already exists in /etc/periodic/security as a
file to be sourced, rather than executed standalone, this is
apparently not correct behavior. I believe the intention is to
execute $dir/[0-9]*.
>How-To-Repeat:
Create a file 'xyzzy' in /etc/periodic/security containing
echo xyzzy
then run "/usr/sbin/periodic security"
>Fix:
Index: periodic.sh
===================================================================
RCS file: /home/ncvs/src/usr.sbin/periodic/periodic.sh,v
retrieving revision 1.9.2.8
diff -c -r1.9.2.8 periodic.sh
*** periodic.sh 21 May 2002 03:09:35 -0000 1.9.2.8
--- periodic.sh 18 Feb 2003 21:48:00 -0000
***************
*** 72,78 ****
processed=0
for dir in $dirlist
do
! for file in $dir/*
do
if [ -x $file -a ! -d $file ]
then
--- 72,78 ----
processed=0
for dir in $dirlist
do
! for file in $dir/[0-9]*
do
if [ -x $file -a ! -d $file ]
then
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302182156.h1ILuBLt066189>
