Bug 1711 - openssh-client: recreate mux control socket
Summary: openssh-client: recreate mux control socket
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.3p1
Hardware: All Linux
: P2 normal
Assignee: Assigned to nobody
URL: http://bugs.debian.org/cgi-bin/bugrep...
Keywords: patch
Depends on:
Blocks: V_5_7
  Show dependency treegraph
 
Reported: 2010-02-10 04:07 AEDT by Andrew O. Shadoura
Modified: 2011-01-24 12:33 AEDT (History)
1 user (show)

See Also:


Attachments
patch to re-create mux control socket (1.22 KB, patch)
2010-02-10 04:07 AEDT, Andrew O. Shadoura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew O. Shadoura 2010-02-10 04:07:09 AEDT
Created attachment 1790 [details]
patch to re-create mux control socket

Hello.

This patch enables re-creation of the control socket for multiplexing. Without it, if ssh dies, it leaves socket in place, and newly started ssh cannot bind to it.

I've posted this at Debian bugtracker. Colin Watson suggested there:
===
It seems to me that this patch makes it a bit too easy to accidentally
trash an existing master just by setting ControlMaster to "yes", though.
Wouldn't it be better to do something like pinging the master to find
out if it's dead before recreating the socket, and disable multiplexing
as before if it's still alive?  That way there'd be no question about
whether it's appropriate to recreate the socket.  You could do the same
kind of thing as 'ssh -O check' does.
===

It seems that ssh does muxclient() call before trying to create the new socket, so this should not be issue, but please re-check this.

Thanks.

-- 
WBR, Andrew
Comment 1 Damien Miller 2010-09-24 22:20:14 AEST
OpenSSH -current now atomically establishes a listening mux master socket at the specified location, so a client encountering a mux master socket that refuses connection can safely delete it and process to establish its own. This change will be released in OpenSSH 5.7, due in a couple of months.
Comment 2 Andrew O. Shadoura 2010-09-25 00:14:56 AEST
Thanks, Damien.

Can you provide a link to the vcs diff?
Comment 3 Andrew O. Shadoura 2010-09-25 00:20:12 AEST
Ah, found it.
Comment 4 Damien Miller 2011-01-24 12:33:37 AEDT
Move resolved bugs to CLOSED after 5.7 release