summaryrefslogtreecommitdiff
path: root/usr.bin/fstat/fstat.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-08 22:14:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-08 22:14:38 +0000
commitc42d3dfc6a3f99fbbe1a0c87af2f3705ea3ce262 (patch)
treeb2801e83b20e253f4a46ba0d4341d06e3695199c /usr.bin/fstat/fstat.c
parent5d7745af6274ad1c61f601a05048c86ed26cf8a9 (diff)
whack kmem gid after kvm_openfiles()
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r--usr.bin/fstat/fstat.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 508b9b109c3..bdb97c276eb 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.15 1998/07/05 18:42:41 deraadt Exp $ */
+/* $OpenBSD: fstat.c,v 1.16 1998/07/08 22:14:12 deraadt Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: fstat.c,v 1.15 1998/07/05 18:42:41 deraadt Exp $";
+static char *rcsid = "$OpenBSD: fstat.c,v 1.16 1998/07/08 22:14:12 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -238,6 +238,10 @@ main(argc, argv)
fprintf(stderr, "fstat: %s\n", buf);
exit(1);
}
+
+ setegid(getgid());
+ setgid(getgid());
+
if ((p = kvm_getprocs(kd, what, arg, &cnt)) == NULL) {
fprintf(stderr, "fstat: %s\n", kvm_geterr(kd));
exit(1);