Updated doas.c with patch from arthepsy. Fixes -n flag

so if a password prompt is required, doas will automatically fail.
This commit is contained in:
Jesse Smith 2017-10-11 10:32:20 -03:00
parent 4bd6c1c178
commit fe6d3a342b

2
doas.c
View file

@ -418,10 +418,10 @@ main(int argc, char **argv)
}
if (!(rule->options & NOPASS)) {
#if defined(USE_BSD_AUTH)
if (nflag)
errx(1, "Authorization required");
#if defined(USE_BSD_AUTH)
authuser(myname, login_style, rule->options & PERSIST);
#elif defined(USE_PAM)
#define PAM_END(msg) do { \