tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Heads up: tmux imported into src



On 12 March 2011 18:58, der Mouse <mouse%rodents-montreal.org@localhost> wrote:
>> Well, given that tmux will have to actually proxy something if one
>> writes a proxy for it, then I think that we can assume that tmux
>> would then in fact need to listen in some fashion.  If tmux has to
>> listen then it will need to be aware of where it should listen and
>> what to do when it receives requests.  This will necessarily be
>> implementation dependent unless there is a standard.
>
> Good points.
>
> I should look at moussh with that in mind.  I need to document what it
> does anyway, but I also should see if I can invent a not-too-insane
> interface that would let fundamentally ssh-unaware programs (which I
> think tmux should ideally be) proxy agent connections.

The agent connection is conveyed by
1) a socket in the filesystem
2) an environment variable pointing to the socket

It is conceivable that the socket could be from a different namespace
but the environment variable likely remains.

For the filesystem case tmux could hijack the environment variable to
point to a symlink it sets up and then switch where the symlink points
as needed. This is cool and can work for any number of protocols, not
only ssh-agent.

For namespaces other than filesystem where symlinks are not possible
actual proxy would be needed.

In fact, I have a script in place that stores the ssh-agent socket
name in a file in my home directory when it encounters a valid agent
connection and loads the name from the file when there is no
connection which I call from .profile.

For X11 the situation is more complex because you need a magic cookie
matching the connection number so some amount of proxying is required
one way or another.

Also the forwarded X sockets are TCP sockets and the local X
connections are (sometimes exclusively) sockets in /tmp so to unify
that a proxy is definitely required.

Thanks

Michal


Home | Main Index | Thread Index | Old Index