summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-20 15:52:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-20 15:52:58 +0000
commitea7687edd3a315b9d1347e5334dfaaa35a4de83e (patch)
tree188c24942fa6f5b465ccf35bbcd45e8c6c29a357
parent37e9707c8f08088fedbe8d61a8050e47d4981baf (diff)
Appears to only need pledge "stdio" against open kvm
-rw-r--r--usr.sbin/trpt/trpt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c
index f5050904ae0..d266eb2d827 100644
--- a/usr.sbin/trpt/trpt.c
+++ b/usr.sbin/trpt/trpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trpt.c,v 1.31 2015/02/09 23:00:15 deraadt Exp $ */
+/* $OpenBSD: trpt.c,v 1.32 2015/11/20 15:52:57 deraadt Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -198,6 +198,9 @@ main(int argc, char *argv[])
if (kvm_nlist(kd, nl))
errx(2, "%s: no namelist", sys ? sys : _PATH_UNIX);
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (kvm_read(kd, nl[N_TCP_DEBX].n_value, (char *)&tcp_debx,
sizeof(tcp_debx)) != sizeof(tcp_debx))
errx(3, "tcp_debx: %s", kvm_geterr(kd));