GNU bug report logs - #5664
view-lossage may show passwords and sensitive information

Previous Next

Package: emacs;

Reported by: Andreas Roehler <andreas.roehler <at> online.de>

Date: Mon, 1 Mar 2010 08:17:02 UTC

Severity: normal

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5664 in the body.
You can then email your comments to 5664 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Mon, 01 Mar 2010 08:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Roehler <andreas.roehler <at> online.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 01 Mar 2010 08:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Roehler <andreas.roehler <at> online.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1.92; view-lossage
Date: Mon, 01 Mar 2010 09:18:20 +0100
Hi,

may reproduce bug mentioned here:

http://lists.gnu.org/archive/html/help-gnu-emacs/2010-02/msg00602.html

With emacs-shell, emacs -q

1) when prompted for pw, it's shown afterwards at the screen
2) it's visible by view-lossage/recent-input

replaced it below for this report by MY-PASSWORD-DISPLAYED-HERE

In GNU Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0)
 of 2010-02-19
Windowing system distributor `The X.Org Foundation', version 11.0.70200000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x s h e l l <return> / b n <backspace> <backspace>
b i n / s u <return> MY-PASSWORD-DISPLAYED-HERE <return> M-x r e
p o r t - e m a c - <backspace> s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug ansi-color
shell comint ring tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)





Changed bug title to 'view-lossage may show passwords and sensitive information' from '23.1.92; view-lossage' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 04 Mar 2010 19:28:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sat, 06 Mar 2010 20:03:01 GMT) Full text and rfc822 format available.

Message #10 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Roehler <andreas.roehler <at> online.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5664 <at> debbugs.gnu.org
Subject: Re: 23.1.92; view-lossage
Date: Sat, 06 Mar 2010 21:04:18 +0100
Chong Yidong wrote:
>> may reproduce bug mentioned here:
>>
>> http://lists.gnu.org/archive/html/help-gnu-emacs/2010-02/msg00602.html
>>
>> With emacs-shell, emacs -q
>>
>> 1) when prompted for pw, it's shown afterwards at the screen
>> 2) it's visible by view-lossage/recent-input
> 
> I can't reproduce this.  Please provide an exact recipe; the one you
> gave was far too imprecise.
> 


Commands have been:

emacs -q
M-x shell
/bin/su at shell prompt

prompt for PW arrives, when PW putted in, its visible at the screen

root-shell (bash) arrives

M-x report-emacs-bug

View lossage displays root-password, replaced for this report by
MY-PW-SHOWN-HERE

Thanks caring for the matter,

Andreas
;;;;;;;;;;

In GNU Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0)
 of 2010-02-19

Windowing system distributor `The X.Org Foundation', version 11.0.70200000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x s h e l l <return> / b i n / s u <return> MY-PW-SHOWN-HERE <return> M-x r e p o r t - e m a c s - b u
g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug ansi-color
shell comint ring tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sat, 06 Mar 2010 20:19:01 GMT) Full text and rfc822 format available.

Message #13 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Andreas Roehler <andreas.roehler <at> online.de>
Cc: 5664 <at> debbugs.gnu.org
Subject: Re: 23.1.92; view-lossage
Date: Sat, 06 Mar 2010 15:18:44 -0500
Andreas Roehler <andreas.roehler <at> online.de> writes:

> emacs -q
> M-x shell
> /bin/su at shell prompt
>
> prompt for PW arrives, when PW putted in, its visible at the screen
>
> root-shell (bash) arrives
>
> M-x report-emacs-bug
>
> View lossage displays root-password, replaced for this report by
> MY-PW-SHOWN-HERE

I'm afraid I can't reproduce this.  One possibility is that you are
using a locale where the password prompt is given in a language that
comint-watch-for-password-prompt does not recognize.  This is a known
issue; customize comint-password-prompt-regexp to add the
locale-dependent password prompt(s) to the list of recognized prompts.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sat, 06 Mar 2010 20:42:01 GMT) Full text and rfc822 format available.

Message #16 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Roehler <andreas.roehler <at> online.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5664 <at> debbugs.gnu.org
Subject: Re: 23.1.92; view-lossage
Date: Sat, 06 Mar 2010 21:44:00 +0100
Chong Yidong wrote:
> Andreas Roehler <andreas.roehler <at> online.de> writes:
> 
>> emacs -q
>> M-x shell
>> /bin/su at shell prompt
>>
>> prompt for PW arrives, when PW putted in, its visible at the screen
>>
>> root-shell (bash) arrives
>>
>> M-x report-emacs-bug
>>
>> View lossage displays root-password, replaced for this report by
>> MY-PW-SHOWN-HERE
> 
> I'm afraid I can't reproduce this.  One possibility is that you are
> using a locale where the password prompt is given in a language that
> comint-watch-for-password-prompt does not recognize.  This is a known
> issue; customize comint-password-prompt-regexp to add the
> locale-dependent password prompt(s) to the list of recognized prompts.
> 

