linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Oleg Verych" <olecom@gmail.com>
To: "Matthew Wilcox" <matthew@wil.cx>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: euidaccess() as syscall
Date: Fri, 2 May 2008 18:13:00 +0100	[thread overview]
Message-ID: <8499950a0805021013g76261641r847ab18e648693a1@mail.gmail.com> (raw)
In-Reply-To: <20080502170603.GJ14976@parisc-linux.org>

Matthew Wilcox @ Fri, May 2, 2008 at 6:06 PM:
> On Fri, May 02, 2008 at 05:59:36PM +0100, Oleg Verych wrote:
>  > Hallo.
>  >
>  > Why there's no euidaccess() syscall (most obvious use is in `test` or
>  > `[` utility)?
>  >
>  > Instead euiaccess() in glibc and access() in kernel are doing unnecessary uid
>  > shuffling.
>
>  Are there any programs which care?  Do you have a benchmark that might
>  show an improvement if we added an euidaccess() syscall?
>
>  My impression was that most programs ignore the access() family of
>  syscalls and just try to do the open and cope with the failure.  They
>  have to anyway, since the file could have changed permission between the
>  call to access() and the call to open().

open() will change timestamp. `bash` and `dash` have very broken workarounds of
access() in `test` due to euid requirements. I.e. read-only fs for
root or various
selinux-like restrictions are not shown unless open() is used.

So, it's better just to use stat64(), right?
____

  reply	other threads:[~2008-05-02 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 16:59 euidaccess() as syscall Oleg Verych
2008-05-02 17:06 ` Matthew Wilcox
2008-05-02 17:13   ` Oleg Verych [this message]
2008-05-02 17:33     ` Jamie Lokier
2008-05-02 18:45       ` Oleg Verych
2008-05-05 19:21         ` code example (Re: euidaccess() as syscall) Oleg Verych
2008-05-02 17:35     ` euidaccess() as syscall Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8499950a0805021013g76261641r847ab18e648693a1@mail.gmail.com \
    --to=olecom@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).