GNU bug report logs -
#15926
RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call
Previous Next
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
Message #221 received at 15926 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 11/30/2013 02:33 PM, Bob Proulx wrote:
> But for example what happens if the preferred unlink command ever
> changes from unlinkat() to something new about ten years in the
> future? Can't say it won't change since we have already seen it
> change.
Indeed, we've already moved from unlink()/rmdir() to unlinkat() as our
preferred syscall(s).
But that's part of the sanity checks of the test - if the LD_PRELOAD
test runs, and the file is deleted, then the code base has switched away
from using unlinkat() as its deletion mechanism, and the test will be
skipped until someone updates it to override the new preferred syscall
instead. The only way we attempt 'rm -r /' is if we FIRST prove that we
have safely prevented 'rm -r file dir' from deleting sub-trees in the
(safe) current working directory, so that we know that we are also
preventing any attempt to actually remove / and only end up testing the
other effects (such as the appropriate POSIX behavior of refusing to
remove / by default).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
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.