unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13124: 24.1; shell-mode does not hide sudo password prompts
@ 2012-12-08 13:27 Arne Babenhauserheide
  2012-12-08 19:24 ` Glenn Morris
  0 siblings, 1 reply; 25+ messages in thread
From: Arne Babenhauserheide @ 2012-12-08 13:27 UTC (permalink / raw)
  To: 13124

Dear Emacs Hackers,

I like shell-mode a lot and it mostly just works.

But I tend to use sudo quite a bit, and when I am promptd for my
password, shell-mode echoes it verbatim to the buffer instead of hiding
it as start or similar.

eshell on the other hand gets this right (but does some other magic in
the background).

So would it be possible to make shell-mode also hide passwords by default
(so I can simply tell other people that they can use it)?

eshell switches to the minibuffer on password-entry (but seems to use
tramp for that), but anyway to hide the password would be nice (ideally
a way which works with all programs which hide the password in bash).

Best wishes,
Arne


In GNU Emacs 24.1.1 (x86_64-pc-linux-gnu)
 of 2012-09-08 on kaverne
Configured using:
 `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu'
 '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man'
 '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
 '--localstatedir=/var/lib' '--libdir=/usr/lib64'
 '--disable-dependency-tracking' '--program-suffix=-emacs-24'
 '--infodir=/usr/share/info/emacs-24'
 '--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64'
 '--with-gameuser=games' '--without-compress-info'
 '--disable-maintainer-mode' '--without-hesiod' '--without-kerberos'
 '--without-kerberos5' '--with-gpm' '--without-dbus' '--without-gnutls'
 '--without-xml2' '--without-selinux' '--without-wide-int'
 '--without-sound' '--without-x' '--without-ns'
 'GENTOO_PACKAGE=app-editors/emacs-24.1-r1'
 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu'
 'CFLAGS=-O2 -pipe -march=native' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'
 'CPPFLAGS=''

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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Major mode: w3m

Minor modes in effect:
  gpm-mouse-mode: t
  kde-default-keys-minor-mode: t
  global-ethan-wspace-mode: t
  real-global-auto-complete-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  shell-dirtrack-mode: t
  global-rudel-minor-mode: t
  savehist-mode: t
  show-paren-mode: t
  display-time-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x C-f 
