emacs-diffs
[Top][All Lists]
Advanced

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

emacs-30 c96e5760907: Precise password cache in Tramp


From: Michael Albinus
Subject: emacs-30 c96e5760907: Precise password cache in Tramp
Date: Sun, 10 Nov 2024 06:35:30 -0500 (EST)

branch: emacs-30
commit c96e57609076c4d5627e698a6f12a731a77c365e
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Precise password cache in Tramp
    
    * doc/misc/tramp.texi (Password handling):
    Describe auth-source-cache-expiry and auth-source-do-cache instead
    of password-cache-expiry and password-cache.  (Bug#74105)
    
    * lisp/net/tramp.el (tramp-read-passwd): Check for `auth-sources'
    being non-nil.
---
 doc/misc/tramp.texi | 20 ++++++++++++--------
 lisp/net/tramp.el   |  3 ++-
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 9895b3c6fce..0d7f9c11a6b 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2194,14 +2194,18 @@ like this:
 @value{tramp} can cache passwords as entered and reuse when needed for
 the same user or host name independent of the access method.
 
-@vindex password-cache-expiry
-@code{password-cache-expiry} sets the duration (in seconds) the
-passwords are remembered.  Passwords are never saved permanently nor
-can they extend beyond the lifetime of the current Emacs session.  Set
-@code{password-cache-expiry} to @code{nil} to disable expiration.
-
-@vindex password-cache
-Set @code{password-cache} to @code{nil} to disable password caching.
+@vindex auth-source-cache-expiry
+@code{auth-source-cache-expiry}@footnote{It overrides
+@code{password-cache-expiry}.} sets the duration (in seconds) the
+passwords are remembered.  Set @code{auth-source-cache-expiry} to
+@code{nil} to disable expiration.
+
+Cached passwords are never saved permanently nor can they extend
+beyond the lifetime of the current Emacs session unless you confirm
+this interactively.
+
+@vindex auth-source-do-cache
+Set @code{auth-source-do-cache} to @code{nil} to disable password caching.
 
 
 @node Connection caching
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 22b3ef84626..8e98f805234 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -6819,7 +6819,8 @@ Consults the auth-source package."
         (setq tramp-password-save-function nil)
         ;; See if auth-sources contains something useful.
         (ignore-errors
-          (and (tramp-get-connection-property vec "first-password-request")
+          (and auth-sources
+                (tramp-get-connection-property vec "first-password-request")
                ;; Try with Tramp's current method.  If there is no
                ;; user name, `:create' triggers to ask for.  We
                ;; suppress it.



reply via email to

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