fs-util: add access_fd() which is like access() but for fds
authorLennart Poettering <lennart@poettering.net>
Thu, 16 Nov 2017 17:56:25 +0000 (18:56 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Nov 2017 10:12:33 +0000 (11:12 +0100)
commit57a4359ee0bf65c16336e8157f0f9d2b084ddac3
tree1b5e309c796a4f549a5afdfd8ede5a100375c2d8
parent994a6364d2dfcf5fa11ec26e81752fbe842428aa
fs-util: add access_fd() which is like access() but for fds

Linux doesn't have faccess(), hence let's emulate it. Linux has access()
and faccessat() but neither allows checking the access rights of an fd
passed in directly.
src/basic/fs-util.c
src/basic/fs-util.h
src/test/test-fs-util.c