Pledge on OpenBSD
authorKlemens Nanni <kn@openbsd.org>
Fri, 25 May 2018 05:56:27 +0000 (07:56 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Fri, 25 May 2018 09:49:30 +0000 (11:49 +0200)
dwm.c

diff --git a/dwm.c b/dwm.c
index bb95e26..09feae3 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -2137,6 +2137,10 @@ main(int argc, char *argv[])
                die("dwm: cannot open display");
        checkotherwm();
        setup();
+#ifdef __OpenBSD__
+       if (pledge("stdio proc exec", NULL) == -1)
+               die("pledge");
+#endif /* __OpenBSD__ */
        scan();
        run();
        cleanup();