summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iostat
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>2001-05-14 07:22:06 +0000
committerangelos <angelos@openbsd.org>2001-05-14 07:22:06 +0000
commitb39dbcce3a41b590b466cbe83a9307768a6cd923 (patch)
treec98e7e2c6281e5ed1bea5b6495104f796b315e4a /usr.sbin/iostat
parentUse the sysctl-based diskstats for live kernels. deraadt@ ok (diff)
downloadwireguard-openbsd-b39dbcce3a41b590b466cbe83a9307768a6cd923.tar.xz
wireguard-openbsd-b39dbcce3a41b590b466cbe83a9307768a6cd923.zip
No need for setgid kmem anymore, we can use sysctl to get all the
relevant information.
Diffstat (limited to 'usr.sbin/iostat')
-rw-r--r--usr.sbin/iostat/Makefile4
-rw-r--r--usr.sbin/iostat/iostat.c15
2 files changed, 2 insertions, 17 deletions
diff --git a/usr.sbin/iostat/Makefile b/usr.sbin/iostat/Makefile
index 0ff5770c068..cf33975e865 100644
--- a/usr.sbin/iostat/Makefile
+++ b/usr.sbin/iostat/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 1997/09/21 11:43:44 deraadt Exp $
+# $OpenBSD: Makefile,v 1.5 2001/05/14 07:22:06 angelos Exp $
PROG= iostat
MAN= iostat.8
@@ -12,7 +12,5 @@ SRCS= dkstats.c iostat.c
DPADD= ${LIBKVM}
LDADD= -lkvm
-BINGRP= kmem
-BINMODE=2555
.include <bsd.prog.mk>
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index eb277cdd09e..88b48b4a77d 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iostat.c,v 1.8 1998/07/08 22:13:27 deraadt Exp $ */
+/* $OpenBSD: iostat.c,v 1.9 2001/05/14 07:22:06 angelos Exp $ */
/* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */
/*
@@ -172,20 +172,7 @@ main(argc, argv)
if (!ISSET(todo, SHOW_CPU | SHOW_TTY | SHOW_STATS_1 | SHOW_STATS_2))
todo |= SHOW_CPU | SHOW_TTY | SHOW_STATS_1;
- /*
- * Discard setgid privileges if not the running kernel so that bad
- * guys can't print interesting stuff from kernel memory.
- */
- if (nlistf != NULL || memf != NULL) {
- setegid(getgid());
- setgid(getgid());
- }
-
dkinit(0);
-
- setegid(getgid());
- setgid(getgid());
-
dkreadstats();
selectdrives(argc, argv);