diff options
| author | Michael Albinus | 2019-11-07 18:40:13 +0100 |
|---|---|---|
| committer | Michael Albinus | 2019-11-07 18:40:13 +0100 |
| commit | e8bcf45f306bcf4c9e8d643d68e4aabe0c69c7ca (patch) | |
| tree | cdb7f8e85bbced9a6621fc7ae4ad41b15f455ebd | |
| parent | 8ce2ec15f483a17ead34514242cba384d2d795a2 (diff) | |
| download | emacs-e8bcf45f306bcf4c9e8d643d68e4aabe0c69c7ca.tar.gz emacs-e8bcf45f306bcf4c9e8d643d68e4aabe0c69c7ca.zip | |
Handle different system names of w32 in Tramp (Bug#38079)
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist):
Initialize with `system-name' in small and capital chars.
| -rw-r--r-- | lisp/net/tramp.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 09d125945a1..50f8c5d9915 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -458,15 +458,20 @@ interpreted as a regular expression which always matches." | |||
| 458 | :version "24.3" | 458 | :version "24.3" |
| 459 | :type 'boolean) | 459 | :type 'boolean) |
| 460 | 460 | ||
| 461 | ;; For some obscure technical reasons, `system-name' on w32 returns | ||
| 462 | ;; either lower case or upper case letters. See | ||
| 463 | ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38079#20>. | ||
| 461 | (defcustom tramp-restricted-shell-hosts-alist | 464 | (defcustom tramp-restricted-shell-hosts-alist |
| 462 | (when (memq system-type '(windows-nt)) | 465 | (when (memq system-type '(windows-nt)) |
| 463 | (list (concat "\\`" (regexp-quote (system-name)) "\\'"))) | 466 | (list (format "\\`\\(%s\\|%s\\)\\'" |
| 467 | (regexp-quote (downcase (system-name))) | ||
| 468 | (regexp-quote (upcase (system-name)))))) | ||
| 464 | "List of hosts, which run a restricted shell. | 469 | "List of hosts, which run a restricted shell. |
| 465 | This is a list of regular expressions, which denote hosts running | 470 | This is a list of regular expressions, which denote hosts running |
| 466 | a registered shell like \"rbash\". Those hosts can be used as | 471 | a restricted shell like \"rbash\". Those hosts can be used as |
| 467 | proxies only, see `tramp-default-proxies-alist'. If the local | 472 | proxies only, see `tramp-default-proxies-alist'. If the local |
| 468 | host runs a registered shell, it shall be added to this list, too." | 473 | host runs a restricted shell, it shall be added to this list, too." |
| 469 | :version "24.3" | 474 | :version "27.1" |
| 470 | :type '(repeat (regexp :tag "Host regexp"))) | 475 | :type '(repeat (regexp :tag "Host regexp"))) |
| 471 | 476 | ||
| 472 | (defcustom tramp-local-host-regexp | 477 | (defcustom tramp-local-host-regexp |