about summary refs log tree commit diff
path: root/src/stat/fstat.c
Commit message (Collapse)AuthorAgeFilesLines
* fix missing flags arg to fstatat syscall in fstat fallback pathRich Felker2014-07-181-1/+1
| | | | | | | | | | | | this code path is used only on archs without the plain, non-at syscalls, and only when the fstat syscall fails with EBADF on a valid file descriptor. this in turn can happen only for O_PATH file descriptors, and may not happen at all on the newer kernels needed for supporting such archs. with the flags argument omitted, spurious fstat failures may happen when the argument register happens to have the AT_SYMLINK_NOFOLLOW bit set.
* additional fixes for linux kernel apis with old syscalls removedRich Felker2014-05-301-0/+4
|
* fix failure of fchmod, fstat, fchdir, and fchown to produce EBADFRich Felker2013-12-191-1/+3
| | | | | | | | | | | | | | | | | | | the workaround/fallback code for supporting O_PATH file descriptors when the kernel lacks support for performing these operations on them caused EBADF to get replaced by ENOENT (due to missing entry in /proc/self/fd). this is unlikely to affect real-world code (calls that might yield EBADF are generally unsafe, especially in library code) but it was breaking some test cases. the fix I've applied is something of a tradeoff: it adds one syscall to these operations on kernels where the workaround is needed. the alternative would be to catch ENOENT from the /proc lookup and translate it to EBADF, but I want to avoid doing that in the interest of not touching/depending on /proc at all in these functions as long as the kernel correctly supports the operations. this is following the general principle of isolating hacks to code paths that are taken on broken systems, and keeping the code for correct systems completely hack-free.
* make fchdir, fchmod, fchown, and fstat support O_PATH file descriptorsRich Felker2013-08-021-2/+10
| | | | | | | | | on newer kernels, fchdir and fstat work anyway. this same fix should be applied to any other syscalls that are similarly affected. with this change, the current definitions of O_SEARCH and O_EXEC as O_PATH are mostly conforming to POSIX requirements. the main remaining issue is that O_NOFOLLOW has different semantics.
* global cleanup to use the new syscall interfaceRich Felker2011-03-201-1/+1
|
* finish moving 32-bit-specific junk out of source files.Rich Felker2011-02-151-1/+1
|
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+10