From ea9b9d8cd8863bb57a4413454173571925a00474 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 12 Nov 2015 17:56:54 +0000 Subject: pledge "stdio rpath proc exec" cwm before main event loop, after init/setup - mostly for menu building. ok semarie@ (another cwm user) --- calmwm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calmwm.c b/calmwm.c index 96e7c16..1c315f0 100644 --- a/calmwm.c +++ b/calmwm.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: calmwm.c,v 1.95 2015/11/10 20:05:33 okan Exp $ + * $OpenBSD: calmwm.c,v 1.96 2015/11/12 17:56:54 okan Exp $ */ #include @@ -113,6 +113,10 @@ main(int argc, char **argv) x_init(display_name); cwm_status = CWM_RUNNING; + + if (pledge("stdio rpath proc exec", NULL) == -1) + err(1, "pledge"); + while (cwm_status == CWM_RUNNING) xev_process(); x_teardown(); -- cgit v1.2.3-2-gb3c3