From 9b1bc1e60003cc47bfdb81e4d056a8d74bc48dd1 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 10 Oct 2015 20:57:01 +0000 Subject: pledge "stdio rpath wpath cpath proc exec"; this spawns cpp. ok doug --- usr.bin/rpcgen/rpc_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index dec139fc6a8..6003e1133a7 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_main.c,v 1.30 2015/08/20 22:32:41 deraadt Exp $ */ +/* $OpenBSD: rpc_main.c,v 1.31 2015/10/10 20:57:00 deraadt Exp $ */ /* $NetBSD: rpc_main.c,v 1.9 1996/02/19 11:12:43 pk Exp $ */ /* @@ -140,6 +140,9 @@ main(int argc, char *argv[]) { struct commandline cmd; + if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1) + perror("pledge"); + (void) memset((char *) &cmd, 0, sizeof(struct commandline)); clear_args(); if (!parseargs(argc, argv, &cmd)) -- cgit v1.2.3