aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2014-06-03 09:43:24 +0200
committerMichael Albinus2014-06-03 09:43:24 +0200
commita336b2eae3b52f6fba5a19cc98e780feca618115 (patch)
treedc38c5bab3b26d430d4575594cfefc9114632ecc /lisp/net
parente7477c9f9e88fe764c29c7193614ed37ba69efa8 (diff)
downloademacs-a336b2eae3b52f6fba5a19cc98e780feca618115.tar.gz
emacs-a336b2eae3b52f6fba5a19cc98e780feca618115.zip
Fix Bug#17653.
* net/tramp.el (tramp-ssh-controlmaster-options): Improve search regexp.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6cc8275b327..9a97d824528 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -302,18 +302,19 @@ useful only in combination with `tramp-default-proxies-alist'.")
302 302
303;;;###tramp-autoload 303;;;###tramp-autoload
304(defconst tramp-ssh-controlmaster-options 304(defconst tramp-ssh-controlmaster-options
305 (let ((result "")) 305 (let ((result "")
306 (case-fold-search t))
306 (ignore-errors 307 (ignore-errors
307 (with-temp-buffer 308 (with-temp-buffer
308 (call-process "ssh" nil t nil "-o" "ControlMaster") 309 (call-process "ssh" nil t nil "-o" "ControlMaster")
309 (goto-char (point-min)) 310 (goto-char (point-min))
310 (when (search-forward-regexp "Missing ControlMaster argument" nil t) 311 (when (search-forward-regexp "missing.+argument" nil t)
311 (setq result "-o ControlPath=%t.%%r@%%h:%%p -o ControlMaster=auto"))) 312 (setq result "-o ControlPath=%t.%%r@%%h:%%p -o ControlMaster=auto")))
312 (when result 313 (unless (zerop (length result))
313 (with-temp-buffer 314 (with-temp-buffer
314 (call-process "ssh" nil t nil "-o" "ControlPersist") 315 (call-process "ssh" nil t nil "-o" "ControlPersist")
315 (goto-char (point-min)) 316 (goto-char (point-min))
316 (when (search-forward-regexp "Missing ControlPersist argument" nil t) 317 (when (search-forward-regexp "missing.+argument" nil t)
317 (setq result (concat result " -o ControlPersist=no")))))) 318 (setq result (concat result " -o ControlPersist=no"))))))
318 result) 319 result)
319 "Call ssh to detect whether it supports the Control* arguments. 320 "Call ssh to detect whether it supports the Control* arguments.