From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Bart Schaefer <schaefer@brasslantern.com>, zsh-workers@zsh.org
Subject: Re: How to read password (no echo) from builtin?
Date: Fri, 2 Jun 2017 03:46:10 +0200 [thread overview]
Message-ID: <etPan.5930c363.333ab105.1a9@MacMini> (raw)
In-Reply-To: <170601133132.ZM1566@torch.brasslantern.com>
On 1 czerwca 2017 at 22:31:56, Bart Schaefer (schaefer@brasslantern.com) wrote:
> On May 31, 6:39pm, Sebastian Gniazdowski wrote:
> }
> } I need to read a password (no echo to terminal) from builtin, provided
> } by module. Should I invoke bin_read? I would have to find a way to
> } provide Options typedef argument. How to do it? Could also invoke
> } vared, but I don't see builtin for it.
>
> bin_vared is in Src/Zle/zle_main.c. However I don't expect that when
> reading a password you want to attempt to interpret ZLE widget actions.
Ah right, I blindly followed consensus "vared is better" forgetting that it is better because it can complete e.g. paths, which doesn't matter for passwords.
> Construct a "builtin read -rs" command and call execstring(), perhaps?
Cool idea, thanks. I now ended up with -a option to provide password, and -A to provide file with password. Redis passwords are in general long because the database is
fast enough to reply to intensive brute force attack, so authors say to have a long password.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
prev parent reply other threads:[~2017-06-02 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 16:39 Sebastian Gniazdowski
2017-06-01 20:31 ` Bart Schaefer
2017-06-02 1:46 ` Sebastian Gniazdowski [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=etPan.5930c363.333ab105.1a9@MacMini \
--to=psprint@zdharma.org \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.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.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).