mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-09-16 23:27:54 -04:00
When configure detects a patched libacl exporting acl_get_file_at / acl_set_file_at / acl_delete_def_file_at (new HAVE_LIBACL_AT; ACL_1.3), route the receiver's race-safe ACL get/set/delete through them instead of lib/acl.c's xacl_* -- held fd via AT_EMPTY_PATH, dirfd+leaf via AT_SYMLINK_NOFOLLOW, reusing the existing unpack_smb_acl/pack_smb_acl conversion. libacl's /proc/self/fd compat makes this race-safe on every Linux kernel. lib/acl.c stays as the fallback for a stock libacl (macro undefined -> zero change there); it already closes the same pre-6.13 parent-symlink-race gap via its own /proc/self/fd compat, so the two paths are equivalent in safety and prefer libacl only when its newer bindings are present. -VV reports ACL-libacl-at and keeps "ACL_at": true. A stock -lacl lacks these symbols, so HAVE_LIBACL_AT is undefined on real distros and the build is byte-identical to the lib/acl.c path until libacl ships ACL_1.3; build against the patched lib via CPPFLAGS/LDFLAGS pointing at its install prefix.