diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-08 22:24:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-08 22:24:55 +0000 |
commit | e94ffaf418747e568db195c0d8d1046cac1262ff (patch) | |
tree | 751e715fa88c42d5c39816b6fbc1ee225ae2a379 | |
parent | f8c16e899347031923fde770072615b85fb010a0 (diff) |
whack kmem gid after kvm_openfiles()
-rw-r--r-- | sbin/ccdconfig/ccdconfig.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index 85fc0e2ca1d..6986d8089a4 100644 --- a/sbin/ccdconfig/ccdconfig.c +++ b/sbin/ccdconfig/ccdconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccdconfig.c,v 1.10 1997/11/26 22:34:05 niklas Exp $ */ +/* $OpenBSD: ccdconfig.c,v 1.11 1998/07/08 22:24:54 deraadt Exp $ */ /* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */ /*- @@ -176,11 +176,18 @@ main(argc, argv) switch (action) { case CCD_CONFIG: case CCD_UNCONFIG: + setegid(getgid()); + setgid(getgid()); + exit(do_single(argc, argv, action)); /* NOTREACHED */ case CCD_CONFIGALL: case CCD_UNCONFIGALL: + + setegid(getgid()); + setgid(getgid()); + exit(do_all(action)); /* NOTREACHED */ @@ -506,6 +513,9 @@ dump_ccd(argc, argv) return (1); } + setegid(getgid()); + setgid(getgid()); + if (kvm_nlist(kd, nl)) KVM_ABORT(kd, "ccd-related symbols not available"); |