From: deraadt Date: Sat, 10 Oct 2015 19:10:20 +0000 (+0000) Subject: pledge "stdio getpw rpath wpath cpath tmppath proc exec". doug pointed out X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9a244d0bba41c70d278adc01594ca3457d2a8e7e;p=openbsd 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 --- 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':