]> git.armaanb.net Git - opendoas.git/blobdiff - doas.c
add a geteuid check to make sure we're root before plowing into setauth. spare some...
[opendoas.git] / 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 */