unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: sql-mode password display
Date: Thu, 03 Mar 2005 12:42:17 -0700	[thread overview]
Message-ID: <38p7kvF5qislkU1@individual.net> (raw)
In-Reply-To: <kx91xax6b1e.fsf@panix5.panix.com>

rb wrote:
 > Kevin Rodgers <ihs_4664@yahoo.com> writes:
 >>What happens if you don't enter your password when prompted by M-x
 >>sql-mysql, i.e. just type RET?
 >
 > Thank you for the suggestion,
 >
 > Without password, the server rejects the connection attempt - it is
 > configured to require passwords.

I was hoping it would prompt you and comint would DTRT.

 >>M-: (string-match comint-password-prompt-regexp "Enter password: ") RET
 >>returns nil, so I would try
 >>
 >>(setq comint-password-prompt-regexp
 >>       "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos \\|CVS
 >>\\|UNIX \\| SMB \\|^\\)[Pp]assword\\( (again)\\)?\\|pass
 >>phrase\\|\\(Enter\\|Repeat\\) pass ?\\(word\\|phrase\\)\\)\\( for
 >>[^:]+\\)?:\\s *\\'")
 >
 > that is what the value of comint-password-prompt-regexp already is, as
 > mentioned:

Not in Emacs 21.3, where its default value fails the test that I
mentioned:

 >>M-: (string-match comint-password-prompt-regexp "Enter password: ") RET

But changing its value as above causes that test to succeed.

 >> > Within the shell, any other commands requiring a password (ssh, 
rlogin,
 >> > su, etc), the password is [properly] not displayed.

I know.  That's because their password prompts satisfy the string-match
test above, so when comint-watch-for-password-prompt is called via
comint-output-filter-functions it sends your password to the sql process
without echoing it in the buffer.

-- 
Kevin Rodgers

  reply	other threads:[~2005-03-03 19:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-02 16:57 sql-mode password display rb
2005-03-02 18:31 ` Kevin Rodgers
2005-03-02 20:35   ` rb
2005-03-03 19:42     ` Kevin Rodgers [this message]
2005-03-03 20:51 ` Michael Mauger
     [not found] ` <mailman.2522.1109885280.32256.help-gnu-emacs@gnu.org>
2005-03-03 23:15   ` rb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38p7kvF5qislkU1@individual.net \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).