[patch] RFC: put server tunnel name in environment

Alex Bligh alex at alex.org.uk
Tue Sep 22 05:44:56 EST 2009



--On 21 September 2009 19:58:56 +0200 Peter Stuge <peter at stuge.se> wrote:

> Alex Bligh wrote:
>> Trying again, with the patch attached as text/plain
>
> The patch seems racy. What if a second tunnel request comes in
> between the set_tunnel() and get_tunnel() for the first request?

Is it possible to have more than one tunnel request per forked
child?

I may have misunderstood how the code works (in which
case my apologies) but I thought what happened was that the
ssh server forks on receiving a connection, and the tun_open
is done by the child with the uid specified (in this case
it has to be root for tun_open to work, but that's how I
verified what was calling tun_open). My understanding was
that each ssh connection could only receive one -w
tun/tap request. The static char * is in effect local
to the child (& thus connection) concerned.

Have I missed something here?

-- 
Alex Bligh


More information about the openssh-unix-dev mailing list