[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master bb4212d: Improve user retrieval from auth-source in
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master bb4212d: Improve user retrieval from auth-source in Tramp |
Date: |
Tue, 29 Nov 2016 14:51:45 +0000 (UTC) |
branch: master
commit bb4212d10b7023bb52d3acd141f785b75ffa2f2c
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Improve user retrieval from auth-source in Tramp
* lisp/net/tramp.el (tramp-read-passwd, tramp-clear-passwd):
Use user for auth-source request only in case it exists.
---
lisp/net/tramp.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 52a4be8..af08cf7 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4218,7 +4218,8 @@ Invokes `password-read' if available, `read-passwd' else."
(setq auth-info
(auth-source-search
:max 1
- :user (or tramp-current-user t)
+ (and tramp-current-user :user)
+ tramp-current-user
:host tramp-current-host
:port tramp-current-method
:require
@@ -4262,7 +4263,7 @@ Invokes `password-read' if available, `read-passwd' else."
;; since Emacs 24.1, it has been replaced by `auth-source-forget'.
(if (fboundp 'auth-source-forget)
(auth-source-forget
- `(:max 1 :user ,(or user t) :host ,host :port ,method))
+ `(:max 1 ,(and user :user) ,user :host ,host :port ,method))
(tramp-compat-funcall
'auth-source-forget-user-or-password "password" host method))
(password-cache-remove (tramp-make-tramp-file-name method user host ""))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master bb4212d: Improve user retrieval from auth-source in Tramp,
Michael Albinus <=