summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-11-19 17:44:01 +0000
committerderaadt <deraadt@openbsd.org>2015-11-19 17:44:01 +0000
commit7f453672c25c5f0591f603d7528db0537662a258 (patch)
treeb6365483dcd9abdd25693a515d015cc633fa7197
parentDon't bother casting memset() argument to void*. No binary change. (diff)
downloadwireguard-openbsd-7f453672c25c5f0591f603d7528db0537662a258.tar.xz
wireguard-openbsd-7f453672c25c5f0591f603d7528db0537662a258.zip
opencvs can use pledge "stdio rpath wpath cpath fattr proc exec".
I have not looked into adding stricter pledges later in the code.
-rw-r--r--usr.bin/cvs/cvs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index 7aab0cba1a9..0802ec4d965 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.156 2015/11/05 09:48:21 nicm Exp $ */
+/* $OpenBSD: cvs.c,v 1.157 2015/11/19 17:44:01 deraadt Exp $ */
/*
* Copyright (c) 2006, 2007 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -34,6 +34,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <err.h>
#include "cvs.h"
#include "remote.h"
@@ -186,6 +187,9 @@ main(int argc, char **argv)
struct stat st;
char fpath[PATH_MAX];
+ if (pledge("stdio rpath wpath cpath fattr proc exec", NULL) == -1)
+ err(1, "pledge");
+
tzset();
TAILQ_INIT(&cvs_variables);