]> git.eshelyaron.com Git - emacs.git/commitdiff
Precise password cache in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 10 Nov 2024 11:35:15 +0000 (12:35 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Nov 2024 12:40:52 +0000 (13:40 +0100)
* 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.

(cherry picked from commit c96e57609076c4d5627e698a6f12a731a77c365e)

doc/misc/tramp.texi
lisp/net/tramp.el

index 3526cafad75d0d01d3de182ab18d9908c2203877..8b8cd1ae55331bc8b33d7870e1969ea27b4dbc4c 100644 (file)
@@ -2245,14 +2245,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
index a7e70de960d742066143db313a53d0546fcb1fac..a4e8fe420481643d05503088e170d2b7b1a3e4b8 100644 (file)
@@ -6897,7 +6897,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.