From 26a8646efb74add6118fbda63d1c07f333675139 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 20 Aug 2017 16:43:25 +0000 Subject: [PATCH] add pledge. ok tb@ --- app/xidle/xidle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;