Package: openssh-client Version: 1:5.3p1-1 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. -- WBR, Andrew
--- openssh-5.3p1.orig/mux.c 2010-02-09 14:35:32.000000000 +0200 +++ openssh-5.3p1/mux.c 2010-02-09 11:03:25.000000000 +0200 @@ -143,16 +143,23 @@ old_umask = umask(0177); if (bind(muxserver_sock, (struct sockaddr *)&addr, addr_len) == -1) { - muxserver_sock = -1; if (errno == EINVAL || errno == EADDRINUSE) { error("ControlSocket %s already exists, " - "disabling multiplexing", options.control_path); - close(muxserver_sock); - muxserver_sock = -1; - xfree(options.control_path); - options.control_path = NULL; - options.control_master = SSHCTL_MASTER_NO; - return; + "recreating socket", options.control_path); + unlink(options.control_path); + if (bind(muxserver_sock, (struct sockaddr *)&addr, addr_len) == -1) { + if (errno == EINVAL || errno == EADDRINUSE) { + error("ControlSocket %s already exists, " + "disabling multiplexing", options.control_path); + close(muxserver_sock); + muxserver_sock = -1; + xfree(options.control_path); + options.control_path = NULL; + options.control_master = SSHCTL_MASTER_NO; + return; + } else + fatal("%s bind(): %s", __func__, strerror(errno)); + } } else fatal("%s bind(): %s", __func__, strerror(errno)); }
Attachment:
signature.asc
Description: This is a digitally signed message part.