emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104276: * net/tramp.el (tramp-proces


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104276: * net/tramp.el (tramp-process-actions): Set "first-password-request"
Date: Wed, 18 May 2011 14:59:25 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104276
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2011-05-18 14:59:25 +0200
message:
  * net/tramp.el (tramp-process-actions): Set "first-password-request"
  property for the correct connection in case of multihops.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-18 11:53:59 +0000
+++ b/lisp/ChangeLog    2011-05-18 12:59:25 +0000
@@ -1,3 +1,8 @@
+2011-05-18  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-process-actions): Set "first-password-request"
+       property for the correct connection in case of multihops.
+
 2011-05-18  Glenn Morris  <address@hidden>
 
        * emacs-lisp/authors.el (authors-fixed-entries): Remove fakemail.c.

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-05-17 12:47:55 +0000
+++ b/lisp/net/tramp.el 2011-05-18 12:59:25 +0000
@@ -3105,8 +3105,13 @@
 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)
@@ -3544,16 +3549,16 @@
                ;; 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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]