1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-23 00:48:11 +00:00
Lasse Collin 4014e2479c
xz: O_SEARCH cannot be used for fsync()
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
2025-01-05 21:43:11 +02:00
..
2024-05-18 00:34:07 +03:00