GNU bug report logs - #13124
add non-English regexps to comint-password-prompt-regexp for sudo password prompt

Previous Next

Package: emacs;

Reported by: arne_bab <at> web.de

Date: Sat, 8 Dec 2012 13:29:01 UTC

Severity: normal

Found in version 24.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 13124 <at> debbugs.gnu.org, Arne Babenhauserheide <arne_bab <at> web.de>, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#13124: 24.1; shell-mode does not hide sudo password prompts
Date: Sat, 29 Dec 2012 11:22:02 +0100
  >> Chong Yidong <cyd <at> 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




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

Previous Next


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