--daemon doesn't respect --address?

Ali Polatel alip at exherbo.org
Fri Jan 22 14:26:59 MST 2010

I've noticed a weirdness in rsync.
Let me explain it briefly with an example.
Below is a test script:


cat >rsyncd.conf <<EOF
address = localhost
use chroot = no
hosts allow = localhost
    path = /tmp/from
    read only = yes
    comment = r/o

RSYNC_CONNECT_PROG="rsync --address=localhost --config=rsyncd.conf --daemon" \
rsync -av --address=localhost rsync://localhost/from to

Looking at the code the daemon should bind to localhost not
But strace shows the opposite:
alip at harikalardiyari> strace -fe bind ./test.sh
[pid 7279] bind(4, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("")}, 16) = 0

Is this a bug or am I misunderstanding something?

Ali Polatel

More information about the rsync mailing list