Dear Maintainer,
When using an rsync action with fakesuper=yes to save source uid/gid and
special files as xattr to a non-root destination the rsync action script
doesn't correctly pass the --fake-super option to the remote rsync process
due to (what amounts to an) unquoted concatenation of multiple arguments in
$remote_options:
if [ "$fakesuper" == "yes" ]; then
remote_rsync="$remote_rsync --fake-super"
fi
...
rsync_options=($rsync_options --rsync-path="$remote_rsync")
...
info "Syncing $SECTION on $dest_path..."
command="$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path"
$nice su -c "$command" | tee -a $log
The assignment command="... ${rsync_options[@]} ..." behaves as space
separating ${rsync_options[*]} here since no array assignment is used.
Suggested fix: Refactor to use the native rsync option
--remote-option=--fake-super instead of passing --fake-super through
--rsync-path.
For testing I suggest
mkdir /tmp/test; mknod -m 0 /tmp/test/device-node c 0 0
as those files show up as rsync warnings "skipping non-regular file" if
--fake-root at the receiving end isn't working.
Thanks!
--Daniel