]> git.armaanb.net Git - opendoas.git/commitdiff
add a geteuid check to make sure we're root before plowing into setauth. spare some...
authortedu <tedu>
Sat, 14 Jan 2017 18:51:24 +0000 (18:51 +0000)
committerDuncaen <mail@duncano.de>
Mon, 11 Dec 2017 15:28:56 +0000 (16:28 +0100)
doas.c

diff --git a/doas.c b/doas.c
index 0a23595352a1a2a27e88e3b128f2dac3bc74e157..d30f73d25def4aefa040516647a0494d0bd6a065 100644 (file)
--- 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 */