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,