summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-18 03:17:48 +0000
committerderaadt <deraadt@openbsd.org>2015-10-18 03:17:48 +0000
commit9454a018db4d13c43664c36a99dd2836e157b453 (patch)
treee4e164e9c6bb2db7224f72683f2aec922d1e257d
parentCollapse some strange programmer style with too much abstraction. (diff)
downloadwireguard-openbsd-9454a018db4d13c43664c36a99dd2836e157b453.tar.xz
wireguard-openbsd-9454a018db4d13c43664c36a99dd2836e157b453.zip
after kmem is open and setup, pledge "stdio rpath wpath cpath"
seems to be working. commiting to get feedback from people who crash.
-rw-r--r--sbin/savecore/savecore.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 86845f532e9..feb8baec3ff 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: savecore.c,v 1.54 2015/10/18 03:13:07 deraadt Exp $ */
+/* $OpenBSD: savecore.c,v 1.55 2015/10/18 03:17:48 deraadt Exp $ */
/* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */
/*-
@@ -171,6 +171,11 @@ main(int argc, char *argv[])
(void)time(&now);
kmem_setup();
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+ syslog(LOG_ERR, "pledge: %m");
+ exit(1);
+ }
+
if (clear) {
clear_dump();
return (0);