Bug 1711

Summary: openssh-client: recreate mux control socket
Product: Portable OpenSSH Reporter: Andrew O. Shadoura <bugzilla>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P2 Keywords: patch
Version: 5.3p1   
Hardware: All   
OS: Linux   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569018
Bug Depends on:    
Bug Blocks: 1803    
Attachments:
Description Flags
patch to re-create mux control socket none

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