GNU bug report logs -
#19047
Tramp reuses bad ssh passphrase several times without asking
Previous Next
Full log
Message #11 received at 19047 <at> debbugs.gnu.org (full text, mbox):
Stephane Chauveau <stephane <at> chauveau-central.net> writes:
> In function tramp-action-password, some codes were added to clear the
> 'wrong' password:
>
> ;; Let's check whether a wrong password has been sent already.
> ;; Sometimes, the process returns a new password request
> ;; immediately after rejecting the previous (wrong) one.
> (goto-char (point-min))
> (when (search-forward-regexp tramp-wrong-passwd-regexp nil t)
> (tramp-clear-passwd vec))
>
> That code probably does not work because there is nothing to match with
> tramp-password-prompt-regexp after the Enter passphrase prompt.
Finally, I have pushed a patch towards the emacs-24 branch, which shall
fix it. For testing:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-24/lisp/net/tramp.el 2014-11-22 18:54:33.000000000 +0200
--- /home/albinus/src/emacs-24/lisp/net/tramp.el.~6ec5ee8872bfb8b0ebc53d98fcb8f284e08c147f~ 2014-11-22 18:54:33.000000000 +0200
***************
*** 3445,3453 ****
;; Let's check whether a wrong password has been sent already.
;; Sometimes, the process returns a new password request
;; immediately after rejecting the previous (wrong) one.
! (goto-char (point-min))
! (when (search-forward-regexp tramp-wrong-passwd-regexp nil t)
(tramp-clear-passwd vec))
(tramp-check-for-regexp proc tramp-password-prompt-regexp)
(tramp-message vec 3 "Sending %s" (match-string 1))
;; We don't call `tramp-send-string' in order to hide the
--- 3445,3453 ----
;; Let's check whether a wrong password has been sent already.
;; Sometimes, the process returns a new password request
;; immediately after rejecting the previous (wrong) one.
! (unless (tramp-get-connection-property vec "first-password-request" nil)
(tramp-clear-passwd vec))
+ (goto-char (point-min))
(tramp-check-for-regexp proc tramp-password-prompt-regexp)
(tramp-message vec 3 "Sending %s" (match-string 1))
;; We don't call `tramp-send-string' in order to hide the
--8<---------------cut here---------------end--------------->8---
Thanks for your report, and best regards, Michael.
This bug report was last modified 10 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.