rsync server over SSH [includes code patches]
JD Paul
jdpaul at interstel.net
Wed Nov 28 03:46:33 EST 2001
Actually, my patch already has that in rsync_module():
if (is_a_socket(f_in)) {
addr = client_addr(f_in);
host = client_name(f_in);
} else {
char *ssh_client = getenv("SSH_CLIENT");
addr = ssh_client ? ssh_client : "n/a";
host = "remote shell connection";
}
The problem is that I was only looking at string usages of SSH_CLIENT
(debugging mostly) rather than allow_access() use. That shouldn't be
hard to fix; we just need to truncate a copy of the SSH_CLIENT string
at the first whitespace. I'll see if I can get that into the next
version of my patch.
JD
On Mon, 26 Nov 2001, Martin Pool wrote:
> On 25 Nov 2001, Jeremy Hansen <jeremy at xxedgexx.com> wrote:
> >
> > Ok, I have the patch working, things seems to work except that using hosts
> > allow in the rsyncd.conf seems to break things.
>
> What an interesting bug. :-)
>
> The proximate connection to the rsync server will be from the sshd
> process which is running on the server host, so stdin will probably be
> a unix-domain socket. In other words because rsync is not directly
> connected to the client, it can't use the usual mechanism to find the
> client's address.
>
> Perhaps we can get rsync to look at $SSH_CLIENT, which contains the
> necessary information. We need to think carefully to make sure this
> is secure though.
>
> --
> Martin
>
More information about the rsync
mailing list