opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit 97d12a583b38551d7cdcb301f984988eab766256
parent ed8c643225540f735a8a1f9db0660c3c14a2993f
Author: tedu <tedu>
Date:   Sat, 14 Jan 2017 18:51:24 +0000

add a geteuid check to make sure we're root before plowing into setauth. spare some debugging effort in case doas is not installed setuid.

Diffstat:
Mdoas.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/doas.c b/doas.c @@ -412,6 +412,9 @@ main(int argc, char **argv) exit(1); /* fail safe */ } + if (geteuid()) + errx(1, "not installed setuid"); + parseconfig("/etc/doas.conf", 1); /* cmdline is used only for logging, no need to abort on truncate */