From 23f411eaa378d69e6723ae66dc39d1566e5b25a9 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 14:29:05 +0000 Subject: [PATCH] pledge "stdio rpath route" seems to be working. route is needed for pretty printing some addresses. --- usr.bin/fstat/fstat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index bbf26c55d7a..becb6f63f27 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.80 2015/01/16 06:40:08 deraadt Exp $ */ +/* $OpenBSD: fstat.c,v 1.81 2015/10/10 14:29:05 deraadt Exp $ */ /* * Copyright (c) 2009 Todd C. Miller @@ -275,6 +275,9 @@ main(int argc, char *argv[]) if ((kf = kvm_getfiles(kd, what, arg, sizeof(*kf), &cnt)) == NULL) errx(1, "%s", kvm_geterr(kd)); + if (pledge("stdio rpath route", NULL) == -1) + err(1, "pledge"); + find_splices(kf, cnt); if (!fuser) fstat_header(); -- 2.20.1