summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2009-02-01 10:48:12 +0000
committerMichael Albinus <michael.albinus@gmx.de>2009-02-01 10:48:12 +0000
commitcb85dcd0dc295fd1d05086acb6fe66d76107efbe (patch)
tree62f5b7ae2f555bcd640019c5530b69a99b3ccbe0
parent18288ba7ae15eb37072b22b782ca92cc6ad66221 (diff)
downloademacs-cb85dcd0dc295fd1d05086acb6fe66d76107efbe.tar.gz
* net/tramp.el (tramp-read-passwd): Cached passwords shall still be used.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/tramp.el16
2 files changed, 20 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 020cc4e71cb..c86e665a8eb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2009-02-01 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.1.15.
+
+ * net/tramp.el (tramp-read-passwd): Cached passwords shall still be
+ used.
+
+ * net/tramp-cache.el (top): Autoload `tramp-run-real-handler'.
+
+ * net/trampver.el: Update release number.
+
2009-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
* mail/rmail.el (rmail-view-buffer): Make buffer-local.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e222a01a273..e2e603a6b0a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3664,7 +3664,7 @@ the result will be a local, non-Tramp, filename."
(buffer-substring (point) (tramp-compat-line-end-position)))))
(setq localname (concat uname fname))))
;; There might be a double slash, for example when "~/"
- ;; expands to "/". Remove this.
+ ;; expands to "/". Remove this.
(while (string-match "//" localname)
(setq localname (replace-match "/" t t localname)))
;; No tilde characters in file name, do normal
@@ -7433,12 +7433,14 @@ Invokes `password-read' if available, `read-passwd' else."
(funcall (symbol-function 'auth-source-user-or-password)
"password" tramp-current-host tramp-current-method))
;; Try the password cache.
- (and (functionp 'password-read)
- (tramp-get-connection-property proc "first-password-request" nil)
- (let ((password (funcall (symbol-function 'password-read)
- pw-prompt key)))
- (funcall (symbol-function 'password-cache-add) key password)
- password))
+ (when (functionp 'password-read)
+ (unless (tramp-get-connection-property
+ proc "first-password-request" nil)
+ (funcall (symbol-function 'password-cache-remove) key))
+ (let ((password
+ (funcall (symbol-function 'password-read) pw-prompt key)))
+ (funcall (symbol-function 'password-cache-add) key password)
+ password))
;; Else, get the password interactively.
(read-passwd pw-prompt))
(tramp-set-connection-property proc "first-password-request" nil))))