diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-08 22:14:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-08 22:14:38 +0000 |
commit | c42d3dfc6a3f99fbbe1a0c87af2f3705ea3ce262 (patch) | |
tree | b2801e83b20e253f4a46ba0d4341d06e3695199c /usr.bin/fstat/fstat.c | |
parent | 5d7745af6274ad1c61f601a05048c86ed26cf8a9 (diff) |
whack kmem gid after kvm_openfiles()
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r-- | usr.bin/fstat/fstat.c | 8 |
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); |