From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) Date: Sat, 22 Nov 2014 18:00:57 +0100 Message-ID: <87d28f9nli.fsf@gmx.de> References: <5464F8A0.5080809@chauveau-central.net> <54650874.6030007@chauveau-central.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416675748 28986 80.91.229.3 (22 Nov 2014 17:02:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2014 17:02:28 +0000 (UTC) Cc: 19047@debbugs.gnu.org To: Stephane Chauveau Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 18:02:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XsE4i-0001Q6-Qg for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2014 18:02:20 +0100 Original-Received: from localhost ([::1]:46159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsE4i-0006Wq-Dh for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2014 12:02:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsE4X-0006Ku-Cm for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2014 12:02:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsE4R-000676-3Q for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2014 12:02:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsE4R-000671-1O for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2014 12:02:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XsE4Q-0008Fk-H1 for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2014 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Nov 2014 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19047-submit@debbugs.gnu.org id=B19047.141667566531659 (code B ref 19047); Sat, 22 Nov 2014 17:02:02 +0000 Original-Received: (at 19047) by debbugs.gnu.org; 22 Nov 2014 17:01:05 +0000 Original-Received: from localhost ([127.0.0.1]:41929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsE3V-0008EZ-6i for submit@debbugs.gnu.org; Sat, 22 Nov 2014 12:01:05 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:55632) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsE3S-0008EQ-MM for 19047@debbugs.gnu.org; Sat, 22 Nov 2014 12:01:03 -0500 Original-Received: from detlef.gmx.de ([87.146.34.33]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LyzW8-1XwTH93bxg-014Aqq; Sat, 22 Nov 2014 18:00:59 +0100 In-Reply-To: <54650874.6030007@chauveau-central.net> (Stephane Chauveau's message of "Thu, 13 Nov 2014 20:37:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:cR0+tPy5J/JzRzCVZIaqg06qQG2SMDSflR4dFPiAhWKdXhQz4zr IGB2VtbaaHobpZZ3GrAXXWoVwEvWMM2EQ0sIj2Aq/DW2MC8aQcEBODc19nhbhijY5E4NnrR YEAeWaaErn31zTkcW3Szft9wBtPQK2z4ximRj9wuOYOnP+t75d7aA5XTom4IWtXFeUrUsDD jhFBq8dMHyzc7GLdRp/hw== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96427 Archived-At: Stephane Chauveau 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.