Thanks, that helps here.
However, think there is a bug though. If Emacs is able to display the prompt delivered,
it should adapt its behavior independently from the regexp already customized.

Unless some reasons contradict.

Andreas




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sat, 06 Mar 2010 21:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andreas Roehler <andreas.roehler <at> online.de>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sat, 06 Mar 2010 16:33:02 -0500
> However, think there is a bug though.  If Emacs is able to display the
> prompt delivered, it should adapt its behavior independently from the
> regexp already customized.

Emacs has no idea that the string it receives from the underlying
process is a prompt for a password.  All it knows is that the subprocess
sent some text to display to the user.  And then no more text comes
in; and then the user types something so it's sent to the subprocess;
... this is exactly the same interaction as for any other text than
a password.

Maybe in some cases, the subprocess sets up the tty in a particular way
while it's reading the password.  I don't know enough about ttys to know
if that could be used and if so how, but it might be worth looking into.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sat, 06 Mar 2010 21:49:02 GMT) Full text and rfc822 format available.

Message #22 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Roehler <andreas.roehler <at> online.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sat, 06 Mar 2010 22:50:30 +0100
Stefan Monnier wrote:
>> However, think there is a bug though.  If Emacs is able to display the
>> prompt delivered, it should adapt its behavior independently from the
>> regexp already customized.
> 
> Emacs has no idea that the string it receives from the underlying
> process is a prompt for a password. 

Hhm, the shell itself seems to know. So if the shell knows, Emacs questions the shell, it should be
possible collect info from there.

 All it knows is that the subprocess
> sent some text to display to the user.  And then no more text comes
> in; and then the user types something so it's sent to the subprocess;
> ... this is exactly the same interaction as for any other text than
> a password.
> 
> Maybe in some cases, the subprocess sets up the tty in a particular way
> while it's reading the password.  I don't know enough about ttys to know
> if that could be used and if so how, but it might be worth looking into.
> 
> 
>         Stefan
> 

Thanks,

would consider it useful, to leave the bug open for remembering.
As the OP reported, risks exist, which are avoidable IMO.

Andreas




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 13:45:02 GMT) Full text and rfc822 format available.

Message #25 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 14:39:46 +0100
Andreas Roehler <andreas.roehler <at> online.de> writes:

> Chong Yidong wrote:
>> Andreas Roehler <andreas.roehler <at> online.de> writes:
>> 
>>> emacs -q
>>> M-x shell
>>> /bin/su at shell prompt
>>>
>>> prompt for PW arrives, when PW putted in, its visible at the screen
>>>
>>> root-shell (bash) arrives
>>>
>>> M-x report-emacs-bug
>>>
>>> View lossage displays root-password, replaced for this report by
>>> MY-PW-SHOWN-HERE
>> 
>> I'm afraid I can't reproduce this.  One possibility is that you are
>> using a locale where the password prompt is given in a language that
>> comint-watch-for-password-prompt does not recognize.  This is a known
>> issue; customize comint-password-prompt-regexp to add the
>> locale-dependent password prompt(s) to the list of recognized prompts.
>> 
>
> Thanks, that helps here.
> However, think there is a bug though. If Emacs is able to display the prompt delivered,
> it should adapt its behavior independently from the regexp already customized.

As Chong said you must use a non--english/us locale.
I have the same problem here, my prompt is not "Password" but "Mot de
Passe", due to my french locale.
All the prompts for password (e.g su/sudo) in the emacs shell use a
cryptic regex.
Setting it is a pain, i always have undesired side effects trying to set
them. (shell and eshell).

For shell (don't work in eshell):
A workaround for "su" is creating an alias in bashrc:

alias su="LC_ALL=C su -l"

For sudo:
alias sudo="sudo -p Password: "

For eshell i didn't find good solution appart putting in my .emacs:

(setenv "LC_ALL" "C")

Work fine but may create other encoding problems in others places.

The best thing should be that all emacs shell don't obey to locale
setting for password prompt, i thing the word "password" in
international well known.
  
-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 14:41:01 GMT) Full text and rfc822 format available.

Message #28 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andreas Roehler <andreas.roehler <at> online.de>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 09:40:33 -0500
>> Emacs has no idea that the string it receives from the underlying
>> process is a prompt for a password. 
> Hhm, the shell itself seems to know.

No, the shell has no idea either.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 15:17:01 GMT) Full text and rfc822 format available.

Message #31 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 5664 <at> debbugs.gnu.org,
	thierry.volpiatto <at> gmail.com
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 16:18:46 +0100
Stefan Monnier wrote:
>>> Emacs has no idea that the string it receives from the underlying
>>> process is a prompt for a password. 
>> Hhm, the shell itself seems to know.
> 
> No, the shell has no idea either.
> 
> 
>         Stefan
> 
> 
> 
> 
> 

