summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-08 22:24:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-08 22:24:55 +0000
commite94ffaf418747e568db195c0d8d1046cac1262ff (patch)
tree751e715fa88c42d5c39816b6fbc1ee225ae2a379 /sbin
parentf8c16e899347031923fde770072615b85fb010a0 (diff)
whack kmem gid after kvm_openfiles()
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ccdconfig/ccdconfig.c12
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");