summaryrefslogtreecommitdiff
path: root/sbin/savecore
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:17:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:17:49 +0000
commitef0048419ec8f789e17a23ab6946a350fcc5c2ee (patch)
tree6f20244637be0357626e913183e7f38fe29e97c4 /sbin/savecore
parent3ea52149631644c343081755c65b3bba37446834 (diff)
after kmem is open and setup, pledge "stdio rpath wpath cpath"
seems to be working. commiting to get feedback from people who crash.
Diffstat (limited to 'sbin/savecore')
-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);