Implement faccessat without AT_EACCESS flag
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 4 Dec 2016 21:49:53 +0000 (21:49 +0000)
committerSamuel Thibault <sthibault@debian.org>
Sun, 4 Dec 2016 21:49:53 +0000 (21:49 +0000)
commit13e6d3a769a04f8e9a2feec6a4677081872e7cab
treef8625dba207cce35ba1d222d0a5f6cd48f4cbfb2
parent04928b2579e35103f40a8cb95bac8d1a3092b8ab
Implement faccessat without AT_EACCESS flag

* hurd/hurd/fd.h: Include <fcntl.h>
(__hurd_at_flags): New function.
* hurd/lookup-at.c (__file_name_lookup_at): Replace flag computation
with call to __hurd_at_flags.
* include/unistd.h (__faccessat): Add declaration.
* sysdeps/mach/hurd/access.c (__access): Move implementation to
__faccessat, and replace it with a call to __faccessat.
* sysdeps/mach/hurd/euidaccess.c (__euidaccess): Replace implementation
with a call to __faccessat.
* sysdeps/mach/hurd/faccessat.c (faccessat): Rename into...
(__faccessat): ... this. Move implementation of __access into it when
AT_FLAGS does not contain AT_EACCESS. Make it call __hurd_at_flags, add
reauthenticate_cwdir_at helper to implement AT mechanism.
(faccessat): Define weak alias.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-faccessat.diff
hurd/hurd/fd.h
hurd/lookup-at.c
include/unistd.h
sysdeps/mach/hurd/access.c
sysdeps/mach/hurd/euidaccess.c
sysdeps/mach/hurd/faccessat.c