mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
* src/chcon.c: Include fcntl--.h. (change_file_context): Open a file descriptor when only a partial context is specified. Use it to get and subsequently set the file context, instead of using getfileconat followed by setfileconat, if libselinux supports it on a file descriptor opened with O_PATH. * tests/chcon/traversal-missing.sh: Adjust the test using partial contexts to also inject open and openat errors. Add a test for complete contexts. * NEWS: Mention the bug fix. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-9PFL6OLT. Co-authored-by: Pádraig Brady <P@draigBrady.com>