🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Daniel Gröber Wed, 28 Oct 2026 12:30
Bug#1152351: backupninja: rsync fakesuper option ineffective due to unquoted expansion of ${rsync_options[@]}
#2473
Author: Daniel Gröber
Date: Wed, 28 Oct 2026 12:30
110 lines
4678 bytes
Package: backupninja
Version: 1.2.2-1
Severity: normal
X-Debbugs-Cc: dxld@debian.org

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

-- Example Config /etc/backup.d/80.rsync:
[general]
mountpoint = /tmp/test-backup
backupdir = Hostname
format = short
days = 14

[source]
from = local
include = /tmp/test
#^ Any dir for testing really :-)

[dest]
dest = remote
protocol = ssh
host = localhost
port = 22
user = username
id_file = /root/.ssh/id_ed25519


-- System Information:
Debian Release: 13.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 7.2.6+deb13-amd64 (SMP w/22 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages backupninja depends on:
ii  bash    5.2.37-2+b10
ii  dialog  1.3-20250116-1
ii  gawk    1:5.2.1-2+b1
ii  mawk    1.3.4.20250131-1

Versions of packages backupninja recommends:
ii  mailutils [mailx]  1:3.19-1

Versions of packages backupninja suggests:
pn  borgbackup     <none>
ii  bzip2          1.0.8-6
ii  debconf-utils  1.5.91
pn  duplicity      <none>
ii  fdisk          2.41.5-0+deb13u1
ii  genisoimage    9:1.1.11-4
ii  hwinfo         21.82-1.1+b2
ii  mdadm          4.4-11
pn  rdiff-backup   <none>
ii  restic         0.18.0-1+b4
ii  rsync          3.5.0+ds1-0+deb13u1
ii  subversion     1.14.5-3
pn  trickle        <none>
ii  util-linux     2.41.5-0+deb13u1
pn  wodim          <none>

-- Configuration Files:
/etc/backupninja.conf changed [not included]

-- no debconf information
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads