summaryrefslogtreecommitdiff
path: root/debian/patches/ssh-no-controlmaster
blob: 90b43d7866b49685a03f4348f6c2ccddaeafadf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Bug #413102: Avoid accidentally becoming an ssh ControlMaster.

If you set ControlMaster via your ssh config:
.ssh/config:
Host *
    ControlMaster auto
    Controlpath ~/.ssh/master-%r@%h:%p

you can get 'svn: Can't write to connection: Broken pipe' with certain
ssh commands, because svn can open multiple ssh sessions and kill them
at unpredictable times.

I don't really think the problem is either svn's or openssh's fault,
but this is the obvious way to avoid it.  We will still use ssh
connection sharing, but only if a ControlMaster is already present.

--- a/subversion/libsvn_subr/config_file.c
+++ b/subversion/libsvn_subr/config_file.c
@@ -1248,7 +1248,7 @@
         "### passed to the tunnel agent as <user>@<hostname>.)  If the"      NL
         "### built-in ssh scheme were not predefined, it could be defined"   NL
         "### as:"                                                            NL
-        "# ssh = $SVN_SSH ssh -q --"                                         NL
+        "# ssh = $SVN_SSH ssh -q -o ControlMaster=no --"                     NL
         "### If you wanted to define a new 'rsh' scheme, to be used with"    NL
         "### 'svn+rsh:' URLs, you could do so as follows:"                   NL
         "# rsh = rsh --"                                                     NL
--- a/subversion/libsvn_ra_svn/client.c
+++ b/subversion/libsvn_ra_svn/client.c
@@ -397,7 +397,7 @@
        * versions have it too. If the user is using some other ssh
        * implementation that doesn't accept it, they can override it
        * in the [tunnels] section of the config. */
-      val = "$SVN_SSH ssh -q --";
+      val = "$SVN_SSH ssh -q -o ControlMaster=no --";
     }
 
   if (!val || !*val)