mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 11:22:43 +00:00
Take setgid kmem away from nfsstat, it has not needed it for some time
now. Approved by: rwatson
This commit is contained in:
parent
ed873335b7
commit
f8d15d5230
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74655
@ -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 <bsd.prog.mk>
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user