From f8d15d5230cfa1b0abc3dce86bb1a01f93e74ae3 Mon Sep 17 00:00:00 2001 From: Thomas Moestl Date: Thu, 22 Mar 2001 17:39:57 +0000 Subject: [PATCH] Take setgid kmem away from nfsstat, it has not needed it for some time now. Approved by: rwatson --- usr.bin/nfsstat/Makefile | 3 +-- usr.bin/nfsstat/nfsstat.c | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/usr.bin/nfsstat/Makefile b/usr.bin/nfsstat/Makefile index 6d79ce7fd972..cfe0e1efb432 100644 --- a/usr.bin/nfsstat/Makefile +++ b/usr.bin/nfsstat/Makefile @@ -1,10 +1,9 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= nfsstat CFLAGS+=-DNFS DPADD= ${LIBKVM} LDADD= -lkvm -BINGRP= kmem -BINMODE=2555 .include diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index dc4a625f2235..3c08a551a78e 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -142,12 +142,7 @@ main(argc, argv) } } #endif - /* - * 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) { - setgid(getgid()); deadkernel = 1; if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY,