--numeric-ids unexpectedly activates ownership. identity_active_enabled() and the owner/group-requested predicates include numeric_ids (src/shared/identity.c), so -t --numeric-ids / -U --numeric-ids (any metadata flag) fchown destinations to raw source ids. rsync's --numeric-ids is a mapping modifier only. Contradicts the RSYNC_COMPAT.md row claiming it is inert without an ownership option.
Fix: remove numeric_ids from identity_active_enabled; keep it as a mapping branch inside identity_resolve_targets when -o/-g/maps request ownership. Add a regression test.
Directory ownership is dropped on the recursive path. Recursively scanned dirs are created implicitly (src/shared/file.cfile_open_secure_parent/file_ensure_directory_secure, which chown only for --copy-as), and dir_metadata_list_apply applies only times+mode, never owner/group (src/shared/file_receive.c). So -a/-o/-g do not reproduce directory owner/group (only --copy-as does).
Fix: chown dirs in dir_metadata_list_apply via identity_apply_ownership_link, and/or apply the policy to implicitly created parents.
Directory (and symlink) xattrs/ACLs are not preserved: the scanner captures xattrs only for regular files and the receiver applies them only for files, so -aX/-aA lose dir xattrs and default ACLs.
Fix: capture dir xattrs on the dir entry and apply them fd-relative in dir_metadata_list_apply; add a directory ACL/xattr test.
Audit findings (protocol 2.22.0).
1) `--numeric-ids` unexpectedly activates ownership. `identity_active_enabled()` and the owner/group-requested predicates include `numeric_ids` (`src/shared/identity.c`), so `-t --numeric-ids` / `-U --numeric-ids` (any metadata flag) fchown destinations to raw source ids. rsync's `--numeric-ids` is a mapping modifier only. Contradicts the RSYNC_COMPAT.md row claiming it is inert without an ownership option.
Fix: remove `numeric_ids` from `identity_active_enabled`; keep it as a mapping branch inside `identity_resolve_targets` when `-o`/`-g`/maps request ownership. Add a regression test.
2) Directory ownership is dropped on the recursive path. Recursively scanned dirs are created implicitly (`src/shared/file.c` `file_open_secure_parent`/`file_ensure_directory_secure`, which chown only for `--copy-as`), and `dir_metadata_list_apply` applies only times+mode, never owner/group (`src/shared/file_receive.c`). So `-a`/`-o`/`-g` do not reproduce directory owner/group (only `--copy-as` does).
Fix: chown dirs in `dir_metadata_list_apply` via `identity_apply_ownership_link`, and/or apply the policy to implicitly created parents.
3) Directory (and symlink) xattrs/ACLs are not preserved: the scanner captures xattrs only for regular files and the receiver applies them only for files, so `-aX`/`-aA` lose dir xattrs and default ACLs.
Fix: capture dir xattrs on the dir entry and apply them fd-relative in `dir_metadata_list_apply`; add a directory ACL/xattr test.
Fixed. (1) --numeric-ids no longer activates ownership — it is only a mapping modifier (identity_active_enabled excludes it), with a regression test. (2) Directory owner/group is applied via the deferred DirTimeList (dir_metadata_list_apply) and explicit --dirs entries. (3) Directory xattrs/ACLs are captured/sent/applied for the recursive path, and PR #308 applies them on the direct --dirs save path too. Residual: symlink xattrs/ACLs are not captured/applied (documented in RSYNC_COMPAT.md); closing it needs a dedicated symlink-xattr wire block and a PROTOCOL_VERSION bump. Closing as completed.
Fixed. (1) `--numeric-ids` no longer activates ownership — it is only a mapping modifier (`identity_active_enabled` excludes it), with a regression test. (2) Directory owner/group is applied via the deferred `DirTimeList` (`dir_metadata_list_apply`) and explicit `--dirs` entries. (3) Directory xattrs/ACLs are captured/sent/applied for the recursive path, and PR #308 applies them on the direct `--dirs` save path too. Residual: symlink xattrs/ACLs are not captured/applied (documented in `RSYNC_COMPAT.md`); closing it needs a dedicated symlink-xattr wire block and a `PROTOCOL_VERSION` bump. Closing as completed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Audit findings (protocol 2.22.0).
--numeric-idsunexpectedly activates ownership.identity_active_enabled()and the owner/group-requested predicates includenumeric_ids(src/shared/identity.c), so-t --numeric-ids/-U --numeric-ids(any metadata flag) fchown destinations to raw source ids. rsync's--numeric-idsis a mapping modifier only. Contradicts the RSYNC_COMPAT.md row claiming it is inert without an ownership option.Fix: remove
numeric_idsfromidentity_active_enabled; keep it as a mapping branch insideidentity_resolve_targetswhen-o/-g/maps request ownership. Add a regression test.Directory ownership is dropped on the recursive path. Recursively scanned dirs are created implicitly (
src/shared/file.cfile_open_secure_parent/file_ensure_directory_secure, which chown only for--copy-as), anddir_metadata_list_applyapplies only times+mode, never owner/group (src/shared/file_receive.c). So-a/-o/-gdo not reproduce directory owner/group (only--copy-asdoes).Fix: chown dirs in
dir_metadata_list_applyviaidentity_apply_ownership_link, and/or apply the policy to implicitly created parents.Directory (and symlink) xattrs/ACLs are not preserved: the scanner captures xattrs only for regular files and the receiver applies them only for files, so
-aX/-aAlose dir xattrs and default ACLs.Fix: capture dir xattrs on the dir entry and apply them fd-relative in
dir_metadata_list_apply; add a directory ACL/xattr test.Fixed. (1)
--numeric-idsno longer activates ownership — it is only a mapping modifier (identity_active_enabledexcludes it), with a regression test. (2) Directory owner/group is applied via the deferredDirTimeList(dir_metadata_list_apply) and explicit--dirsentries. (3) Directory xattrs/ACLs are captured/sent/applied for the recursive path, and PR #308 applies them on the direct--dirssave path too. Residual: symlink xattrs/ACLs are not captured/applied (documented inRSYNC_COMPAT.md); closing it needs a dedicated symlink-xattr wire block and aPROTOCOL_VERSIONbump. Closing as completed.