diff options
Diffstat (limited to 'sbin/ccdconfig/ccdconfig.c')
-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"); |