emacs-diffs
[Top][All Lists]
Advanced

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

master 37020ca 1/3: * lisp/net/tramp-sh.el (tramp-methods): <sudo>: Chan


From: Michael Albinus
Subject: master 37020ca 1/3: * lisp/net/tramp-sh.el (tramp-methods): <sudo>: Change template. (Bug#50594)
Date: Wed, 15 Sep 2021 09:16:39 -0400 (EDT)

branch: master
commit 37020ca341a5b406648b4f72976ab7206771d81e
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    * lisp/net/tramp-sh.el (tramp-methods): <sudo>: Change template.  
(Bug#50594)
---
 lisp/net/tramp-sh.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index dc04978..d0a340a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -280,13 +280,14 @@ The string is used in `tramp-methods'.")
                 (tramp-connection-timeout   10)))
  (add-to-list 'tramp-methods
               `("sudo"
-                (tramp-login-program        "sudo")
+                (tramp-login-program        "env")
                 ;; The password template must be masked.  Otherwise,
                 ;; 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\"\":")
-                                             ("%l")))
+               ;; The "-p" argument doesn't work reliably, see Bug#50594.
+                (tramp-login-args           
(("SUDO_PROMPT=P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")
+                                             ("sudo") ("-u" "%u") ("-s") ("-H")
+                                            ("%l")))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))



reply via email to

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