From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17839: 24.4.50; read-passwd echoes password input in non-interactive sessions Date: Fri, 11 Jul 2014 17:02:48 +0300 Message-ID: <83tx6o9enr.fsf@gnu.org> References: <53FA2CB5-2009-4F77-B10D-03B16CE6D715@lunaryorn.com> <87fvi9jn5w.fsf@gmx.de> <87vbr48del.fsf@gmx.de> <834myob55h.fsf@gnu.org> <87mwcg8bdw.fsf@gmx.de> <83y4w09p9c.fsf@gnu.org> <87k37k5an5.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405087411 10691 80.91.229.3 (11 Jul 2014 14:03:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jul 2014 14:03:31 +0000 (UTC) Cc: schwab@suse.de, 17839@debbugs.gnu.org, swiesner@lunaryorn.com To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 11 16:03:22 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 1X5bQ0-0006ak-W8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 16:03:21 +0200 Original-Received: from localhost ([::1]:44978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5bQ0-0008MQ-9w for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 10:03:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5bPs-0008LJ-8h for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 10:03:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5bPi-0001vS-Px for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 10:03:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5bPi-0001v9-Nc for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X5bPi-0000Qi-5q for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jul 2014 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17839-submit@debbugs.gnu.org id=B17839.14050873801588 (code B ref 17839); Fri, 11 Jul 2014 14:03:02 +0000 Original-Received: (at 17839) by debbugs.gnu.org; 11 Jul 2014 14:03:00 +0000 Original-Received: from localhost ([127.0.0.1]:53573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5bPc-0000PR-Gn for submit@debbugs.gnu.org; Fri, 11 Jul 2014 10:03:00 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:55124) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5bPX-0000P2-0D for 17839@debbugs.gnu.org; Fri, 11 Jul 2014 10:02:54 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N8J00500W4JGT00@mtaout29.012.net.il> for 17839@debbugs.gnu.org; Fri, 11 Jul 2014 17:02:41 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8J0002RWCHJY50@mtaout29.012.net.il>; Fri, 11 Jul 2014 17:02:41 +0300 (IDT) In-reply-to: <87k37k5an5.fsf@gmx.de> X-012-Sender: halo1@inter.net.il 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:91445 Archived-At: > From: Michael Albinus > Cc: monnier@iro.umontreal.ca, schwab@suse.de, 17839@debbugs.gnu.org, swiesner@lunaryorn.com > Date: Fri, 11 Jul 2014 14:43:10 +0200 > > Eli Zaretskii writes: > > >> Alternatively, shall we add (disable|enable)_echo functions to sysdep.c? > > > > Yes, please. This will make emulating termios for Windows easier. > > I've moved the code to the new function suppress_echo_on_tty of > sysdep.c. For resetting the tty, no new function was necessary. Thanks. I added implementation for MS-Windows. The result is not 100% satisfactory, as one needs to press RET twice to finish the input, and it looks like some garbage is left in the input buffer, since the following (normal) input gets something strange. A workaround is to press C-z, which produces EOF, instead of RET, when password entry is finished. I also needed a change in minibuf.c to end the reading loop on CR, not just a newline. If this is bad news for Posix platforms, we can make that code conditional on Windows.