emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 516ce2c: * lisp/net/tramp.el (tramp-clear-passwd):


From: Michael Albinus
Subject: [Emacs-diffs] master 516ce2c: * lisp/net/tramp.el (tramp-clear-passwd): Call also `auth-source-forget'.
Date: Wed, 21 Sep 2016 10:00:20 +0000 (UTC)

branch: master
commit 516ce2cdc4ce293aed393440aaac29944a7d5a55
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    * lisp/net/tramp.el (tramp-clear-passwd): Call also `auth-source-forget'.
---
 lisp/net/tramp.el |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2a8a5ef..2361b07 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1314,8 +1314,8 @@ necessary only.  This function will be used in file name 
completion."
   "Get the connection buffer to be used for VEC."
   (or (get-buffer (tramp-buffer-name vec))
       (with-current-buffer (get-buffer-create (tramp-buffer-name vec))
-       ;; We use existence of connection property "process-buffer" as
-       ;; indication, whether a connection is active.
+       ;; We use the existence of connection property "process-buffer"
+       ;; as indication, whether a connection is active.
        (tramp-set-connection-property
         vec "process-buffer"
         (tramp-get-connection-property vec "process-buffer" nil))
@@ -4194,6 +4194,14 @@ Invokes `password-read' if available, `read-passwd' 
else."
         (replace-regexp-in-string
          (concat tramp-postfix-hop-regexp "$")
          tramp-postfix-host-format hop))))))
+  ;; `auth-source-forget' has been obsoleted with Emacs 24.1.  But
+  ;; there is no known replacement.
+  (when (fboundp 'auth-source-forget)
+    (auth-source-forget
+     `(:max 1
+       :user ,(or (tramp-file-name-user vec) t)
+       :host ,(tramp-file-name-host vec)
+       :port ,(tramp-file-name-method vec))))
   (password-cache-remove
    (tramp-make-tramp-file-name
     (tramp-file-name-method vec)



reply via email to

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