So let me put it that way:

If the shell grabs the pw-prompt from some place, set by `LC_ALL' or whatever,
emacs may pick up it right there.

Andreas




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 15:21:02 GMT) Full text and rfc822 format available.

Message #34 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 5664 <at> debbugs.gnu.org,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 16:22:36 +0100
Thierry Volpiatto wrote:
> Andreas Roehler <andreas.roehler <at> online.de> writes:
> 
>> Chong Yidong wrote:
>>> Andreas Roehler <andreas.roehler <at> online.de> writes:
>>>
>>>> emacs -q
>>>> M-x shell
>>>> /bin/su at shell prompt
>>>>
>>>> prompt for PW arrives, when PW putted in, its visible at the screen
>>>>
>>>> root-shell (bash) arrives
>>>>
>>>> M-x report-emacs-bug
>>>>
>>>> View lossage displays root-password, replaced for this report by
>>>> MY-PW-SHOWN-HERE
>>> I'm afraid I can't reproduce this.  One possibility is that you are
>>> using a locale where the password prompt is given in a language that
>>> comint-watch-for-password-prompt does not recognize.  This is a known
>>> issue; customize comint-password-prompt-regexp to add the
>>> locale-dependent password prompt(s) to the list of recognized prompts.
>>>
>> Thanks, that helps here.
>> However, think there is a bug though. If Emacs is able to display the prompt delivered,
>> it should adapt its behavior independently from the regexp already customized.
> 
> As Chong said you must use a non--english/us locale.
> I have the same problem here, my prompt is not "Password" but "Mot de
> Passe", due to my french locale.
> All the prompts for password (e.g su/sudo) in the emacs shell use a
> cryptic regex.
> Setting it is a pain, i always have undesired side effects trying to set
> them. (shell and eshell).
> 
> For shell (don't work in eshell):
> A workaround for "su" is creating an alias in bashrc:
> 
> alias su="LC_ALL=C su -l"
> 
> For sudo:
> alias sudo="sudo -p Password: "
> 
> For eshell i didn't find good solution appart putting in my .emacs:
> 
> (setenv "LC_ALL" "C")
> 
> Work fine but may create other encoding problems in others places.
> 
> The best thing should be that all emacs shell don't obey to locale
> setting for password prompt, i thing the word "password" in
> international well known.
>   

Hi, thanks,

as long it's not solved at the source of the matter, I'd prefere the last.
Better just one prompt than undergoing security-risks.

Andreas






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 15:47:02 GMT) Full text and rfc822 format available.

Message #37 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, thierry.volpiatto <at> gmail.com,
	Stefan Monnier <monnier <at> iro.umontreal.ca>, 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 16:45:48 +0100
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> If the shell grabs the pw-prompt from some place,

The shell does not grab anything, it just executes commands.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Sun, 07 Mar 2010 15:58:01 GMT) Full text and rfc822 format available.

Message #40 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 07 Mar 2010 16:52:24 +0100
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> Thierry Volpiatto wrote:
>> Andreas Roehler <andreas.roehler <at> online.de> writes:
>> 
>>> Chong Yidong wrote:
>>>> Andreas Roehler <andreas.roehler <at> online.de> writes:
>>>>
>>>>> emacs -q
>>>>> M-x shell
>>>>> /bin/su at shell prompt
>>>>>
>>>>> prompt for PW arrives, when PW putted in, its visible at the screen
>>>>>
>>>>> root-shell (bash) arrives
>>>>>
>>>>> M-x report-emacs-bug
>>>>>
>>>>> View lossage displays root-password, replaced for this report by
>>>>> MY-PW-SHOWN-HERE
>>>> I'm afraid I can't reproduce this.  One possibility is that you are
>>>> using a locale where the password prompt is given in a language that
>>>> comint-watch-for-password-prompt does not recognize.  This is a known
>>>> issue; customize comint-password-prompt-regexp to add the
>>>> locale-dependent password prompt(s) to the list of recognized prompts.
>>>>
>>> Thanks, that helps here.
>>> However, think there is a bug though. If Emacs is able to display the prompt delivered,
>>> it should adapt its behavior independently from the regexp already customized.
>> 
>> As Chong said you must use a non--english/us locale.
>> I have the same problem here, my prompt is not "Password" but "Mot de
>> Passe", due to my french locale.
>> All the prompts for password (e.g su/sudo) in the emacs shell use a
>> cryptic regex.
>> Setting it is a pain, i always have undesired side effects trying to set
>> them. (shell and eshell).
>> 
>> For shell (don't work in eshell):
>> A workaround for "su" is creating an alias in bashrc:
>> 
>> alias su="LC_ALL=C su -l"
>> 
>> For sudo:
>> alias sudo="sudo -p Password: "
>> 
>> For eshell i didn't find good solution appart putting in my .emacs:
>> 
>> (setenv "LC_ALL" "C")
>> 
>> Work fine but may create other encoding problems in others places.
>> 
>> The best thing should be that all emacs shell don't obey to locale
>> setting for password prompt, i thing the word "password" in
>> international well known.
>>   
>
> Hi, thanks,
>
> as long it's not solved at the source of the matter, I'd prefere the last.
> Better just one prompt than undergoing security-risks.
Agree.
Also, since eshell su/sudo have changed recently i am unable to use an
eshell alias for sudo (with -p option).

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Thu, 30 Jun 2011 23:02:01 GMT) Full text and rfc822 format available.

Message #43 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Fri, 01 Jul 2011 01:00:43 +0200
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> For eshell i didn't find good solution appart putting in my .emacs:
>
> (setenv "LC_ALL" "C")
>
> Work fine but may create other encoding problems in others places.
>
> The best thing should be that all emacs shell don't obey to locale
> setting for password prompt, i thing the word "password" in
> international well known.

You mean setting LC_ALL to C for all subshells?  I'm not sure that's
what most people would want.  But having the passwords show up in clear
text in the shell buffers is totally icky, too.  (I just fixed comint to
do the password recognition for the

[larsi <at> quimbies ~/src/emacs/trunk/lisp]$ ssh root <at> quimby
Password: 
Response: 

case just now, though.)

But for other locales: Perhaps Shell mode should have an interactive
function like `M-x shell-query-password', so that people can trigger the
non-echoing entry mode at will?  Or perhaps a keystroke to switch off
echoing, that would be ended when typing RET?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5664; Package emacs. (Fri, 01 Jul 2011 04:58:02 GMT) Full text and rfc822 format available.

