help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sql-mode password display


From: Kevin Rodgers
Subject: Re: sql-mode password display
Date: Thu, 03 Mar 2005 12:42:17 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]