diff options
| author | Michael Albinus | 2016-10-28 17:08:14 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-10-28 17:08:14 +0200 |
| commit | f5543ffcf5b2974fa8fc6cf007e9109fa8e9051e (patch) | |
| tree | dcf59f04d5f6b51b5aaffd6a617a8e1509ca5d2c | |
| parent | e2fd20683ad6c771912958058985c9696a1fc063 (diff) | |
| download | emacs-f5543ffcf5b2974fa8fc6cf007e9109fa8e9051e.tar.gz emacs-f5543ffcf5b2974fa8fc6cf007e9109fa8e9051e.zip | |
Improve result of `auth-source-search' in Tramp
* lisp/net/tramp.el (tramp-read-passwd): Require :secret and
:user in result of `auth-source-search'.
| -rw-r--r-- | lisp/net/tramp.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 730972e0c4e..e03b614b3f4 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4160,7 +4160,10 @@ Invokes `password-read' if available, `read-passwd' else." | |||
| 4160 | :max 1 | 4160 | :max 1 |
| 4161 | :user (or tramp-current-user t) | 4161 | :user (or tramp-current-user t) |
| 4162 | :host tramp-current-host | 4162 | :host tramp-current-host |
| 4163 | :port tramp-current-method) | 4163 | :port tramp-current-method |
| 4164 | :require | ||
| 4165 | (cons | ||
| 4166 | :secret (and tramp-current-user '(:user)))) | ||
| 4164 | auth-passwd (plist-get | 4167 | auth-passwd (plist-get |
| 4165 | (nth 0 auth-info) :secret) | 4168 | (nth 0 auth-info) :secret) |
| 4166 | auth-passwd (if (functionp auth-passwd) | 4169 | auth-passwd (if (functionp auth-passwd) |