]> git.eshelyaron.com Git - emacs.git/commitdiff
Make remote-shell-program default to ssh only
authorStefan Kangas <stefan@marxist.se>
Tue, 12 Jul 2022 10:11:43 +0000 (12:11 +0200)
committerStefan Kangas <stefan@marxist.se>
Tue, 12 Jul 2022 10:42:39 +0000 (12:42 +0200)
* lisp/files.el (remote-shell-program): Default to "ssh" only.  The
other commands in this list have severe security issues, and it is
easy enough for users to customize them manually if they want to.
See also the discussion in: https://debbugs.gnu.org/56461

lisp/files.el

index b99ccf66d8a3d657cc7715779edde22f1216c0f4..bdceaefb0ff1853667d70e63cb9aba6e9e2c7732 100644 (file)
@@ -1274,20 +1274,9 @@ Tip: You can use this expansion of remote identifier components
 ;; It's not clear what the best file for this to be in is, but given
 ;; it uses custom-initialize-delay, it is easier if it is preloaded
 ;; rather than autoloaded.
-(defcustom remote-shell-program
-  ;; This used to try various hard-coded places for remsh, rsh, and
-  ;; rcmd, trying to guess based on location whether "rsh" was
-  ;; "restricted shell" or "remote shell", but I don't see the point
-  ;; in this day and age.  Almost everyone will use ssh, and have
-  ;; whatever command they want to use in PATH.
-  (purecopy
-   (let ((list '("ssh" "remsh" "rcmd" "rsh")))
-     (while (and list
-                (not (executable-find (car list)))
-                (setq list (cdr list))))
-     (or (car list) "ssh")))
-  "Program to use to execute commands on a remote host (e.g. ssh or rsh)."
-  :version "24.3"                      ; ssh rather than rsh, etc
+(defcustom remote-shell-program (or (executable-find "ssh") "ssh")
+  "Program to use to execute commands on a remote host (i.e. ssh)."
+  :version "29.1"
   :initialize 'custom-initialize-delay
   :group 'environment
   :type 'file)