From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Manuel Giraud <manuel@ledu-giraud.fr>, emacs-devel@gnu.org
Subject: Re: [Patch] Avoid recording chars when reading passwords
Date: Mon, 13 Jun 2022 15:26:41 +0200 [thread overview]
Message-ID: <87o7ywae3y.fsf@elite.giraud> (raw)
In-Reply-To: <834k0v5f7z.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Jun 2022 18:48:00 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Date: Wed, 08 Jun 2022 15:46:19 +0200
>>
>> With this patch, passwords won't appear in the lossage or the dribble
>> file.
>
> We already have a facility for this, see 'no-record' in the
> description of unread-command-events in the ELisp manual. Please see
> if you can use that instead.
Ok but I don't quite understand how unread-command-events works. For
instance, if I put this code into `read-passwd':
--8<---------------cut here---------------start------------->8---
(setq-local unread-command-events
(mapcar #'(lambda (x) (cons 'no-record x))
(listify-key-sequence "mypassword")))
--8<---------------cut here---------------end--------------->8---
It will prefilled (and not recorded) at prompt with "mypassord" but I'd
like to be able to type the real password that I don't know in
advance. In `read-passwd', the password is read with `read-string' that
is C code… Anyway, can someone explain what is the purpose (and usage)
of unread-command-events?
> And if you must have a variable, I'd prefer to un-obsolete
> inhibit--record-char, which was once used for this purpose, but no
> longer is, and restore the code in keyboard.c which supported it.
I was not aware of this code. But yes, maybe we should do that.
Thanks.
--
Manuel Giraud
next prev parent reply other threads:[~2022-06-13 13:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 13:46 [Patch] Avoid recording chars when reading passwords Manuel Giraud
2022-06-08 15:48 ` Eli Zaretskii
2022-06-13 13:26 ` Manuel Giraud [this message]
2022-06-14 9:38 ` Manuel Giraud
2022-06-14 11:35 ` Eli Zaretskii
2022-06-14 12:34 ` Stefan Monnier
2022-06-14 17:46 ` Eli Zaretskii
2022-06-15 7:59 ` Manuel Giraud
2022-06-18 11:16 ` Eli Zaretskii
2022-06-18 11:29 ` Akib Azmain Turja
2022-06-18 11:33 ` Akib Azmain Turja
2022-06-20 9:58 ` Manuel Giraud
2022-06-20 11:28 ` Eli Zaretskii
2022-06-20 15:28 ` Manuel Giraud
2022-06-20 15:52 ` Eli Zaretskii
2022-06-25 9:35 ` Eli Zaretskii
2022-06-15 12:27 ` Stefan Monnier
2022-06-15 13:27 ` Eli Zaretskii
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=87o7ywae3y.fsf@elite.giraud \
--to=manuel@ledu-giraud.fr \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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).