net/tramp.el (tramp-ssh-controlmaster-options): Use "%C"
Fixes: debbugs:19702 * net/tramp.el (tramp-ssh-controlmaster-options): Use "%C" for ControlPath if possible.
This commit is contained in:
parent
43b82baa79
commit
50f3811883
2 changed files with 21 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-02-02 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
|
* net/tramp.el (tramp-ssh-controlmaster-options): Use "%C" for
|
||||||
|
ControlPath if possible. (Bug#19702)
|
||||||
|
|
||||||
2015-02-02 Glenn Morris <rgm@gnu.org>
|
2015-02-02 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* emacs-lisp/authors.el (authors-obsolete-files-regexps)
|
* emacs-lisp/authors.el (authors-obsolete-files-regexps)
|
||||||
|
|
|
@ -311,17 +311,25 @@ useful only in combination with `tramp-default-proxies-alist'.")
|
||||||
(let ((result "")
|
(let ((result "")
|
||||||
(case-fold-search t))
|
(case-fold-search t))
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(with-temp-buffer
|
(when (executable-find "ssh")
|
||||||
(call-process "ssh" nil t nil "-o" "ControlMaster")
|
|
||||||
(goto-char (point-min))
|
|
||||||
(when (search-forward-regexp "missing.+argument" nil t)
|
|
||||||
(setq result "-o ControlPath=%t.%%r@%%h:%%p -o ControlMaster=auto")))
|
|
||||||
(unless (zerop (length result))
|
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(call-process "ssh" nil t nil "-o" "ControlPersist")
|
(call-process "ssh" nil t nil "-o" "ControlMaster")
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(when (search-forward-regexp "missing.+argument" nil t)
|
(when (search-forward-regexp "missing.+argument" nil t)
|
||||||
(setq result (concat result " -o ControlPersist=no"))))))
|
(setq result "-o ControlMaster=auto")))
|
||||||
|
(unless (zerop (length result))
|
||||||
|
(with-temp-buffer
|
||||||
|
(call-process
|
||||||
|
"ssh" nil t nil "-o" "ControlPath=%C" "host.does.not.exist")
|
||||||
|
(goto-char (point-min))
|
||||||
|
(if (search-forward-regexp "unknown.+key" nil t)
|
||||||
|
(setq result (concat result " -o ControlPath=%t.%%r@%%h:%%p"))
|
||||||
|
(setq result (concat result " -o ControlPath=%t.%%C"))))
|
||||||
|
(with-temp-buffer
|
||||||
|
(call-process "ssh" nil t nil "-o" "ControlPersist")
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (search-forward-regexp "missing.+argument" nil t)
|
||||||
|
(setq result (concat result " -o ControlPersist=no")))))))
|
||||||
result)
|
result)
|
||||||
"Call ssh to detect whether it supports the Control* arguments.
|
"Call ssh to detect whether it supports the Control* arguments.
|
||||||
Return a string to be used in `tramp-methods'.")
|
Return a string to be used in `tramp-methods'.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue