From 978681e78295d1f3457afb944d7ad4049039397f Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Sun, 20 Mar 2022 11:08:31 +0100 Subject: [PATCH] Fix wrong password stored in Tramp * lisp/net/tramp.el (tramp-process-actions): Unset `tramp-password-save-function'. --- lisp/net/tramp.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 38bdfab1929..0192a63a104 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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) -- 2.39.2