summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2017-08-20 16:43:26 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2017-08-20 16:43:26 +0000
commit25a40bc2e90d6e1e19dbd5634c042b48b57fd813 (patch)
treee42ab6b2da9921fb096ba0073310432c67a4913d
parent967987a2ce80dbf81dfb051cd8ea63c5ee5d9ebf (diff)
add pledge. ok tb@
-rw-r--r--app/xidle/xidle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/xidle/xidle.c b/app/xidle/xidle.c
index d8e10840c..9778e5c6c 100644
--- a/app/xidle/xidle.c
+++ b/app/xidle/xidle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xidle.c,v 1.4 2017/08/20 16:42:21 matthieu Exp $ */
+/* $OpenBSD: xidle.c,v 1.5 2017/08/20 16:43:25 matthieu Exp $ */
/*
* Copyright (c) 2005 Federico G. Schwindt
* Copyright (c) 2005 Claudio Castiglia
@@ -366,6 +366,9 @@ main(int argc, char **argv)
if (fd > 2)
close(fd);
+ if (pledge("stdio proc exec", NULL) == -1)
+ err(1, "pledge");
+
for (;;) {
XEvent ev;
u_long mask;