From b2ffb34f8213063856cc0fd33eca2a6a5be1930f Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 14:49:23 +0000 Subject: [PATCH] pledge "stdio proc exec". relies on two recent kernel fixes. --- usr.bin/time/time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index e18653d537d..d3b4659439f 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.20 2015/01/16 06:40:13 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.21 2015/10/10 14:49:23 deraadt Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -56,6 +56,8 @@ main(int argc, char *argv[]) struct rusage ru; int exitonsig = 0; + if (pledge("stdio proc exec", NULL) == -1) + err(1, "pledge"); while ((ch = getopt(argc, argv, "lp")) != -1) { switch(ch) { -- 2.20.1