summaryrefslogtreecommitdiff
path: root/usr.bin/bgplg
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2015-10-18 22:37:31 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2015-10-18 22:37:31 +0000
commitfd549b4a134c0ea6b36a9d2da06cc3c448fe8094 (patch)
tree40319b1b2fa97edbeb98d0870ec14c5c9e349be4 /usr.bin/bgplg
parentde72ffffec5a5e1b845ab3c439bc2e583cdbc4b1 (diff)
pledge bgplg(8).
ok deraadt
Diffstat (limited to 'usr.bin/bgplg')
-rw-r--r--usr.bin/bgplg/bgplg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/bgplg/bgplg.c b/usr.bin/bgplg/bgplg.c
index 89536ce66fa..a613f40faf3 100644
--- a/usr.bin/bgplg/bgplg.c
+++ b/usr.bin/bgplg/bgplg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgplg.c,v 1.13 2015/01/16 06:40:06 deraadt Exp $ */
+/* $OpenBSD: bgplg.c,v 1.14 2015/10/18 22:37:30 benno Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -28,6 +28,7 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
+#include <err.h>
#include "bgplg.h"
@@ -253,6 +254,9 @@ main(void)
u_int i;
struct cmd *cmdp = NULL;
+ if (pledge("stdio rpath proc exec", NULL) == -1)
+ err(1, "pledge");
+
if (gethostname(myname, sizeof(myname)) != 0)
return (1);