Re: etc/rc.d/{var,tmp} and sub-shell usage?!

From: Craig Boston <craig_at_xfoil.gank.org>
Date: Wed, 23 May 2007 12:36:18 -0500
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
Received on Wed May 23 2007 - 15:36:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:10 UTC