bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15926: RFE: unlink command already uses 'unlink' call; make 'rm' use


From: Eric Blake
Subject: bug#15926: RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call
Date: Mon, 02 Dec 2013 08:48:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]