unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Tyler Smith <tyler@plantarum.ca>
Cc: 16374@debbugs.gnu.org
Subject: bug#16374: password not hidden in shell when mounting cifs partition
Date: Sun, 6 Oct 2019 03:40:21 +0200	[thread overview]
Message-ID: <CADwFkmmh4bTNv8yu01T75nr7ktddWZ7Un3UcZTUr+1uwsp8Ubw@mail.gmail.com> (raw)
In-Reply-To: <CADkt+Zs14sjVpKfLg4XCWeXNYjZcQTvhQs3zAXYD_renvbmZtQ@mail.gmail.com>

Tyler Smith <tyler@plantarum.ca> writes:

> I'm not sure if this is really an Emacs bug, or just a limitation of *shell*
>
> Starting from emacs -Q:
> M-x shell
> mount ./network-drive
> ;; (fstab for this drive is:
> //<network.location>/<folder>$/     /home/user/network-drive      cifs
> noauto,users,user=<my username on the network>,uid=<my local
> username>,rw     0       0
> ;; )
>
> ;; I am now prompted for my network password. When I enter it and press
> ;; return I see this:
> Password for <user>@//<network.location>/<folder>$/:  <my password in
> plain text>
> ********
>
> The point is, the asterisks should be appearing in place of my actual
> password. Instead, they appear in addition to my password.
>
> Thanks for your time,
>
> Tyler
>
> In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 3.8.6)
>  of 2013-12-31 on ONOTTAR654746

Hi Tyler,

Thanks for the bug report.  Sorry that it went unanswered for so long.

When I try the following on Emacs 26.1, I get no error:

(progn
  (require 'comint)
  (string-match comint-password-prompt-regexp
        "Password for foo@//example.org/foo/bar$/: "))

This suggests to me that a prompt such as the above should work under
M-x shell, since that is built on top of comint.

Could you verify that this works for you on Emacs 26.1?

Could you also please tell me if:

"Password for foo@//example.org/foo/bar$/: "

is a good example of the kind of prompt you get when mounting a cifs
partition?  (I'm trying to find a good example to add to the test
suite for comint-password-prompt-regexp.)

Best regards,
Stefan Kangas





  reply	other threads:[~2019-10-06  1:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 16:43 bug#16374: password not hidden in shell when mounting cifs partition Tyler Smith
2019-10-06  1:40 ` Stefan Kangas [this message]
2019-11-07  0:39   ` Stefan Kangas
2019-11-07 15:24     ` Tyler Smith
2019-11-07 23:55       ` Stefan Kangas

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=CADwFkmmh4bTNv8yu01T75nr7ktddWZ7Un3UcZTUr+1uwsp8Ubw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=16374@debbugs.gnu.org \
    --cc=tyler@plantarum.ca \
    /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.
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).