This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: euidaccessat [Re: one more openat-style function required: fchmodat
- From: Jim Meyering <jim at meyering dot net>
- To: Roland McGrath <roland at redhat dot com>
- Cc: Ulrich Drepper <drepper at redhat dot com>, libc-alpha at sources dot redhat dot com, bug-coreutils at gnu dot org
- Date: Thu, 05 Jan 2006 14:38:13 +0100
- Subject: Re: euidaccessat [Re: one more openat-style function required: fchmodat
- References: <20060105113817.AF5EA180B7C@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> wrote:
> Is Solaris eaccess the same as euidaccess?
Yes. Irix and FreeBSD have eaccess, too.
> Should glibc provide eaccess as
> an alias for euidaccess?
Good idea.
> Except on the Hurd, euidaccess actually either just uses access (when r==e)
> or uses stat and the usual st_mode rules assuming those are what the
> filesystem will actually use, which you can do yourself. rm et al I expect
> are never setuid and so can always use the method of calling access, which
I admit it is very unlikely that anyone will ever find
a use for an rm binary with the set-UID bit set.
However, rm might easily be invoked from a set-UID
program or script, and using access(2) in that context
would be wrong.
> is superior in telling truth about permission, but lacks the *at features.
>
> In keeping with the other interfaces, it should be faccessat and use a new
> AT_* flag bit to distinguish real-user from effective-user access checking.
>
> int faccessat (int fd, const char *file, int type, int flag);
>
> Does that sound reasonable?
That sounds fine.
Thanks!