summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-14 07:22:07 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-14 07:22:07 +0000
commit61727c2cde3ce4620951477ba76ddfa5f24bb1a5 (patch)
tree77b521eadde92116be8cd8fb696016bc9f7d5ba2
parent9581c7360fe9a46282e319ba8558223e111bbf79 (diff)
No need for setgid kmem anymore, we can use sysctl to get all the
relevant information.
-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);