mirror of
https://git.tukaani.org/xz.git
synced 2025-02-23 00:48:11 +00:00
Opening a directory with O_SEARCH results in a file descriptor that can be used with functions like openat(). Such a file descriptor cannot be used with fsync(). Use O_RDONLY instead. In musl, O_SEARCH becomes Linux-specific O_PATH. A file descriptor from O_PATH doesn't allow fsync(). Seems that it's not possible to fsync() a directory that has write and search permissions but not read permission. Fixes: 2a9e91d796d091740489d951fa7780525e4275f1