Files
rsync/lib
Andrew Tridgell 26783f76fe rsync/acls/xattrs: apply received xattrs and ACLs through the held fd
set_file_attrs() holds an O_RDONLY|O_NOFOLLOW fd (held_fd) for the entry's
regular-file/dir/FIFO inode so metadata is applied to the pinned inode rather
than by re-resolving the path, which a parent-symlink race could redirect.

- xattrs: the set/remove/list of -X xattrs use the f-variant calls on held_fd
  (lib/sysxattrs gains the wrappers); a raced FIFO can't block the open
  (O_NONBLOCK).
- ACLs (real root): get_acl_fdat()/set_acl_fdat() apply the ACL via lib/acl.c's
  fd path (xacl_*_fd), or setxattrat(AT_SYMLINK_NOFOLLOW) on the dirfd+leaf for
  a socket/device, covering both the access and default ACL.  pack_smb_acl()+
  change_sacl_perms() still build the entries, so the bytes written match
  acl_set_file() exactly.  With no safe primitive we skip rather than re-resolve
  the path.  The legacy path-based libacl calls remain only for the cross-tree
  (no held dirfd) and non-Linux cases.
- --fake-super ACL-as-xattr writes/deletes also go through held_fd, closing the
  last path-based metadata write under fake-super.
2026-06-15 15:24:42 +10:00
..
2022-03-03 17:00:57 -08:00
2024-11-19 21:33:30 -08:00
2022-08-14 10:15:08 -07:00
2022-08-14 10:15:08 -07:00