emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f83d7cc312 3/3: Make remote-shell-program default to ssh only


From: Stefan Kangas
Subject: master f83d7cc312 3/3: Make remote-shell-program default to ssh only
Date: Tue, 12 Jul 2022 06:50:37 -0400 (EDT)

branch: master
commit f83d7cc312b5e8c82052b484998fa26d4af35b36
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Make remote-shell-program default to ssh only
    
    * 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 | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index b99ccf66d8..bdceaefb0f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]