From owner-freebsd-bugs Tue Feb 18 14: 0:30 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCD1837B401 for ; Tue, 18 Feb 2003 14:00:27 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1A8543F93 for ; Tue, 18 Feb 2003 14:00:26 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1IM0QNS091559 for ; Tue, 18 Feb 2003 14:00:26 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1IM0QHM091558; Tue, 18 Feb 2003 14:00:26 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C42637B401 for ; Tue, 18 Feb 2003 13:56:12 -0800 (PST) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id B520443F93 for ; Tue, 18 Feb 2003 13:56:11 -0800 (PST) (envelope-from alan@agora.rdrop.com) Received: from agora.rdrop.com (202@localhost [127.0.0.1]) by agora.rdrop.com (8.12.7/8.12.5) with ESMTP id h1ILuBpj066190 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Tue, 18 Feb 2003 13:56:11 -0800 (PST) (envelope-from alan@agora.rdrop.com) Received: (from alan@localhost) by agora.rdrop.com (8.12.7/8.12.6/Submit) id h1ILuBLt066189; Tue, 18 Feb 2003 13:56:11 -0800 (PST) Message-Id: <200302182156.h1ILuBLt066189@agora.rdrop.com> Date: Tue, 18 Feb 2003 13:56:11 -0800 (PST) From: Alan Batie Reply-To: Alan Batie To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/48443: /usr/sbin/periodic executes too many files Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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