daemon-server via SSH (was Re: new rsync release needed soon?)

Dave Dykstra dwd at bell-labs.com
Fri Aug 2 08:49:01 EST 2002

On Thu, Aug 01, 2002 at 04:58:31PM -0500, Dave Dykstra wrote:
> Ok, I put that in.  I now tested it on Linux and unfortunately it doesn't
> properly look up the names unless I configure --disable-ipv6.  I'm out of
> time for today, however, I'll try to look at it tomorrow morning (unless
> somebody else figures it out in the meantime).  Perhaps it needs to 
> distinguish between whether or not the IP address is actually an IPv6
> address, which I presume is the difference between having 3 dots in the
> string or more.

I checked in code to look for more than 3 dots in the first part of
$SSH_CLIENT, otherwise it does the same thing as when INET6 is not
defined.  I have tested on Linux with INET6 defined, but I haven't tested
it when ipv6 is enabled in openssh because I don't have any systems with
ipv6 enabled.  Does anybody on the list have a setup of that?  If so, could
you please post what $SSH_CLIENT looks like after being called over an ipv6
connection?  Also, someone with ipv6 ssh please test the current rsync CVS
doing ssh to daemon mode on ipv6 to a module with "hosts allow" so we can
see if it is properly discovering the host name.  Actually, just checking
the log file for the name of the logged client machine is probably enough.

> > As for your question of how to know when to look at the SSH_CLIENT
> > environment variable, I wonder if the is_a_socket() call that was in
> > the original patch would be enough of a distinguishing factor.  Like
> > this:
> > I'll have to look at the code in more detail to know if this works or
> > not.
> I tried it; it doesn't work on Solaris.

I discovered an easier way and checked it in: it now simply checks the
"am_server" global variable, which is only set when doing daemon mode
over --rsh.

- Dave Dykstra

More information about the rsync mailing list