]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix wrong password stored in Tramp
authorManuel Giraud <manuel@ledu-giraud.fr>
Sun, 20 Mar 2022 10:08:31 +0000 (11:08 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 20 Mar 2022 10:08:31 +0000 (11:08 +0100)
* lisp/net/tramp.el (tramp-process-actions):
Unset `tramp-password-save-function'.

lisp/net/tramp.el

index 38bdfab1929756ebf5f062c353c57d43b9a662eb..0192a63a10423bfacd449a8ae907765e4cc418a6 100644 (file)
@@ -5008,8 +5008,9 @@ performed successfully.  Any other value means an error."
          (tramp-message vec 6 "\n%s" (buffer-string)))
        (if (eq exit 'ok)
            (ignore-errors
-             (and (functionp tramp-password-save-function)
-                  (funcall tramp-password-save-function)))
+             (when (functionp tramp-password-save-function)
+               (funcall tramp-password-save-function)
+                (setq tramp-password-save-function nil)))
          ;; Not successful.
          (tramp-clear-passwd vec)
          (delete-process proc)