sorry for the noise, noticed just now re-reading the diff.

On 2023/08/17 09:32:43 +0000, Klemens Nanni <k...@openbsd.org> wrote:
> --- bioctl.8  6 Jul 2023 21:08:50 -0000       1.111
> +++ bioctl.8  17 Aug 2023 09:24:28 -0000
> @@ -288,7 +288,7 @@ is specified as "auto", the number of ro
>  based on system performance.
>  Otherwise the minimum is 4 rounds and the default is 16.
>  .It Fl s
> -Read the passphrase for the selected crypto volume from
> +Omit prompts and read passphrases without confirmation from
>  .Pa /dev/stdin
>  rather than
>  .Pa /dev/tty .

"read passphrases" hints that it reads more than one, which is not
what it would do now.

what about something like

+Read the passphrase from standard input without prompting.

I'm not sure how to fit "without confirmation" nicely and whether the
singular "passphrase" is enough to convey what it does.


also, to correct my previous mail

On 2023/08/17 16:28:52 +0200, Omar Polo <o...@omarpolo.com> wrote:
> On 2023/08/17 09:32:43 +0000, Klemens Nanni <k...@openbsd.org> wrote:
> > [...]
> > @@ -1316,6 +1316,7 @@ derive_key(u_int32_t type, int rounds, u
> >     size_t          pl;
> >     struct stat     sb;
> >     char            passphrase[1024], verifybuf[1024];
> > +   int             rpp_flag = RPP_ECHO_OFF;
> 
> since this is the default...
> 
> >     if (!key)
> >             errx(1, "Invalid key");
> > @@ -1351,6 +1352,8 @@ derive_key(u_int32_t type, int rounds, u
> >  
> >             fclose(f);
> >     } else {
> > +           rpp_flag |= interactive ? RPP_REQUIRE_TTY : RPP_STDIN;
> > +
> 
> I'd find slightly easier to read
> 
> +             rpp_flag = interactive ? RPP_REQUIRE_TTY : RPP_STDIN
> 
> but no strong opinion.

obviously i meant for this line to be moved earlier in my suggestion.

> >             if (readpassphrase(prompt, passphrase, sizeof(passphrase),
> >                 rpp_flag) == NULL)
> >                     err(1, "unable to read passphrase");

Reply via email to