From owner-freebsd-current@FreeBSD.ORG Wed May 23 17:36:29 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 966D516A41F for ; Wed, 23 May 2007 17:36:29 +0000 (UTC) (envelope-from craig@xfoil.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 512DA13C4B0 for ; Wed, 23 May 2007 17:36:27 +0000 (UTC) (envelope-from craig@xfoil.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 16A8F110C5; Wed, 23 May 2007 12:36:27 -0500 (CDT) Date: Wed, 23 May 2007 12:36:18 -0500 From: Craig Boston To: Doug Barton Message-ID: <20070523173618.GA22034@nowhere> Mail-Followup-To: Craig Boston , Doug Barton , freebsd-current@FreeBSD.ORG, "Ralf S. Engelschall" References: <200705230911.l4N9Bssl015397@lurza.secnetix.de> <20070523101529.K46653@ync.qbhto.arg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070523101529.K46653@ync.qbhto.arg> User-Agent: Mutt/1.4.2.2i Cc: freebsd-current@FreeBSD.ORG, "Ralf S. Engelschall" Subject: Re: etc/rc.d/{var,tmp} and sub-shell usage?! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 17:36:29 -0000 On Wed, May 23, 2007 at 10:21:23AM -0700, Doug Barton wrote: > Using 'echo > file' will work just as well, and avoid the cost of invoking > ln. It seems like that could be vulnerable to malicious symbolic links lying around from the previous boot. Doing an rm first should work as during this stage of system startup there shouldn't be any race conditions. ln has the -h flag to not follow links, so it may be a better option, especially if you would have to invoke rm anyway. Craig