Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 29 Sep 2014 12:40:29 -0400
From: Rich Felker <>
To: Alexander Monakov <>
Cc: Rob Landley <>,,
Subject: Re: Re: faccessat and AT_SYM_NOFOLLOW

On Mon, Sep 29, 2014 at 08:27:19PM +0400, Alexander Monakov wrote:
> Isn't the reason for faccessat call before unlink is that rm without the -f
> flag is explicitely specified to ask for confirmation when the file is not
> writable?

This may be true (it was never stated when I asked about the purpose),
but in that case, faccessat still won't give the correct result unless
you use AT_EACCESS (which is broken with glibc and very expensive with
musl). The right way to achieve this would be to attempt to open the
file (or performing some other operation that would check for write
access with the correct effective/fs uid/gid) for writing before
unlinking it.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.