diff --git a/lisp/tramp.el b/lisp/tramp.el index b1ad1922..7b929255 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -457,15 +457,20 @@ interpreted as a regular expression which always matches." :version "24.3" :type 'boolean) +;; For some obscure technical reasons, `system-name' on w32 returns +;; either lower case or upper case letters. See +;; . (defcustom tramp-restricted-shell-hosts-alist (when (memq system-type '(windows-nt)) - (list (concat "\\`" (regexp-quote (system-name)) "\\'"))) + (list (format "\\`\\(%s\\|%s\\)\\'" + (regexp-quote (downcase (system-name))) + (regexp-quote (upcase (system-name)))))) "List of hosts, which run a restricted shell. This is a list of regular expressions, which denote hosts running a registered shell like \"rbash\". Those hosts can be used as proxies only, see `tramp-default-proxies-alist'. If the local host runs a registered shell, it shall be added to this list, too." - :version "24.3" + :version "27.1" :type '(repeat (regexp :tag "Host regexp"))) (defcustom tramp-local-host-regexp