GNU bug report logs - #15926
RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Tue, 19 Nov 2013 11:58:02 UTC

Severity: normal

Tags: notabug, patch

Merged with 15943

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bob Proulx <bob <at> proulx.com>
To: 15926 <15926 <at> debbugs.gnu.org>
Subject: bug#15926: RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call
Date: Fri, 22 Nov 2013 10:39:22 -0700
[Message part 1 (text/plain, inline)]
Eric Blake wrote:
> Bernhard Voelker wrote:
> > Eric Blake wrote:
> >> Just noticing this context...
> >>>   # This test is too dangerous -- if there's a bug you're wiped out!
> >>>   # rm -fr / 2>/dev/null && fail=1
> >>
> >> What if we use chroot to create a safer /, where failing the test would
> >> only wipe out the chroot?
> > 
> > That's not that easy.

I think that it would be too complicated to be desired in the test suite.

> > Alternatively, that test could be secured by "skip_if_root_"
> > plus intercepting the unlinkat() call via LD_PRELOAD.
> 
> Indeed, LD_PRELOAD is great for this - since the test passes when no
> unlink/rmdir occurs, you just make the intercepts fail loudly if they
> are invoked.

Please make sure that if the LD_PRELOAD functionality fails that this
test is not run.  Since it would be a live fire exercise and if
LD_PRELOAD doesn't function then the test would wipe the system out.
I don't think it is worth the risk for this piece of functionality.

Bob
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.