Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix failure of fchmodat to report EOPNOTSUPP in the race path | Rich Felker | 2015-03-30 | 1 | -2/+5 |
| | | | | | | | | | | | in the case where a non-symlink file was replaced by a symlink during the fchmodat operation with AT_SYMLINK_NOFOLLOW, mode change on the new symlink target was successfully suppressed, but the error was not reported. instead, fchmodat simply returned 0. (cherry picked from commit 61b1d102129990f6e903c6ddcf46c7d79d1a1e99) (conflicts from commit dd5f50da6f6c3df5647e922e47f8568a8896a752) | ||||
* | fix fd leak race (missing O_CLOEXEC) in fchmodat | Rich Felker | 2015-03-30 | 1 | -1/+1 |
| | | | | (cherry picked from commit 2736eb6caa70bb6e909d7d8ebbe145c2071435e0) | ||||
* | include cleanups: remove unused headers and add feature test macros | Szabolcs Nagy | 2013-12-12 | 1 | -1/+0 |
| | |||||
* | debloat code that depends on /proc/self/fd/%d with shared function | Rich Felker | 2013-08-02 | 1 | -1/+3 |
| | | | | | | | I intend to add more Linux workarounds that depend on using these pathnames, and some of them will be in "syscall" functions that, from an anti-bloat standpoint, should not depend on the whole snprintf framework. | ||||
* | work around linux's lack of flags argument to fchmodat syscall | Rich Felker | 2013-08-02 | 1 | -1/+29 |
| | | | | | | | | | | | | | | | | | | | previously, the AT_SYMLINK_NOFOLLOW flag was ignored, giving dangerously incorrect behavior -- the target of the symlink had its modes changed to the modes (usually 0777) intended for the symlink). this issue was amplified by the fact that musl provides lchmod, as a wrapper for fchmodat, which some archival programs take as a sign that symlink modes are supported and thus attempt to use. emulating AT_SYMLINK_NOFOLLOW was a difficult problem, and I originally believed it could not be solved, at least not without depending on kernels newer than 3.5.x or so where O_PATH works halfway well. however, it turns out that accessing O_PATH file descriptors via their pseudo-symlink entries in /proc/self/fd works much better than trying to use the fd directly, and works even on older kernels. moreover, the kernel has permanently pegged these references to the inode obtained by the O_PATH open, so there should not be race conditions with the file being moved, deleted, replaced, etc. | ||||
* | global cleanup to use the new syscall interface | Rich Felker | 2011-03-20 | 1 | -1/+1 |
| | |||||
* | initial check-in, version 0.5.0 v0.5.0 | Rich Felker | 2011-02-12 | 1 | -0/+7 |