From: deraadt Date: Sun, 18 Oct 2015 03:17:48 +0000 (+0000) Subject: after kmem is open and setup, pledge "stdio rpath wpath cpath" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9454a018db4d13c43664c36a99dd2836e157b453;p=openbsd after kmem is open and setup, pledge "stdio rpath wpath cpath" seems to be working. commiting to get feedback from people who crash. --- 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);