From 9a244d0bba41c70d278adc01594ca3457d2a8e7e Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 19:10:20 +0000 Subject: [PATCH] pledge "stdio getpw rpath wpath cpath tmppath proc exec". doug pointed out the need for getpw. Not sure if I see ways to improve this program. ok doug --- usr.bin/sendbug/sendbug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 8075f44ed31..ab760d0175a 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.69 2015/01/16 06:40:11 deraadt Exp $ */ +/* $OpenBSD: sendbug.c,v 1.70 2015/10/10 19:10:20 deraadt Exp $ */ /* * Written by Ray Lai . @@ -86,6 +86,9 @@ main(int argc, char *argv[]) time_t mtime; FILE *fp; + if (pledge("stdio getpw rpath wpath cpath tmppath proc exec", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "DEPV")) != -1) switch (ch) { case 'D': -- 2.20.1