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

Dave Dykstra dwd at bell-labs.com
Thu Aug 1 12:57:02 EST 2002


On Thu, Aug 01, 2002 at 02:25:50PM -0500, Dave Dykstra wrote:
...
> One thing that did not work for me is the "hosts allow" and presumably
> "hosts deny": it says "@ERROR: access denied to testdir from unknown ()".
> There was code on the server side that's reads $SSH_CLIENT for the IP
> address and set "remote.shell.connection" as the host name.  It was
> switching on is_a_socket() though, and at least in my case that is
> returning true for the ssh connection.  I went ahead and developed a fix
> for that and submitted it to CVS.  Any time $SSH_CLIENT is specified, I use
> that for the client IP address, and I look up the real name with
> getnameinfo().  I included code I thought would be needed for IPv6 but
> haven't tested that part yet, I hope somebody else can.

Hey, it just occurred to me that always checking for $SSH_CLIENT will be a
problem if somebody wants to start a normal background daemon from an
interactive ssh session, or even if they've restarted inetd from one.
What's a reliable way of determining on the server side that it's been
started from ssh?  Maybe we could set another global in start_daemon()
or daemon_main().

- Dave




More information about the rsync mailing list