[Toybox] [PATCH 1/2] rm: Check file existence with lstat() explicitly if "-f" is specified

Yi-yo Chiang yochiang at google.com
Mon Feb 1 22:49:06 PST 2021


I found the original commit that adds this:
https://android.googlesource.com/platform/bionic/+/35778253a5ed71e87a608ca590b63729d9f88567
There is even a link to this mailing list...

Can't say I completely follow the discussion, as the thread is long and
dated, and I may be missing a lot of context, but I think the rationale is
roughly "faccessat() AT_SYM_NOFOLLOW is not properly supported by some libc
impls, so let's not use it for now". Does this argument still hold though?

On Tue, Feb 2, 2021, 12:06 Rob Landley <rob at landley.net> wrote:

> On 2/1/21 9:53 PM, Yi-yo Chiang wrote:
> > There has to be a reason, but I'll defer that question to Elliott..
> >
> https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/faccessat.cpp;l=46;drc=50080a29f7327fcd009344844bb9e643b2d6b9c3
> >
> > This line also left me scratching my head for half a day.
>
> At a guess, that first explanatory URL in the comment should be:
>
> https://www.openwall.com/lists/musl/2015/02/05/2
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210202/3e3e6f29/attachment.html>


More information about the Toybox mailing list