[Bug 13207] New: rsyncd doesn't send output of failed pre-xfer exec script to client

samba-bugs at samba.org samba-bugs at samba.org
Tue Jan 9 18:41:17 UTC 2018


https://bugzilla.samba.org/show_bug.cgi?id=13207

            Bug ID: 13207
           Summary: rsyncd doesn't send output of failed pre-xfer exec
                    script to client
           Product: rsync
           Version: 3.1.1
          Hardware: x64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: dana at dana.is
        QA Contact: rsync-qa at samba.org

Hello,

The rsyncd.conf documentation says:

>If the pre-xfer exec command fails, the transfer is aborted before it begins. Any output from the script on stdout (up to several KB) will be displayed to the user when aborting, but is NOT displayed if the script returns success.

However, i can't actually get it to do this. In fact, i don't get any
meaningful output at all.

My pre-xfer script:

#!/bin/sh
echo $RSYNC_HOST_ADDR
return 1

My rsyncd.conf:

[testing]
path          = /home/dana
read only     = true
pre-xfer exec = /home/dana/rsync.sh

The client command and its output:

% rsync -vvvv --debug=all 172.17.66.1::testing/foo .
opening tcp connection to 172.17.66.1 port 873
sending daemon args: --server --sender -vvvve.LsfxC --debug=ALL . testing/foo 
(6 args)
(Client) Protocol versions: remote=31, negotiated=31
rsync: read error: Connection reset by peer (54)
rsync error: error in socket IO (code 10) at io.c(785) [Receiver=3.1.2]
[Receiver] _exit_cleanup(code=10, file=io.c, line=785): about to call exit(10)

The rsyncd log output:

2018-01-09 12:25:45 rsyncd[7770]: connect from myhostname (172.17.66.100)
2018-01-09 12:25:45 rsyncd[7770]: rsync on testing/foo from myhostname
(172.17.66.100)
2018-01-09 12:25:45 rsyncd[7770]: pre-xfer exec returned failure (256):
2018-01-09 12:25:45 rsyncd[7770]: 172.17.66.100
2018-01-09 12:25:46 rsyncd[7770]: rsync error: requested action not supported
(code 4) at clientserver.c(973) [sender=3.1.1]

As you can see, i get the script output in the log — but not on the client
side.

The server side is running rsync 3.1.1 on Ubuntu 16.04. I have tried launching
`rsync --daemon` manually, just to make sure that systemd wasn't interfering
with the I/O somehow, and it did the same thing.

The client side is running rsync 3.1.2 on macOS 10.12. I also tested 3.1.1 from
the same machine as the server and again got the same result.

Am i doing something wrong? Is there some prerequisite for seeing this output?
(If so, it might be helpful to mention it in the documentation.)

Thanks!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list