]> code.delx.au - gnu-emacs/commitdiff
* lisp/net/tramp-sh.el (tramp-methods) <sudo>: Mask "Password:".
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 1 Sep 2015 14:31:06 +0000 (16:31 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 1 Sep 2015 14:31:06 +0000 (16:31 +0200)
lisp/net/tramp-sh.el

index 5f96b92f17fb278dd366608c095eac5543dc54bd..79b024e831082ddb310f2bcd45b1b604a532424a 100644 (file)
@@ -288,10 +288,10 @@ The string is used in `tramp-methods'.")
 (add-to-list 'tramp-methods
   '("sudo"
     (tramp-login-program        "sudo")
-    ;; The password template must not be the last argument.
-    ;; Otherwise, it could be interpreted as password prompt if the
-    ;; remote host echoes the command.
-    (tramp-login-args           (("-p" "Password:") ("-u" "%u") ("-s") ("-H")))
+    ;; 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\"\":")))
     ;; Local $SHELL could be a nasty one, like zsh or fish.  Let's override it.
     (tramp-login-env            (("SHELL") ("/bin/sh")))
     (tramp-remote-shell         "/bin/sh")