From d7e70183dd68ef56c2783038a68fdb3298b7f647 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 31 Aug 2001 16:26:37 +0000 Subject: SECURITY: Drop `setgid kmem' bit as early as possible. --- usr.bin/fstat/fstat.c | 1 + 1 file changed, 1 insertion(+) (limited to 'usr.bin/fstat') diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 96be706..5ee9feb 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -236,6 +236,7 @@ main(argc, argv) if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf)) == NULL) errx(1, "%s", buf); + setgid(getgid()); #ifdef notdef if (kvm_nlist(kd, nl) != 0) errx(1, "no namelist: %s", kvm_geterr(kd)); -- cgit v1.1