From 84489e75d943bd25a3d87156b4f7581848230fd1 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 20:57:00 +0000 Subject: [PATCH] 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(-) 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)) -- 2.20.1