Take setgid kmem away from nfsstat, it has not needed it for some time

now.

Approved by:	rwatson
This commit is contained in:
Thomas Moestl 2001-03-22 17:39:57 +00:00
parent ed873335b7
commit f8d15d5230
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74655
2 changed files with 1 additions and 7 deletions

View File

@ -1,10 +1,9 @@
# $FreeBSD$
# @(#)Makefile 8.1 (Berkeley) 6/6/93 # @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= nfsstat PROG= nfsstat
CFLAGS+=-DNFS CFLAGS+=-DNFS
DPADD= ${LIBKVM} DPADD= ${LIBKVM}
LDADD= -lkvm LDADD= -lkvm
BINGRP= kmem
BINMODE=2555
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -142,12 +142,7 @@ main(argc, argv)
} }
} }
#endif #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) { if (nlistf != NULL || memf != NULL) {
setgid(getgid());
deadkernel = 1; deadkernel = 1;
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY,