summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-11-11 15:10:20 +0000
committerderaadt <deraadt@openbsd.org>2015-11-11 15:10:20 +0000
commit542e566a087d56b20f204ef3a33228a037893ea7 (patch)
tree8d818d7534700130162bfd08cc6d0f0916f2bc86
parentRemove an XXX that no longer makes sense, rt_ifp is now always the same (diff)
downloadwireguard-openbsd-542e566a087d56b20f204ef3a33228a037893ea7.tar.xz
wireguard-openbsd-542e566a087d56b20f204ef3a33228a037893ea7.zip
pledge "stdio rpath wpath cpath fattr proc exec tty" seems to work.
there are a few system, popen, fork... ok florian
-rw-r--r--usr.bin/mg/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c
index b3bee6b09af..7f5e235fe8a 100644
--- a/usr.bin/mg/main.c
+++ b/usr.bin/mg/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.77 2015/11/08 19:31:57 jasper Exp $ */
+/* $OpenBSD: main.c,v 1.78 2015/11/11 15:10:20 deraadt Exp $ */
/* This file is in the public domain. */
@@ -56,6 +56,9 @@ main(int argc, char **argv)
int nobackups = 0;
struct buffer *bp = NULL;
+ if (pledge("stdio rpath wpath cpath fattr proc exec tty", NULL) == -1)
+ err(1, "pledge");
+
while ((o = getopt(argc, argv, "nf:")) != -1)
switch (o) {
case 'n':