Message #46 received at 5664 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 5664 <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Fri, 01 Jul 2011 06:56:56 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> For eshell i didn't find good solution appart putting in my .emacs:
>>
>> (setenv "LC_ALL" "C")
>>
>> Work fine but may create other encoding problems in others places.
>>
>> The best thing should be that all emacs shell don't obey to locale
>> setting for password prompt, i thing the word "password" in
>> international well known.
>
> You mean setting LC_ALL to C for all subshells?  I'm not sure that's
> what most people would want.  
This have been fixed long time ago by using an alias in eshell for
su/sudo. (don't use globally LC_ALL=C)

alias su LC_ALL=C *su -l
alias sudo *sudo -p Password: $*

> But having the passwords show up in clear
> text in the shell buffers is totally icky, too.  (I just fixed comint to
> do the password recognition for the
Be careful when modifying the prompt regexp of shell/eshell:
All go well in most cases, but can create bad bugs in other places like
python shell.
e.g in a python-shell:
A = raw_input("prompt: ")
Will ask you for password!

> [larsi <at> quimbies ~/src/emacs/trunk/lisp]$ ssh root <at> quimby
> Password: 
> Response: 
>
> case just now, though.)
>
> But for other locales: Perhaps Shell mode should have an interactive
> function like `M-x shell-query-password', so that people can trigger the
> non-echoing entry mode at will?  Or perhaps a keystroke to switch off
> echoing, that would be ended when typing RET?

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sun, 19 Jan 2014 13:32:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Roehler <andreas.roehler <at> online.de>:
bug acknowledged by developer. (Sun, 19 Jan 2014 13:32:02 GMT) Full text and rfc822 format available.

Message #51 received at 5664-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Andreas Roehler <andreas.roehler <at> online.de>, 5664-done <at> debbugs.gnu.org
Subject: Re: bug#5664: 23.1.92; view-lossage
Date: Sun, 19 Jan 2014 14:31:08 +0100
Chong Yidong <cyd <at> stupidchicken.com> writes:

> Andreas Roehler <andreas.roehler <at> online.de> writes:
>
>> emacs -q
>> M-x shell
>> /bin/su at shell prompt
>>
>> prompt for PW arrives, when PW putted in, its visible at the screen
>>
>> root-shell (bash) arrives
>>
>> M-x report-emacs-bug
>>
>> View lossage displays root-password, replaced for this report by
>> MY-PW-SHOWN-HERE
>
> I'm afraid I can't reproduce this.  One possibility is that you are
> using a locale where the password prompt is given in a language that
> comint-watch-for-password-prompt does not recognize.  This is a known
> issue; customize comint-password-prompt-regexp to add the
> locale-dependent password prompt(s) to the list of recognized prompts.

Due to bug#13124, Emacs knows now the password keyword for many
languages. There is a new variable `password-word-equivalents'.

In order to fix *this* bug, that variable is used in
`eshell-password-prompt-regexp'.

Closing the bug, but I'd appreciate if somebody with a localized
password prompt checks it.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Feb 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.