+2011-05-18 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-process-actions): Set "first-password-request"
+ property for the correct connection in case of multihops.
+
2011-05-18 Glenn Morris <rgm@gnu.org>
* emacs-lisp/authors.el (authors-fixed-entries): Remove fakemail.c.
connection buffer."
;; Preserve message for `progress-reporter'.
(tramp-compat-with-temp-message ""
- ;; Enable auth-source and password-cache.
- (tramp-set-connection-property vec "first-password-request" t)
+ ;; Enable auth-source and password-cache. We must use
+ ;; tramp-current-* variables in case we have several hops.
+ (tramp-set-connection-property
+ (tramp-dissect-file-name
+ (tramp-make-tramp-file-name
+ tramp-current-method tramp-current-user tramp-current-host ""))
+ "first-password-request" t)
(save-restriction
(let (exit)
(while (not exit)
;; Try with Tramp's current method.
(if (fboundp 'auth-source-search)
(setq auth-info
- (tramp-compat-funcall
- 'auth-source-search
- :max 1
- :user (or tramp-current-user t)
- :host tramp-current-host
- :port tramp-current-method)
- auth-passwd (plist-get (nth 0 auth-info) :secret)
- auth-passwd (if (functionp auth-passwd)
- (funcall auth-passwd)
- auth-passwd))
+ (tramp-compat-funcall
+ 'auth-source-search
+ :max 1
+ :user (or tramp-current-user t)
+ :host tramp-current-host
+ :port tramp-current-method)
+ auth-passwd (plist-get (nth 0 auth-info) :secret)
+ auth-passwd (if (functionp auth-passwd)
+ (funcall auth-passwd)
+ auth-passwd))
(tramp-compat-funcall
'auth-source-user-or-password
"password" tramp-current-host tramp-current-method)))