emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master b70f885: Adapt Tramp's sudo method for non-default


From: Michael Albinus
Subject: [Emacs-diffs] master b70f885: Adapt Tramp's sudo method for non-default shells (Bug#31924)
Date: Wed, 16 Oct 2019 09:09:56 -0400 (EDT)

branch: master
commit b70f885d582e9431ced5b1a07b526b720e70b7ba
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Adapt Tramp's sudo method for non-default shells (Bug#31924)
    
    * lisp/net/tramp-sh.el (tramp-methods) <sudo>: Change template.
    (tramp-maybe-open-connection): Remove `tramp-login-env'.  (Bug#31924)
    
    * lisp/net/tramp.el (tramp-methods): Remove docstring for `tramp-login-env'.
---
 lisp/net/tramp-sh.el | 27 ++-------------------------
 lisp/net/tramp.el    |  4 ----
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index be6d29e..e92b9d7 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -279,11 +279,8 @@ The string is used in `tramp-methods'.")
                 ;; it could be interpreted as password prompt if the
                 ;; remote host echoes the command.
                 (tramp-login-args           (("-u" "%u") ("-s") ("-H")
-                                            ("-p" 
"P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")))
-                ;; Local $SHELL could be a nasty one, like zsh or
-                ;; fish.  Let's override it.
-                (tramp-login-env            (("SHELL")
-                                            (,tramp-default-remote-shell)))
+                                            ("-p" 
"P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")
+                                             ("%l")))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
@@ -4912,8 +4909,6 @@ connection if a previous connection has died for some 
reason."
                         (remote-shell
                          (tramp-get-method-parameter hop 'tramp-remote-shell))
                         (extra-args (tramp-get-sh-extra-args remote-shell))
-                        (login-env
-                         (tramp-get-method-parameter hop 'tramp-login-env))
                         (async-args
                          (tramp-get-method-parameter hop 'tramp-async-args))
                         (connection-timeout
@@ -4963,24 +4958,6 @@ connection if a previous connection has died for some 
reason."
                       (tramp-get-method-parameter
                        hop 'tramp-session-timeout)))
 
-                   ;; Add login environment.
-                   (when login-env
-                     (setq
-                      login-env
-                      (mapcar
-                       (lambda (x)
-                         (setq x (mapcar (lambda (y) (format-spec y spec)) x))
-                         (unless (member "" x) (string-join x " ")))
-                       login-env))
-                     (while login-env
-                       (setq command
-                             (format
-                              "%s=%s %s"
-                              (pop login-env)
-                              (tramp-shell-quote-argument (pop login-env))
-                              command)))
-                     (setq command (concat "env " command)))
-
                    ;; Replace `login-args' place holders.
                    (setq
                     l-host (or l-host "")
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e51a1c7..84a6feb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -240,10 +240,6 @@ pair of the form (KEY VALUE).  The following KEYs are 
defined:
     absence of `tramp-copy-args', is an indication that the
     method is capable of multi-hops.
 
-  * `tramp-login-env'
-     A list of environment variables and their values, which will
-     be set when calling `tramp-login-program'.
-
   * `tramp-async-args'
     When an asynchronous process is started, we know already that
     the connection works.  Therefore, we can pass additional



reply via email to

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