is it ok to forbid rm -r x/y/..
mp at allegra.UUCP
mp at allegra.UUCP
Sun Jan 18 04:43:28 AEST 1987
After seeing several people remove their entire hierarchies
with something like ``rm -r /usr/lg/backup/.*'' , I'm tempted to
make rm forbid removing anything that has .. as its last
pathname component (currently, it checks only for pathnames
that are either . or ..). But I'm wondering why it hasn't
been changed to do this already. What am I overlooking?
BTW, under 4.3bsd the attempt to recursively remove .. in the
aforementioned manner may cause rm to get a bus error. On line 167,
add an "if (dirp)" before "closedir(dirp)".
Mark Plotnick
allegra!mp
More information about the Comp.unix.questions
mailing list