race condition with ControlMaster=auto
Tony Finch
dot at dotat.at
Sun Aug 5 04:12:50 EST 2007
On Sat, 4 Aug 2007, Damien Miller wrote:
>
> Yes, this is annoying. The other approach to fixing it that I thought of
> but didn't yet implement was to create the sockets with mkstemp (i.e.
> with a random suffix) and try to rename them into place when ready. If
> the rename fails then the ssh client can just turn off master mode,
> unlink its temporarily named socket and act as a regular client.
I don't think this is necessary, because the bind() already gives you
race-free socket creation. You could get the same effect by just ignoring
EADDRINUSE failures. My patch does this, but also fixes the ordering so
that if there's a race only one client will have to do a full login.
> Please file a bug at http://bugzilla.mindrot.org with your patch.
Will do.
Tony.
--
f.a.n.finch <dot at dotat.at> http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.
More information about the openssh-unix-dev
mailing list