C-g C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
ESC x r e p o r t TAB b TAB DEL DEL DEL TAB TAB b TAB 
- q TAB RET s h e l l SPC p a s s w o r t DEL d RET 
ESC [ B ESC [ B ESC [ B ESC [ B RET ESC [ C RET ESC 
[ D ESC [ D ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C 
ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ESC 
[ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C 
ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C RET 
ESC x ESC [ A ESC x ESC [ B ESC [ A C-e ESC DEL ESC 
DEL ESC DEL DEL RET

Recent messages:
History item: 4
History item: 5
History item: 6
No completions of git://dev.laptop.org/olpc-kernel
No completions of ol [2 times]
Quit [2 times]
Making completion list...
Contacting host: debbugs.gnu.org:80
Reporting new bug! [2 times]
completing-read-default: Command attempted to use minibuffer while in minibuffer

Load-path shadows:
~/.emacs.d/libs/bbdb-vcard/vcard hides ~/.emacs.d/libs/vcard
/usr/share/emacs/site-lisp/lua-mode/lua-mode hides /usr/share/emacs/site-lisp/monotone/lua-mode
/usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/24.1/lisp/hex-util
/usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/24.1/lisp/md4
/usr/share/emacs/site-lisp/remember/remember hides /usr/share/emacs/24.1/lisp/textmodes/remember
/usr/share/emacs/site-lisp/org-mode/ob-emacs-lisp hides /usr/share/emacs/24.1/lisp/org/ob-emacs-lisp
/usr/share/emacs/site-lisp/org-mode/org-vm hides /usr/share/emacs/24.1/lisp/org/org-vm
/usr/share/emacs/site-lisp/org-mode/org-footnote hides /usr/share/emacs/24.1/lisp/org/org-footnote
/usr/share/emacs/site-lisp/org-mode/org-compat hides /usr/share/emacs/24.1/lisp/org/org-compat
/usr/share/emacs/site-lisp/org-mode/org-remember hides /usr/share/emacs/24.1/lisp/org/org-remember
/usr/share/emacs/site-lisp/org-mode/ob-org hides /usr/share/emacs/24.1/lisp/org/ob-org
/usr/share/emacs/site-lisp/org-mode/org-irc hides /usr/share/emacs/24.1/lisp/org/org-irc
/usr/share/emacs/site-lisp/org-mode/ob-latex hides /usr/share/emacs/24.1/lisp/org/ob-latex
/usr/share/emacs/site-lisp/org-mode/org-clock hides /usr/share/emacs/24.1/lisp/org/org-clock
/usr/share/emacs/site-lisp/org-mode/org-habit hides /usr/share/emacs/24.1/lisp/org/org-habit
/usr/share/emacs/site-lisp/org-mode/org-mac-message hides /usr/share/emacs/24.1/lisp/org/org-mac-message
/usr/share/emacs/site-lisp/org-mode/ob-octave hides /usr/share/emacs/24.1/lisp/org/ob-octave
/usr/share/emacs/site-lisp/org-mode/ob-awk hides /usr/share/emacs/24.1/lisp/org/ob-awk
/usr/share/emacs/site-lisp/org-mode/org-id hides /usr/share/emacs/24.1/lisp/org/org-id
/usr/share/emacs/site-lisp/org-mode/ob-C hides /usr/share/emacs/24.1/lisp/org/ob-C
/usr/share/emacs/site-lisp/org-mode/ob-css hides /usr/share/emacs/24.1/lisp/org/ob-css
/usr/share/emacs/site-lisp/org-mode/org-plot hides /usr/share/emacs/24.1/lisp/org/org-plot
/usr/share/emacs/site-lisp/org-mode/ob-ocaml hides /usr/share/emacs/24.1/lisp/org/ob-ocaml
/usr/share/emacs/site-lisp/org-mode/ob-scheme hides /usr/share/emacs/24.1/lisp/org/ob-scheme
/usr/share/emacs/site-lisp/org-mode/org-faces hides /usr/share/emacs/24.1/lisp/org/org-faces
/usr/share/emacs/site-lisp/org-mode/org-jsinfo hides /usr/share/emacs/24.1/lisp/org/org-jsinfo
/usr/share/emacs/site-lisp/org-mode/org-gnus hides /usr/share/emacs/24.1/lisp/org/org-gnus
/usr/share/emacs/site-lisp/org-mode/org-special-blocks hides /usr/share/emacs/24.1/lisp/org/org-special-blocks
/usr/share/emacs/site-lisp/org-mode/org-docview hides /usr/share/emacs/24.1/lisp/org/org-docview
/usr/share/emacs/site-lisp/org-mode/org-html hides /usr/share/emacs/24.1/lisp/org/org-html
/usr/share/emacs/site-lisp/org-mode/ob-haskell hides /usr/share/emacs/24.1/lisp/org/ob-haskell
/usr/share/emacs/site-lisp/org-mode/org-list hides /usr/share/emacs/24.1/lisp/org/org-list
/usr/share/emacs/site-lisp/org-mode/ob-js hides /usr/share/emacs/24.1/lisp/org/ob-js
/usr/share/emacs/site-lisp/org-mode/org-info hides /usr/share/emacs/24.1/lisp/org/org-info
/usr/share/emacs/site-lisp/org-mode/ob-comint hides /usr/share/emacs/24.1/lisp/org/ob-comint
/usr/share/emacs/site-lisp/org-mode/ob-gnuplot hides /usr/share/emacs/24.1/lisp/org/ob-gnuplot
/usr/share/emacs/site-lisp/org-mode/org-latex hides /usr/share/emacs/24.1/lisp/org/org-latex
/usr/share/emacs/site-lisp/org-mode/org-freemind hides /usr/share/emacs/24.1/lisp/org/org-freemind
/usr/share/emacs/site-lisp/org-mode/org-attach hides /usr/share/emacs/24.1/lisp/org/org-attach
/usr/share/emacs/site-lisp/org-mode/org-icalendar hides /usr/share/emacs/24.1/lisp/org/org-icalendar
/usr/share/emacs/site-lisp/org-mode/org-ascii hides /usr/share/emacs/24.1/lisp/org/org-ascii
/usr/share/emacs/site-lisp/org-mode/org-rmail hides /usr/share/emacs/24.1/lisp/org/org-rmail
/usr/share/emacs/site-lisp/org-mode/org-timer hides /usr/share/emacs/24.1/lisp/org/org-timer
/usr/share/emacs/site-lisp/org-mode/ob-matlab hides /usr/share/emacs/24.1/lisp/org/ob-matlab
/usr/share/emacs/site-lisp/org-mode/ob-R hides /usr/share/emacs/24.1/lisp/org/ob-R
/usr/share/emacs/site-lisp/org-mode/org-ctags hides /usr/share/emacs/24.1/lisp/org/org-ctags
/usr/share/emacs/site-lisp/org-mode/ob-lisp hides /usr/share/emacs/24.1/lisp/org/ob-lisp
/usr/share/emacs/site-lisp/org-mode/org-table hides /usr/share/emacs/24.1/lisp/org/org-table
/usr/share/emacs/site-lisp/org-mode/ob-lilypond hides /usr/share/emacs/24.1/lisp/org/ob-lilypond
/usr/share/emacs/site-lisp/org-mode/org-indent hides /usr/share/emacs/24.1/lisp/org/org-indent
/usr/share/emacs/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/24.1/lisp/org/org-inlinetask
/usr/share/emacs/site-lisp/org-mode/org-xoxo hides /usr/share/emacs/24.1/lisp/org/org-xoxo
/usr/share/emacs/site-lisp/org-mode/ob-plantuml hides /usr/share/emacs/24.1/lisp/org/ob-plantuml
/usr/share/emacs/site-lisp/org-mode/ob-dot hides /usr/share/emacs/24.1/lisp/org/ob-dot
/usr/share/emacs/site-lisp/org-mode/ob-ref hides /usr/share/emacs/24.1/lisp/org/ob-ref
/usr/share/emacs/site-lisp/org-mode/org-exp hides /usr/share/emacs/24.1/lisp/org/org-exp
/usr/share/emacs/site-lisp/org-mode/org-publish hides /usr/share/emacs/24.1/lisp/org/org-publish
/usr/share/emacs/site-lisp/org-mode/org-crypt hides /usr/share/emacs/24.1/lisp/org/org-crypt
/usr/share/emacs/site-lisp/org-mode/org-taskjuggler hides /usr/share/emacs/24.1/lisp/org/org-taskjuggler
/usr/share/emacs/site-lisp/org-mode/org-pcomplete hides /usr/share/emacs/24.1/lisp/org/org-pcomplete
/usr/share/emacs/site-lisp/org-mode/ob-sass hides /usr/share/emacs/24.1/lisp/org/ob-sass
/usr/share/emacs/site-lisp/org-mode/org-protocol hides /usr/share/emacs/24.1/lisp/org/org-protocol
/usr/share/emacs/site-lisp/org-mode/org-mhe hides /usr/share/emacs/24.1/lisp/org/org-mhe
/usr/share/emacs/site-lisp/org-mode/ob-perl hides /usr/share/emacs/24.1/lisp/org/ob-perl
/usr/share/emacs/site-lisp/org-mode/ob-sqlite hides /usr/share/emacs/24.1/lisp/org/ob-sqlite
/usr/share/emacs/site-lisp/org-mode/org-install hides /usr/share/emacs/24.1/lisp/org/org-install
/usr/share/emacs/site-lisp/org-mode/ob-eval hides /usr/share/emacs/24.1/lisp/org/ob-eval
/usr/share/emacs/site-lisp/org-mode/org-src hides /usr/share/emacs/24.1/lisp/org/org-src
/usr/share/emacs/site-lisp/org-mode/ob-java hides /usr/share/emacs/24.1/lisp/org/ob-java
/usr/share/emacs/site-lisp/org-mode/ob-asymptote hides /usr/share/emacs/24.1/lisp/org/ob-asymptote
/usr/share/emacs/site-lisp/org-mode/ob hides /usr/share/emacs/24.1/lisp/org/ob
/usr/share/emacs/site-lisp/org-mode/org-macs hides /usr/share/emacs/24.1/lisp/org/org-macs
/usr/share/emacs/site-lisp/org-mode/ob-sh hides /usr/share/emacs/24.1/lisp/org/ob-sh
/usr/share/emacs/site-lisp/org-mode/ob-ruby hides /usr/share/emacs/24.1/lisp/org/ob-ruby
/usr/share/emacs/site-lisp/org-mode/ob-keys hides /usr/share/emacs/24.1/lisp/org/ob-keys
/usr/share/emacs/site-lisp/org-mode/org-exp-blocks hides /usr/share/emacs/24.1/lisp/org/org-exp-blocks
/usr/share/emacs/site-lisp/org-mode/org-capture hides /usr/share/emacs/24.1/lisp/org/org-capture
/usr/share/emacs/site-lisp/org-mode/org-feed hides /usr/share/emacs/24.1/lisp/org/org-feed
/usr/share/emacs/site-lisp/org-mode/org-agenda hides /usr/share/emacs/24.1/lisp/org/org-agenda
/usr/share/emacs/site-lisp/org-mode/org-mobile hides /usr/share/emacs/24.1/lisp/org/org-mobile
/usr/share/emacs/site-lisp/org-mode/org-docbook hides /usr/share/emacs/24.1/lisp/org/org-docbook
/usr/share/emacs/site-lisp/org-mode/org-entities hides /usr/share/emacs/24.1/lisp/org/org-entities
/usr/share/emacs/site-lisp/org-mode/org-wl hides /usr/share/emacs/24.1/lisp/org/org-wl
/usr/share/emacs/site-lisp/org-mode/org-mew hides /usr/share/emacs/24.1/lisp/org/org-mew
/usr/share/emacs/site-lisp/org-mode/org-colview hides /usr/share/emacs/24.1/lisp/org/org-colview
/usr/share/emacs/site-lisp/org-mode/ob-clojure hides /usr/share/emacs/24.1/lisp/org/ob-clojure
/usr/share/emacs/site-lisp/org-mode/ob-tangle hides /usr/share/emacs/24.1/lisp/org/ob-tangle
/usr/share/emacs/site-lisp/org-mode/org-datetree hides /usr/share/emacs/24.1/lisp/org/org-datetree
/usr/share/emacs/site-lisp/org-mode/org-beamer hides /usr/share/emacs/24.1/lisp/org/org-beamer
/usr/share/emacs/site-lisp/org-mode/ob-lob hides /usr/share/emacs/24.1/lisp/org/ob-lob
/usr/share/emacs/site-lisp/org-mode/org-w3m hides /usr/share/emacs/24.1/lisp/org/org-w3m
/usr/share/emacs/site-lisp/org-mode/org hides /usr/share/emacs/24.1/lisp/org/org
/usr/share/emacs/site-lisp/org-mode/ob-ditaa hides /usr/share/emacs/24.1/lisp/org/ob-ditaa
/usr/share/emacs/site-lisp/org-mode/ob-screen hides /usr/share/emacs/24.1/lisp/org/ob-screen
/usr/share/emacs/site-lisp/org-mode/ob-python hides /usr/share/emacs/24.1/lisp/org/ob-python
/usr/share/emacs/site-lisp/org-mode/ob-table hides /usr/share/emacs/24.1/lisp/org/ob-table
/usr/share/emacs/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/24.1/lisp/org/org-bbdb
/usr/share/emacs/site-lisp/org-mode/ob-mscgen hides /usr/share/emacs/24.1/lisp/org/ob-mscgen
/usr/share/emacs/site-lisp/org-mode/org-mouse hides /usr/share/emacs/24.1/lisp/org/org-mouse
/usr/share/emacs/site-lisp/org-mode/ob-sql hides /usr/share/emacs/24.1/lisp/org/ob-sql
/usr/share/emacs/site-lisp/org-mode/org-archive hides /usr/share/emacs/24.1/lisp/org/org-archive
/usr/share/emacs/site-lisp/org-mode/ob-calc hides /usr/share/emacs/24.1/lisp/org/ob-calc
/usr/share/emacs/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/24.1/lisp/org/org-bibtex
/usr/share/emacs/site-lisp/org-mode/ob-exp hides /usr/share/emacs/24.1/lisp/org/ob-exp
/usr/share/emacs/site-lisp/org-mode/ob-ledger hides /usr/share/emacs/24.1/lisp/org/ob-ledger
/usr/share/emacs/site-lisp/org-mode/org-mks hides /usr/share/emacs/24.1/lisp/org/org-mks
/usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.1/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.1/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/24.1/lisp/net/sasl
/usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/24.1/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/24.1/lisp/net/hmac-def
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.1/lisp/net/sasl-ntlm
/usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.1/lisp/net/sasl-digest
~/.emacs.d/libs/wanderlust/elmo/utf7 hides /usr/share/emacs/24.1/lisp/gnus/utf7
/usr/share/emacs/site-lisp/semi/smime hides /usr/share/emacs/24.1/lisp/gnus/smime
~/.emacs.d/private/gnus hides /usr/share/emacs/24.1/lisp/gnus/gnus
/usr/share/emacs/site-lisp/emms/tq hides /usr/share/emacs/24.1/lisp/emacs-lisp/tq
/usr/share/emacs/site-lisp/semi/pgg-gpg hides /usr/share/emacs/24.1/lisp/obsolete/pgg-gpg
/usr/share/emacs/site-lisp/semi/pgg-pgp hides /usr/share/emacs/24.1/lisp/obsolete/pgg-pgp
/usr/share/emacs/site-lisp/semi/pgg-parse hides /usr/share/emacs/24.1/lisp/obsolete/pgg-parse
/usr/share/emacs/site-lisp/semi/pgg-def hides /usr/share/emacs/24.1/lisp/obsolete/pgg-def
/usr/share/emacs/site-lisp/semi/pgg-pgp5 hides /usr/share/emacs/24.1/lisp/obsolete/pgg-pgp5
/usr/share/emacs/site-lisp/semi/pgg hides /usr/share/emacs/24.1/lisp/obsolete/pgg
/usr/share/emacs/24.1/lisp/mail/rfc2368 hides /home/arne/.emacs.d/libs/wanderlust/utils/rfc2368

Features:
(shadow sort mail-extr network-stream starttls url-cache emacsbug
message idna mml mml-sec mm-decode mm-bodies mm-encode gmm-utils
mailheader help-mode view ffap pcmpl-unix em-unix em-term term
disp-table ehelp electric em-script em-prompt em-ls em-hist em-pred
em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias esh-var
esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util w3m-form ind-util w3m-bookmark w3m-tabmenu
w3m-session crm thingatpt bbdb-gui wl-score elmo-internal mule-util
mel-q-ccl modb-standard elmo-maildir wl-mime mime-play filename
mime-edit pgg-parse pccl pccl-20 pgg-def signature t-mouse server
activate-babenv reftex-parse reftex-vcr reftex-dcr reftex-auc reftex
reftex-vars outline-magic ispell org-wl org-w3m org-vm org-rmail org-mhe
org-mew org-irc org-jsinfo org-infojs org-html format-spec org-info
org-gnus org-docview org-bibtex org-bbdb font-lock-tm5rc generic
activate-wanderlust wl-demo wl-draft eword-encode wl-template elmo-net
elmo-cache elmo-map elmo-dop wl-news wl-address wl-thread wl-action
wl-summary wl-refile wl-message elmo-mime mmelmo-buffer mmelmo-imap
mime-view mime-conf calist mmimap mime-parse mmbuffer mmgeneric
wl-highlight elmo-multi wl-folder wl wl-e21 wl-util elmo-flag
elmo-localdir wl-vars wl-version elmo elmo-signal elmo-msgdb modb
modb-generic modb-entity mime elmo-util emu invisible inv-23 poem
poem-e20 poem-e20_3 utf7 eword-decode mel mime-def std11 mcharset mcs-20
mcs-e20 pces pces-e20 pces-20 broken pcustom elmo-date elmo-vars
elmo-version luna private-wanderlust-kaverne bbdb-wl bbdb-hooks
mailcrypt rfc822 activate-private-data private-basic private-wanderlust
smtpmail sendmail mail-utils w3m-search w3m browse-url doc-view
jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl
w3m-favicon w3m-image w3m-proc w3m-util kanban fortran-tools
activate-python pydoc-info info-look info python-magic python-21 python
stenochords key-chord activate-kde-default-keybindings activate-darkroom
wc activate-identica identica-mode url-http tls url-auth mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums url-gw url url-proxy url-privacy
url-expand url-methods url-history url-cookie mailcap longlines
parse-time xml epa-file epa epg epg-config activate-german-spelling
activate-ethan-wspace ethan-wspace popup-kill-ring pos-tip
activate-auto-complete auto-complete-config auto-complete popup
activate-markdown activate-latex-ide flymake compile tool-bar ebib
bibtex fic-ext-mode xub-mode org-location-google-maps google-maps
google-maps-static derived url-util url-parse auth-source gnus-util
password-cache url-vars mm-util mail-prsvr google-maps-geocode
google-maps-base json org-latex org-export-latex org-beamer org-exp
ob-exp org-exp-blocks org-agenda footnote ob-sh shell ob-python
activate-emms emms-cache emms-info-ogginfo emms-info-mp3info emms-info
later-do emms-playlist-mode emms-player-mplayer emms-player-simple
emms-source-playlist emms-source-file dired emms-setup emms emms-compat
edmacro kmacro control-lock htmlize rudel-mode rudel-display rudel
rudel-icons rudel-interactive rudel-compat rudel-hooks rudel-operators
rudel-overlay rudel-operations rudel-session-initiation rudel-util
rudel-errors eieio-speedbar speedbar sb-image ezimage dframe assoc
eieio-custom wid-edit eieio-base rudel-loaddefs rudel-backend eieio
goto-chg journal activate-quick-note remember-bbdb remember ob-R org
byte-opt warnings bytecomp byte-compile cconv macroexp ob-emacs-lisp
ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys
ob ob-eval org-pcomplete pcomplete comint ansi-color ring org-list
org-faces org-compat org-entities org-macs noutline outline easy-mmode
cal-menu calendar cal-loaddefs bbdb-vcard bbdb-com mailabbrev cl vcard
allout savehist ido cups easymenu printing ps-print ps-def lpr
activate-base vc-hg bookmark pp fringe saveplace time-date uniquify
advice help-fns advice-preload paren time image cus-start cus-load
site-gentoo w3m-load mime-setup mail-mime-setup alist semi-setup
path-util poe pym static apel-ver product semi-def org-install emms-auto
bbdb-autoloads bbdb regexp-opt timezone tex-site auto-loads ediff-hook
vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow
timer select 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 minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-08 13:27 bug#13124: 24.1; shell-mode does not hide sudo password prompts Arne Babenhauserheide
@ 2012-12-08 19:24 ` Glenn Morris
  2012-12-10 16:21   ` Arne Babenhauserheide
  0 siblings, 1 reply; 25+ messages in thread
From: Glenn Morris @ 2012-12-08 19:24 UTC (permalink / raw)
  To: arne_bab; +Cc: 13124

Arne Babenhauserheide wrote:

> I like shell-mode a lot and it mostly just works.
>
> But I tend to use sudo quite a bit, and when I am promptd for my
> password, shell-mode echoes it verbatim to the buffer instead of hiding
> it as start or similar.

It's supposed to be hidden, and it is for me in `emacs -Q -f shell' in 24.1.
Please tell us exactly what your sudo prompt looks like.
Mine is:

    [sudo] password for gm: 





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-08 19:24 ` Glenn Morris
@ 2012-12-10 16:21   ` Arne Babenhauserheide
  2012-12-10 17:00     ` Glenn Morris
  0 siblings, 1 reply; 25+ messages in thread
From: Arne Babenhauserheide @ 2012-12-10 16:21 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13124

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

Am Samstag, 8. Dezember 2012, 14:24:30 schrieb Glenn Morris:
> > But I tend to use sudo quite a bit, and when I am promptd for my
> > password, shell-mode echoes it verbatim to the buffer instead of hiding
> > it as start or similar.
> 
> It's supposed to be hidden, and it is for me in `emacs -Q -f shell' in 24.1.
> Please tell us exactly what your sudo prompt looks like.
> Mine is:
> 
>     [sudo] password for gm:

Mine looks like this:

arne@fluss /mnt/eis/backups $ sudo test
Passwort: test

(using emacs -Q -f shell)

GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-02 on 
fluss

Best wishes,
Arne

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-10 16:21   ` Arne Babenhauserheide
@ 2012-12-10 17:00     ` Glenn Morris
  2012-12-11  0:12       ` Arne Babenhauserheide
  0 siblings, 1 reply; 25+ messages in thread
From: Glenn Morris @ 2012-12-10 17:00 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 13124

Arne Babenhauserheide wrote:

> Mine looks like this:
>
> arne@fluss /mnt/eis/backups $ sudo test
> Passwort: test

I'm afraid Emacs does not not understand the word "password" in every
language out-of-the-box, so you'll have to add an entry to
comint-password-prompt-regexp that matches "Passwort". Eg

(setq comint-password-prompt-regexp
  (concat
   "\\(^ *\\|"
   (regexp-opt
    '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
      "Old" "old" "New" "new" "'s" "login"
      "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
   " +\\)"
   (regexp-opt
    '("password" "Password" "passphrase" "Passphrase"
      "pass phrase" "Pass phrase" "Response" "Passwort"))
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\|
  (again)\\)?\
\\(?: for [^:]+\\)?:\\s *\\'"))





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-10 17:00     ` Glenn Morris
@ 2012-12-11  0:12       ` Arne Babenhauserheide
  2012-12-11  4:55         ` Glenn Morris
  2012-12-18 19:54         ` Stefan Monnier
  0 siblings, 2 replies; 25+ messages in thread
From: Arne Babenhauserheide @ 2012-12-11  0:12 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13124

[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]

Am Montag, 10. Dezember 2012, 12:00:59 schrieb Glenn Morris:
> Arne Babenhauserheide wrote:
> > Mine looks like this:
> > 
> > arne@fluss /mnt/eis/backups $ sudo test
> > Passwort: test
> 
> I'm afraid Emacs does not not understand the word "password" in every
> language out-of-the-box, so you'll have to add an entry to
> comint-password-prompt-regexp that matches "Passwort". Eg

Ah, ok.

Would it be possible to add the values for all languages, depending on the 
LC_ALL or LANG-environment variable?

The sudo source should already provide that… 
…
It uses either the prompt from its own po-files¹, or if that is not defined 
the default PAM prompt².

¹: http://www.sudo.ws/repos/sudo/file/89153025a2ae/plugins/sudoers/po
²: https://fedorahosted.org/linux-pam/browser/po

In short:

PAM-delivered: 

pt_BR "Senha:"
zu "Iphasiwedi: "
km "ពាក្យសម្ងាត់ ៖ "
ar "كلمة السر: "
da "Adgangskode: "
he "ססמה: "
ms ""
nl "Wachtwoord: "
hu "Jelszó: "
gu "પાસવર્ડ: "
fr "Mot de passe : "
bn_IN "পাসওয়ার্ড: "
ko "암호:"
or "ପ୍ରବେଶ ସଙ୍କେତ: "
es "Contraseña: "
ml "അടയാളവാക്ക്: "
sv "Lösenord: "
ja "パスワード:"
kn "ಗುಪ್ತಪದ: "
de "Passwort: "
kk "Пароль:"
tr "Parola: "
pl "Hasło: "
sr@latin "Lozinka: "
te "సంకేతపదము: "
sk "Heslo: "
ta "கடவுச்சொல்:"
uk "Пароль: "
zh_TW "密碼:"
vi "Mật khẩu : "
ru "Пароль: "
mr "गुप्तशब्द: "
pa "ਪਾਸਵਰਡ: "
pt "Senha: "
cs "Heslo: "
hi "शब्दकूट: "
sr "Лозинка: "
si "රහස්පදය: "
fi "Salasana: "
ca "Contrasenya: "
as "গুপ্তশব্দ:"
nb "Passord: "
zh_CN "密码:"

from sudo itself:

da "Adgangskode: "
da "Adgangskode:"
eu "Pasahitza: "
eu "Pasahitza:"
sv "Lösenord: "
sv "Lösenord:"
ja "パスワード: "
ja "パスワード:"
pl "Hasło: "
pl "Hasło:"
eo "Pasvorto: "
eo "Pasvorto:"
uk "Пароль: "
uk "Пароль:"
vi "Mật khẩu: "
vi "Mật khẩu:"
lt "Slaptažodis: "
lt "Slaptažodis:"
hr "Lozinka: "
hr "Lozinka:"
sl "Geslo: "
sl "Geslo:"
fi "Salasana: "
fi "Salasana:"
zh_CN "密码:"
zh_CN "密码:"


(in the source dir containing the po-dir, do `grep "Password:" . -R -A1 | sed 
s/.*Password.*// | grep po-msgst | sed "s/\.\/po\///" | sed "s/\.po-
msgstr//"`)

These are the ones which should be accepted, depending on the locale.

(I provided the command because I do not know if the unicode will survive)

Could you include these?

Best wishes,
Arne
--
singing a part of the history of free software: 

- http://infinite-hands.draketo.de


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-11  0:12       ` Arne Babenhauserheide
@ 2012-12-11  4:55         ` Glenn Morris
  2012-12-11 13:42           ` Arne Babenhauserheide
  2012-12-18 19:54         ` Stefan Monnier
  1 sibling, 1 reply; 25+ messages in thread
From: Glenn Morris @ 2012-12-11  4:55 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 13124

Arne Babenhauserheide wrote:

> Would it be possible to add the values for all languages, depending on the 
> LC_ALL or LANG-environment variable?

Possible (to some extent), but I'm not sure if it is worth
it/appropriate.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-11  4:55         ` Glenn Morris
@ 2012-12-11 13:42           ` Arne Babenhauserheide
  2012-12-13 14:14             ` Kenichi Handa
  0 siblings, 1 reply; 25+ messages in thread
From: Arne Babenhauserheide @ 2012-12-11 13:42 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13124

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

Am Montag, 10. Dezember 2012, 23:55:11 schrieb Glenn Morris:
> > Would it be possible to add the values for all languages, depending on
> > the 
> > LC_ALL or LANG-environment variable?
> 
> Possible (to some extent), but I'm not sure if it is worth
> it/appropriate.

I installed emacs for a collegue and the visible password is the major reason 
why he switches to the quite inconvenient term/ansi-term mode instead of 
shell.

So I think it is very relevant: It’s a matter of good defaults to never show 
the Password your user types. Especially not (quasi-)root passwords.

Best wishes,
Arne

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-11 13:42           ` Arne Babenhauserheide
@ 2012-12-13 14:14             ` Kenichi Handa
  2012-12-13 16:14               ` Arne Babenhauserheide
  0 siblings, 1 reply; 25+ messages in thread
From: Kenichi Handa @ 2012-12-13 14:14 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 13124

In article <2937464.OIdV3OoAVt@fluss>, Arne Babenhauserheide <arne_bab@web.de> writes:

> I installed emacs for a collegue and the visible password is the major reason 
> why he switches to the quite inconvenient term/ansi-term mode instead of 
> shell.

> So I think it is very relevant: It’s a matter of good defaults to never show 
> the Password your user types. Especially not (quasi-)root passwords.

It seems to be difficult to setup
comint-password-prompt-regexp for all variations of prompts
for password.  How about using this kind of code (incomplete)?

(defun shell-enter-password ()
  (interactive)
  (let* ((inhibit-field-text-motion t)
	 (prompt (buffer-substring (line-beginning-position) (point))))
    (if (and (not (string-match comint-password-prompt-regexp prompt))
	     (y-or-n-p (format "Remember \"%s\" as a password prompt for the future session? " prompt)))
	;; Insert a proper code to add PROMPT to comint-password-prompt-regexp
	;; and save it in .emacs.
	nil)
    (send-invisible prompt)))

(define-key shell-mode-map "\C-cp" 'shell-enter-password)

One can type C-c p when the shell buffer displays a prompt
for password without letting user enter a password in the
minibuffer.

---
Kenichi Handa
handa@gnu.org





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-13 14:14             ` Kenichi Handa
@ 2012-12-13 16:14               ` Arne Babenhauserheide
  0 siblings, 0 replies; 25+ messages in thread
From: Arne Babenhauserheide @ 2012-12-13 16:14 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13124

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

Am Donnerstag, 13. Dezember 2012, 23:14:19 schrieb Kenichi Handa:
> In article <2937464.OIdV3OoAVt@fluss>, Arne Babenhauserheide 
<arne_bab@web.de> writes:
> > I installed emacs for a collegue and the visible password is the major
> > reason why he switches to the quite inconvenient term/ansi-term mode
> > instead of shell.
> > 
> > So I think it is very relevant: It’s a matter of good defaults to never
> > show the Password your user types. Especially not (quasi-)root passwords.

> It seems to be difficult to setup
> comint-password-prompt-regexp for all variations of prompts
> for password.  How about using this kind of code (incomplete)?
> One can type C-c p when the shell buffer displays a prompt
> for password without letting user enter a password in the
> minibuffer.

That does not feel perfect, but it is better than the current situation, I 
think. I would prefer the shell to recognice the language setting and use that 
to select additional password-request matching.

Best wishes,
Arne
--
A man in the streets faces a knife.
Two policemen are there it once. They raise a sign:

    “Illegal Scene! Noone may watch this!”

The man gets robbed and stabbed and bleeds to death.
The police had to hold the sign.

…Welcome to Europe, citizen. Censorship is beautiful.

   ( http://draketo.de/stichwort/censorship )



[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-11  0:12       ` Arne Babenhauserheide
  2012-12-11  4:55         ` Glenn Morris
@ 2012-12-18 19:54         ` Stefan Monnier
  2012-12-21  5:47           ` Chong Yidong
  1 sibling, 1 reply; 25+ messages in thread
From: Stefan Monnier @ 2012-12-18 19:54 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 13124

> Would it be possible to add the values for all languages, depending on the 
> LC_ALL or LANG-environment variable?

We could, yes.  But I don't want to maintain a list of "password" words,
so this should be fully or at least mostly automatic.
Does someone have a patch to do that?


        Stefan





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-18 19:54         ` Stefan Monnier
@ 2012-12-21  5:47           ` Chong Yidong
  2012-12-21 14:03             ` Stefan Monnier
  0 siblings, 1 reply; 25+ messages in thread
From: Chong Yidong @ 2012-12-21  5:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13124, Arne Babenhauserheide

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Would it be possible to add the values for all languages, depending on the 
>> LC_ALL or LANG-environment variable?
>
> We could, yes.  But I don't want to maintain a list of "password"
> words, so this should be fully or at least mostly automatic.  Does
> someone have a patch to do that?

How does one go about retrieving this information in a
platform-independent way?  In the absence of a plausible method, I think
we should just use that hardcoded list of "password" words, and move on.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-21  5:47           ` Chong Yidong
@ 2012-12-21 14:03             ` Stefan Monnier
  2012-12-21 14:05               ` Chong Yidong
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Monnier @ 2012-12-21 14:03 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13124, Arne Babenhauserheide

> How does one go about retrieving this information in a
> platform-independent way?

We could use various ad-hoc hacks for the various known cases, as
a "best effort".


        Stefan





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-21 14:03             ` Stefan Monnier
@ 2012-12-21 14:05               ` Chong Yidong
  2012-12-21 14:19                 ` Michael Albinus
  0 siblings, 1 reply; 25+ messages in thread
From: Chong Yidong @ 2012-12-21 14:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13124, Arne Babenhauserheide

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> How does one go about retrieving this information in a
>> platform-independent way?
>
> We could use various ad-hoc hacks for the various known cases, as
> a "best effort".

How is that different from having an ad-hoc list of "password" words,
other than being more difficult to implement?





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-21 14:05               ` Chong Yidong
@ 2012-12-21 14:19                 ` Michael Albinus
  2012-12-29  7:38                   ` Chong Yidong
  0 siblings, 1 reply; 25+ messages in thread
From: Michael Albinus @ 2012-12-21 14:19 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13124, Arne Babenhauserheide

Chong Yidong <cyd@gnu.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> How does one go about retrieving this information in a
>>> platform-independent way?
>>
>> We could use various ad-hoc hacks for the various known cases, as
>> a "best effort".
>
> How is that different from having an ad-hoc list of "password" words,
> other than being more difficult to implement?

Other packages could profit from a predefined list of "password" words
as well. Tramp comes to my mind ...

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-21 14:19                 ` Michael Albinus
@ 2012-12-29  7:38                   ` Chong Yidong
  2012-12-29  8:39                     ` Andreas Schwab
                                       ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Chong Yidong @ 2012-12-29  7:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13124, Arne Babenhauserheide

Michael Albinus <michael.albinus@gmx.de> writes:

>> How is that different from having an ad-hoc list of "password" words,
>> other than being more difficult to implement?
>
> Other packages could profit from a predefined list of "password" words
> as well. Tramp comes to my mind ...

Anyone have objections to the following patch?  It introduces a new
option `password-word-equivalents' for this purpose.

=== modified file 'lisp/comint.el'
*** lisp/comint.el	2012-12-27 07:33:47 +0000
--- lisp/comint.el	2012-12-29 07:34:16 +0000
***************
*** 346,356 ****
        "Old" "old" "New" "new" "'s" "login"
        "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
     " +\\)"
!    (regexp-opt
!     '("password" "Password" "passphrase" "Passphrase"
!       "pass phrase" "Pass phrase" "Response"))
     "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
! \\(?: for [^:]+\\)?:\\s *\\'")
    "Regexp matching prompts for passwords in the inferior process.
  This is used by `comint-watch-for-password-prompt'."
    :version "24.1"
--- 346,354 ----
        "Old" "old" "New" "new" "'s" "login"
        "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
     " +\\)"
!    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
     "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
! \\(?: for [^:]+\\)?[::៖]\\s *\\'")
    "Regexp matching prompts for passwords in the inferior process.
  This is used by `comint-watch-for-password-prompt'."
    :version "24.1"
***************
*** 2315,2321 ****
  `comint-password-prompt-regexp'.
  
  This function could be in the list `comint-output-filter-functions'."
!   (when (string-match comint-password-prompt-regexp string)
      (when (string-match "^[ \n\r\t\v\f\b\a]+" string)
        (setq string (replace-match "" t t string)))
      (send-invisible string)))
--- 2313,2320 ----
  `comint-password-prompt-regexp'.
  
  This function could be in the list `comint-output-filter-functions'."
!   (when (let ((case-fold-search t))
! 	  (string-match comint-password-prompt-regexp string))
      (when (string-match "^[ \n\r\t\v\f\b\a]+" string)
        (setq string (replace-match "" t t string)))
      (send-invisible string)))

=== modified file 'lisp/simple.el'
*** lisp/simple.el	2012-12-21 08:10:26 +0000
--- lisp/simple.el	2012-12-29 07:34:03 +0000
***************
*** 2214,2219 ****
--- 2214,2277 ----
      (setq buffer-undo-list nil)
      t))
  \f
+ (defcustom password-word-equivalents
+   '("password" "passphrase" "pass phrase"
+     "كلمة السر"    ; ar
+     "গুপ্তশব্দ"        ; as
+     "পাসওয়ার্ড"       ; bn_IN
+     "contrasenya"  ; ca
+     "heslo"        ; cs
+     "adgangskode"  ; da
+     "passwort"     ; de
+     "pasvorto"     ; eo
+     "contraseña"   ; es
+     "pasahitza"    ; eu
+     "salasana"     ; fi
+     "mot de passe" ; fr
+     "પાસવર્ડ"       ; gu
+     "ססמה"         ; he
+     "शब्दकूट"        ; hi
+     "lozinka"      ; hr
+     "Jelszó: "     ; hu
+     "パスワード"     ; ja
+     "Пароль"       ; kk
+     "ಗುಪ್ತಪದ"      ; kn
+     "암호"         ; ko
+     "ពាក្យសម្ងាត់" ; km
+     "slaptažodis"  ; lt
+     "അടയാളവാക്ക്"   ; ml
+     "गुप्तशब्द"       ; mr
+     "passord"      ; nb
+     "wachtwoord"   ; nl
+     "ପ୍ରବେଶ ସଙ୍କେତ" ; or
+     "ਪਾਸਵਰਡ"       ; pa
+     "hasło"        ; pl
+     "senha"        ; pt
+     "Пароль"       ; ru
+     "රහස්පදය"      ; si
+     "Heslo"        ; sk
+     "geslo"        ; sl
+     "lozinka"      ; sr
+     "Лозинка"      ; sr
+     "lösenord"     ; sv
+     "கடவுச்சொல்"    ; ta
+     "సంకేతపదము"     ; te
+     "parola"       ; tr
+     "Пароль"       ; uk
+     "Mật khẩu"     ; vi
+     "密码"          ; zh_CN
+     "密碼"          ; zh_TW
+     "iphasiwedi"   ; zu
+     )
+   "List of words equivalent to \"password\".
+ This is used by Shell mode and other parts of Emacs to recognize
+ password prompts, including prompts in languages other than
+ English.  Different case choices should not be assumed to be
+ included; callers should bind `case-fold-search' to t."
+   :type '(repeat string)
+   :version "24.4"
+   :group 'processes)
+ 
  (defvar shell-command-history nil
    "History list for some commands that read shell commands.
  






^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-29  7:38                   ` Chong Yidong
@ 2012-12-29  8:39                     ` Andreas Schwab
  2012-12-29 10:22                     ` Vitalie Spinu
  2014-01-16 14:50                     ` Arne Babenhauserheide
  2 siblings, 0 replies; 25+ messages in thread
From: Andreas Schwab @ 2012-12-29  8:39 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13124, Arne Babenhauserheide, Michael Albinus

Chong Yidong <cyd@gnu.org> writes:

> *** lisp/simple.el	2012-12-21 08:10:26 +0000
> --- lisp/simple.el	2012-12-29 07:34:03 +0000
> ***************
> *** 2214,2219 ****
> --- 2214,2277 ----
>       (setq buffer-undo-list nil)
>       t))
>   \f
> + (defcustom password-word-equivalents

You need to reset comint-password-prompt-regexp when this is changed.

Andreas.

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





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-29  7:38                   ` Chong Yidong
  2012-12-29  8:39                     ` Andreas Schwab
@ 2012-12-29 10:22                     ` Vitalie Spinu
  2012-12-29 16:40                       ` Michael Albinus
  2014-01-16 14:50                     ` Arne Babenhauserheide
  2 siblings, 1 reply; 25+ messages in thread
From: Vitalie Spinu @ 2012-12-29 10:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13124, Arne Babenhauserheide, Michael Albinus

  >> Chong Yidong <cyd@gnu.org>
  >> on Sat, 29 Dec 2012 15:38:09 +0800 wrote:

[...]

  CY>     :version "24.1"
  CY> --- 346,354 ----
  CY>         "Old" "old" "New" "new" "'s" "login"
  CY>         "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
  CY>      " +\\)"
  CY> !    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
  CY>      "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
  CY> ! \\(?: for [^:]+\\)?[::៖]\\s *\\'")
  CY>     "Regexp matching prompts for passwords in the inferior process.
  CY>   This is used by `comint-watch-for-password-prompt'."
  CY>     :version "24.1"

It also tries things like "Enter 密码: " and "[sudo] 密码 for
user:". For a full proof solution, one would need to translate those as
well.

I wonder if it affects the speed of the output. The regexp is 800 chars
long, and it is used in comint-output-filter-functions, which are
executed on every single output chunk (roughly 500 chars).

May be match the language code (en, ru, zh etc) against the locale, and
keep only those password-word-equivalents that match.

    Vitalie





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-29 10:22                     ` Vitalie Spinu
@ 2012-12-29 16:40                       ` Michael Albinus
  0 siblings, 0 replies; 25+ messages in thread
From: Michael Albinus @ 2012-12-29 16:40 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: 13124, Arne Babenhauserheide, Chong Yidong

Vitalie Spinu <spinuvit@gmail.com> writes:

> May be match the language code (en, ru, zh etc) against the locale, and
> keep only those password-word-equivalents that match.

That wouldn't work for Tramp. We don't know the remote locale in advance.

>     Vitalie

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2012-12-29  7:38                   ` Chong Yidong
  2012-12-29  8:39                     ` Andreas Schwab
  2012-12-29 10:22                     ` Vitalie Spinu
@ 2014-01-16 14:50                     ` Arne Babenhauserheide
  2014-01-17  8:38                       ` Michael Albinus
  2 siblings, 1 reply; 25+ messages in thread
From: Arne Babenhauserheide @ 2014-01-16 14:50 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13124, Arne Babenhauserheide, Michael Albinus

At Sat, 29 Dec 2012 15:38:09 +0800,
Hi,

Chong Yidong wrote:
> Anyone have objections to the following patch?  It introduces a new
> option `password-word-equivalents' for this purpose.
> !    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"

For me this would fix the issue. I now applied something similar as
variable, but I would much prefer to see it be the default: That would
also solve the issue for a collegue of mine without me having to
explain him how the regexp works.
  
> + (defcustom password-word-equivalents
> +   '("password" "passphrase" "pass phrase"
> +     "كلمة السر"    ; ar
> +     "গুপ্তশব্দ"        ; as
> +     "পাসওয়ার্ড"       ; bn_IN
> +     "contrasenya"  ; ca
> +     "heslo"        ; cs
> +     "adgangskode"  ; da
> +     "passwort"     ; de
> +     "pasvorto"     ; eo
> +     "contraseña"   ; es
> +     "pasahitza"    ; eu
> +     "salasana"     ; fi
> +     "mot de passe" ; fr
> +     "પાસવર્ડ"       ; gu
> +     "ססמה"         ; he
> +     "शब्दकूट"        ; hi
> +     "lozinka"      ; hr
> +     "Jelszó: "     ; hu
> +     "パスワード"     ; ja
> +     "Пароль"       ; kk
> +     "ಗುಪ್ತಪದ"      ; kn
> +     "암호"         ; ko
> +     "ពាក្យសម្ងាត់" ; km
> +     "slaptažodis"  ; lt
> +     "അടയാളവാക്ക്"   ; ml
> +     "गुप्तशब्द"       ; mr
> +     "passord"      ; nb
> +     "wachtwoord"   ; nl
> +     "ପ୍ରବେଶ ସଙ୍କେତ" ; or
> +     "ਪਾਸਵਰਡ"       ; pa
> +     "hasło"        ; pl
> +     "senha"        ; pt
> +     "Пароль"       ; ru
> +     "රහස්පදය"      ; si
> +     "Heslo"        ; sk
> +     "geslo"        ; sl
> +     "lozinka"      ; sr
> +     "Лозинка"      ; sr
> +     "lösenord"     ; sv
> +     "கடவுச்சொல்"    ; ta
> +     "సంకేతపదము"     ; te
> +     "parola"       ; tr
> +     "Пароль"       ; uk
> +     "Mật khẩu"     ; vi
> +     "密码"          ; zh_CN
> +     "密碼"          ; zh_TW
> +     "iphasiwedi"   ; zu
> +     )
> +   "List of words equivalent to \"password\".
> + This is used by Shell mode and other parts of Emacs to recognize
> + password prompts, including prompts in languages other than
> + English.  Different case choices should not be assumed to be
> + included; callers should bind `case-fold-search' to t."
> +   :type '(repeat string)
> +   :version "24.4"
> +   :group 'processes)

Regarding the need to translate other parts of the password prompt
(like "enter"), I think that those would be useful, but that the
current fix is already a huge improvement, so it should not be held
back by not being perfect right away.

Should the :version keyword of defcustom for
comint-password-prompt-regexp be set to 24.4, too?

Best wishes,
Arne

PS: I’m sorry that I only answer now. I lost track of the issue and
only now found it again when the bug finally disturbed me enough that
I decided to fix it myself (I have a local fix, but it is not as nice
as your fix). I now answered here again, because I saw no fix in the
current trunk.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-16 14:50                     ` Arne Babenhauserheide
@ 2014-01-17  8:38                       ` Michael Albinus
  2014-01-17 14:11                         ` Stefan Monnier
  0 siblings, 1 reply; 25+ messages in thread
From: Michael Albinus @ 2014-01-17  8:38 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 13124, Chong Yidong

Arne Babenhauserheide <arne_bab@web.de> writes:

> Hi,

Hi,

> Chong Yidong wrote:
>> Anyone have objections to the following patch?  It introduces a new
>> option `password-word-equivalents' for this purpose.
>> !    "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
>
> For me this would fix the issue.

[...]

> Should the :version keyword of defcustom for
> comint-password-prompt-regexp be set to 24.4, too?

Emacs is in feature freeze, the patch won't make it into 24.4. I'm still
in favor installing it into the trunk once it is reopened; in Tramp I'm
faced with similar problems. Tramp explains what to do in its info
pages, but there are still help requests, occasionally.

> Best wishes,
> Arne

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-17  8:38                       ` Michael Albinus
@ 2014-01-17 14:11                         ` Stefan Monnier
  2014-01-17 14:15                           ` Michael Albinus
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Monnier @ 2014-01-17 14:11 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13124, Arne Babenhauserheide, Chong Yidong

> Emacs is in feature freeze, the patch won't make it into 24.4.

Some part of the patch should make it, since it's about fixing bug#13124.


        Stefan





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-17 14:11                         ` Stefan Monnier
@ 2014-01-17 14:15                           ` Michael Albinus
  2014-01-17 15:07                             ` Stefan Monnier
  0 siblings, 1 reply; 25+ messages in thread
From: Michael Albinus @ 2014-01-17 14:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13124, Arne Babenhauserheide, Chong Yidong

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Emacs is in feature freeze, the patch won't make it into 24.4.
>
> Some part of the patch should make it, since it's about fixing bug#13124.

Good news! I don't know what you mean with "some part of the patch", so
I'll wait until it arrives in the trunk. I'll apply corresponding Tramp
changes afterwards.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-17 14:15                           ` Michael Albinus
@ 2014-01-17 15:07                             ` Stefan Monnier
  2014-01-17 15:44                               ` Michael Albinus
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Monnier @ 2014-01-17 15:07 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13124, Arne Babenhauserheide, Chong Yidong

>>> Emacs is in feature freeze, the patch won't make it into 24.4.
>> Some part of the patch should make it, since it's about fixing bug#13124.
> Good news! I don't know what you mean with "some part of the patch", so
> I'll wait until it arrives in the trunk.

It won't happen magically.  IOW I'd appreciate if you could take care of it.
"Some part" means, a part that's seems safe enough to be "bug fix only".
I haven't actually looked at the proposed patch, so maybe it is good
enough as is.


        Stefan





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-17 15:07                             ` Stefan Monnier
@ 2014-01-17 15:44                               ` Michael Albinus
  2014-01-17 18:31                                 ` Michael Albinus
  0 siblings, 1 reply; 25+ messages in thread
From: Michael Albinus @ 2014-01-17 15:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13124, Arne Babenhauserheide, Chong Yidong

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Good news! I don't know what you mean with "some part of the patch", so
>> I'll wait until it arrives in the trunk.
>
> It won't happen magically.

I know that :-) It was just an attempt to move the ball somewhere else ...

> IOW I'd appreciate if you could take care of it.
> "Some part" means, a part that's seems safe enough to be "bug fix only".
> I haven't actually looked at the proposed patch, so maybe it is good
> enough as is.

Will do.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#13124: 24.1; shell-mode does not hide sudo password prompts
  2014-01-17 15:44                               ` Michael Albinus
@ 2014-01-17 18:31                                 ` Michael Albinus
  0 siblings, 0 replies; 25+ messages in thread
From: Michael Albinus @ 2014-01-17 18:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13124-done, Arne Babenhauserheide, Chong Yidong

Michael Albinus <michael.albinus@gmx.de> writes:

>> IOW I'd appreciate if you could take care of it.
>> "Some part" means, a part that's seems safe enough to be "bug fix only".
>> I haven't actually looked at the proposed patch, so maybe it is good
>> enough as is.
>
> Will do.

Finally, I have applied a slight modified version of Yidong's patch,
plus a Tramp patch.

>>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-01-17 18:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08 13:27 bug#13124: 24.1; shell-mode does not hide sudo password prompts Arne Babenhauserheide
2012-12-08 19:24 ` Glenn Morris
2012-12-10 16:21   ` Arne Babenhauserheide
2012-12-10 17:00     ` Glenn Morris
2012-12-11  0:12       ` Arne Babenhauserheide
2012-12-11  4:55         ` Glenn Morris
2012-12-11 13:42           ` Arne Babenhauserheide
2012-12-13 14:14             ` Kenichi Handa
2012-12-13 16:14               ` Arne Babenhauserheide
2012-12-18 19:54         ` Stefan Monnier
2012-12-21  5:47           ` Chong Yidong
2012-12-21 14:03             ` Stefan Monnier
2012-12-21 14:05               ` Chong Yidong
2012-12-21 14:19                 ` Michael Albinus
2012-12-29  7:38                   ` Chong Yidong
2012-12-29  8:39                     ` Andreas Schwab
2012-12-29 10:22                     ` Vitalie Spinu
2012-12-29 16:40                       ` Michael Albinus
2014-01-16 14:50                     ` Arne Babenhauserheide
2014-01-17  8:38                       ` Michael Albinus
2014-01-17 14:11                         ` Stefan Monnier
2014-01-17 14:15                           ` Michael Albinus
2014-01-17 15:07                             ` Stefan Monnier
2014-01-17 15:44                               ` Michael Albinus
2014-01-17 18:31                                 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).