Theo Buehler wrote: > On Tue, Feb 14, 2017 at 03:57:43PM +0100, Paul de Weerd wrote: > > Consider the following: > > > > 1 [weerd@despair] $ doas true > > 2 doas ([email protected]) password: > > 3 [weerd@despair] $ doas true > > 4 [weerd@despair] $ doas -n true > > 5 doas: Authorization required > > > > I have 'persist' to allow doas to not prompt for a password on > > subsequent invocations. However, then using 'doas -n' complains > > "Authorization required" while the manpage says for -n: "Non > > interactive mode, fail if doas would prompt for password." > > > > Doas wouldn't prompt for a password if -n wasn't specified (see line > > 3), so why does it fail in line 4? > > > > Is this a bug in doas or in the manpage? > > > > I think it's a bug in doas, even if the combination of -n and persist is > a bit iffy. Here's a simple fix:
No, that's exactly why -n doesn't work with persist. Results should be consistent. -n means "no password". Adding persist allows to sometimes skip entering the password, but the password is still "required".
