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 13:03:14 +0300 Message-ID: <83zjgg9pr1.fsf@gnu.org> References: <53FA2CB5-2009-4F77-B10D-03B16CE6D715@lunaryorn.com> <87fvi9jn5w.fsf@gmx.de> <87vbr48del.fsf@gmx.de> <834myob55h.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405073069 27517 80.91.229.3 (11 Jul 2014 10:04:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jul 2014 10:04:29 +0000 (UTC) Cc: schwab@suse.de, 17839@debbugs.gnu.org, swiesner@lunaryorn.com To: michael.albinus@gmx.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 11 12:04: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 1X5Xgf-0006Oi-Vh for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 12:04:18 +0200 Original-Received: from localhost ([::1]:43579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Xgf-0000Ex-GU for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 06:04:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5XgV-00009R-Ne for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 06:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5XgQ-0000qG-Iz for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 06:04:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5XgQ-0000qA-El for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 06:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X5XgQ-0000FI-5n for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 06:04: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 10:04: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.1405073005889 (code B ref 17839); Fri, 11 Jul 2014 10:04:02 +0000 Original-Received: (at 17839) by debbugs.gnu.org; 11 Jul 2014 10:03:25 +0000 Original-Received: from localhost ([127.0.0.1]:53025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5Xfl-0000ED-Nf for submit@debbugs.gnu.org; Fri, 11 Jul 2014 06:03:25 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:50453) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5Xfg-0000Dw-Kv for 17839@debbugs.gnu.org; Fri, 11 Jul 2014 06:03:20 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N8J00800KSCLG00@a-mtaout21.012.net.il> for 17839@debbugs.gnu.org; Fri, 11 Jul 2014 13:03:10 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8J00806L99LI20@a-mtaout21.012.net.il>; Fri, 11 Jul 2014 13:03:10 +0300 (IDT) In-reply-to: <834myob55h.fsf@gnu.org> 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:91435 Archived-At: > Date: Fri, 11 Jul 2014 12:45:14 +0300 > From: Eli Zaretskii > Cc: schwab@suse.de, 17839@debbugs.gnu.org, swiesner@lunaryorn.com > > > From: Michael Albinus > > Date: Fri, 11 Jul 2014 11:15:14 +0200 > > Cc: Andreas Schwab , 17839@debbugs.gnu.org, > > Sebastian Wiesner > > > > OK. There is now `read-hide-char', which triggers it. Users can let-bind > > it to the character they prefer for hiding. This will be used in > > `read-passwd', choosing the default ?. if it is not let-bound already. > > > > >> + else if (hide_chars && (c == 127)) /* DEL */ > > >> + { > > >> + /* Unfortunately, we cannot edit stdout. */ > > >> + // fprintf (stdout, "%c", c); > > >> + /* Hmm, this doesn't work for multi-byte characters. */ > > >> + (len > 0) && len--; > > >> + } > > > > > > I don't think that's worth the trouble. > > > > I've removed this. > > > > The patch is committed to the trunk as revision 117510. > > Which breaks the MS-Windows build, of course, since Windows doesn't > have termios. I installed a temporary fix, to allow the build to succeed, but it means that currently `read-hide-char' is a no-op on MS-Windows. Stay tuned. Btw, I think it's a mistake to expose termios bowels of struct emacs_tty in minibuf.c. I think we should move that code to a separate function in sysdep.c, which will be called from minibuf.c.