[TUHS] There is turmoil in Linux-land - When did rm first avoid going upwards?

Kurt H Maier khm at sciops.net
Tue Apr 25 09:23:28 AEST 2017


On Tue, Apr 25, 2017 at 12:18:41AM +0200, Josh Good wrote:
> On 2017 Apr 24, 18:06, Noel Chiappa wrote:
> >     > From: Josh Good
> > 
> >     > Would the command "cd /tmp ; rm -rf .*" be able to kill a V6 ... system?
> > 
> > So, assuming one did that, _and_ (important caveat!) _performed that command
> > as root_, it probably would empty out the entire directory tree. (I checked,
> > and "cd /tmp ; echo .*" evaluates to ". .." on V6.
> 
> Yeah, but does "rm" in V6 has a built-in "brake" to not process "." nor
> "..", no matter what ("-f")?
> 
> -- 
> Josh Good
> 

rm in V6 outsources globbing to /etc/glob, which appears to report
no-match if the first character is .
       
https://github.com/dspinellis/unix-history-repo/blob/Research-V6-Snapshot-Development/usr/source/s1/glob.c#L151
       
khm



More information about the TUHS mailing list