aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-05-18 14:59:25 +0200
committerMichael Albinus2011-05-18 14:59:25 +0200
commit2fb0a219f61247677cfe32951bb9ab569231dc0b (patch)
treea7836739d3a4f43e58f5d7ee392384b908a21294
parentc2571358e45621d8fb314aa3e5510ca8ececea65 (diff)
downloademacs-2fb0a219f61247677cfe32951bb9ab569231dc0b.tar.gz
emacs-2fb0a219f61247677cfe32951bb9ab569231dc0b.zip
* net/tramp.el (tramp-process-actions): Set "first-password-request"
property for the correct connection in case of multihops.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp.el29
2 files changed, 22 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be5312a6f2b..15bd4b190b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-05-18 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-process-actions): Set "first-password-request"
4 property for the correct connection in case of multihops.
5
12011-05-18 Glenn Morris <rgm@gnu.org> 62011-05-18 Glenn Morris <rgm@gnu.org>
2 7
3 * emacs-lisp/authors.el (authors-fixed-entries): Remove fakemail.c. 8 * emacs-lisp/authors.el (authors-fixed-entries): Remove fakemail.c.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bc831c3b596..537ccf6da6a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3105,8 +3105,13 @@ set, is the starting point of the region to be deleted in the
3105connection buffer." 3105connection buffer."
3106 ;; Preserve message for `progress-reporter'. 3106 ;; Preserve message for `progress-reporter'.
3107 (tramp-compat-with-temp-message "" 3107 (tramp-compat-with-temp-message ""
3108 ;; Enable auth-source and password-cache. 3108 ;; Enable auth-source and password-cache. We must use
3109 (tramp-set-connection-property vec "first-password-request" t) 3109 ;; tramp-current-* variables in case we have several hops.
3110 (tramp-set-connection-property
3111 (tramp-dissect-file-name
3112 (tramp-make-tramp-file-name
3113 tramp-current-method tramp-current-user tramp-current-host ""))
3114 "first-password-request" t)
3110 (save-restriction 3115 (save-restriction
3111 (let (exit) 3116 (let (exit)
3112 (while (not exit) 3117 (while (not exit)
@@ -3544,16 +3549,16 @@ Invokes `password-read' if available, `read-passwd' else."
3544 ;; Try with Tramp's current method. 3549 ;; Try with Tramp's current method.
3545 (if (fboundp 'auth-source-search) 3550 (if (fboundp 'auth-source-search)
3546 (setq auth-info 3551 (setq auth-info
3547 (tramp-compat-funcall 3552 (tramp-compat-funcall
3548 'auth-source-search 3553 'auth-source-search
3549 :max 1 3554 :max 1
3550 :user (or tramp-current-user t) 3555 :user (or tramp-current-user t)
3551 :host tramp-current-host 3556 :host tramp-current-host
3552 :port tramp-current-method) 3557 :port tramp-current-method)
3553 auth-passwd (plist-get (nth 0 auth-info) :secret) 3558 auth-passwd (plist-get (nth 0 auth-info) :secret)
3554 auth-passwd (if (functionp auth-passwd) 3559 auth-passwd (if (functionp auth-passwd)
3555 (funcall auth-passwd) 3560 (funcall auth-passwd)
3556 auth-passwd)) 3561 auth-passwd))
3557 (tramp-compat-funcall 3562 (tramp-compat-funcall
3558 'auth-source-user-or-password 3563 'auth-source-user-or-password
3559 "password" tramp-current-host tramp-current-method))) 3564 "password" tramp-current-host tramp-current-method)))