Fix Tramp error on macOS

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Don't use an absolute ControlPath on macOS.  (Bug#64880)
This commit is contained in:
Michael Albinus 2023-07-27 09:30:41 +02:00
parent 5d245e9d0d
commit b936ff0963

View file

@ -4867,12 +4867,17 @@ Goes through the list `tramp-inline-compress-commands'."
" -o ControlPath="
(if (eq tramp-use-connection-share 'suppress)
"none"
;; Hashed tokens are introduced in OpenSSH 6.7.
(expand-file-name
(if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
"tramp.%%C" "tramp.%%r@%%h:%%p")
(or small-temporary-file-directory
tramp-compat-temporary-file-directory)))
;; Hashed tokens are introduced in OpenSSH 6.7. On macOS
;; we cannot use an absolute file name, it is too long.
;; See Bug#19702.
(if (eq system-type 'darwin)
(if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
"tramp.%%C" "tramp.%%r@%%h:%%p")
(expand-file-name
(if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
"tramp.%%C" "tramp.%%r@%%h:%%p")
(or small-temporary-file-directory
tramp-compat-temporary-file-directory))))
;; ControlPersist option is introduced in OpenSSH 5.6.
(when (and (not (eq tramp-use-connection-share 'suppress))