emacs-tramp-sudo.patch 1010 B

123456789101112131415161718192021222324252627282930
  1. From 9ba8f39230d9325ea555e6b08cb075d9e0726321 Mon Sep 17 00:00:00 2001
  2. From: Oleg Pykhalov <go.wigust@gmail.com>
  3. Date: Sun, 12 May 2019 21:05:24 +0300
  4. Subject: [PATCH] tramp: Do not require search for a user in sudo method.
  5. * lisp/net/tramp.el (tramp-read-passwd): Do not require search for a
  6. user in sudo method.
  7. ---
  8. lisp/net/tramp.el | 4 +++-
  9. 1 file changed, 3 insertions(+), 1 deletion(-)
  10. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
  11. index 315e709947..44a2428ab7 100644
  12. --- a/lisp/net/tramp.el
  13. +++ b/lisp/net/tramp.el
  14. @@ -4430,7 +4430,9 @@ tramp-read-passwd
  15. :port tramp-current-method
  16. :require
  17. (cons
  18. - :secret (and tramp-current-user '(:user))))
  19. + :secret (and (not (string-equal tramp-current-method "sudo"))
  20. + tramp-current-user
  21. + '(:user))))
  22. auth-passwd (plist-get
  23. (nth 0 auth-info) :secret)
  24. auth-passwd (if (functionp auth-passwd)
  25. --
  26. 2.21.0