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.sbin/slstats/slstats.c | |
parent | 5d7745af6274ad1c61f601a05048c86ed26cf8a9 (diff) |
whack kmem gid after kvm_openfiles()
Diffstat (limited to 'usr.sbin/slstats/slstats.c')
-rw-r--r-- | usr.sbin/slstats/slstats.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/slstats/slstats.c b/usr.sbin/slstats/slstats.c index 0f084193db1..e71609b31fb 100644 --- a/usr.sbin/slstats/slstats.c +++ b/usr.sbin/slstats/slstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slstats.c,v 1.8 1998/03/19 07:32:08 deraadt Exp $ */ +/* $OpenBSD: slstats.c,v 1.9 1998/07/08 22:13:30 deraadt Exp $ */ /* $NetBSD: slstats.c,v 1.6.6.1 1996/06/07 01:42:30 thorpej Exp $ */ /* @@ -25,7 +25,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: slstats.c,v 1.8 1998/03/19 07:32:08 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: slstats.c,v 1.9 1998/07/08 22:13:30 deraadt Exp $"; #endif #define INET @@ -143,6 +143,9 @@ main(argc, argv) if ((kd = kvm_openfiles(kernel, kmemf, NULL, O_RDONLY, errbuf)) == NULL) errx(1, "can't open kvm: %s", errbuf); + setegid(getgid()); + setgid(getgid()); + if (kvm_nlist(kd, nl) < 0 || nl[0].n_type == 0) errx(1, "%s: SLIP symbols not in namelist", kernel == NULL ? _PATH_UNIX : kernel); |