summaryrefslogtreecommitdiff
path: root/sbin/ccdconfig/ccdconfig.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-05-28 21:51:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-05-28 21:51:48 +0000
commit8e1d29ff1c05f208f18d69b2637cf96eefec722b (patch)
tree0fa93cc9a5109de4589b1955e02ca91cabd42f65 /sbin/ccdconfig/ccdconfig.c
parentbd3d9a7e1b5b01ff023ac5e1a3e2bfe7d7b82d24 (diff)
be more paranoid about gid revoking
Diffstat (limited to 'sbin/ccdconfig/ccdconfig.c')
-rw-r--r--sbin/ccdconfig/ccdconfig.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index 633a38292bf..8a02448477b 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccdconfig.c,v 1.7 1997/01/13 21:23:35 deraadt Exp $ */
+/* $OpenBSD: ccdconfig.c,v 1.8 1997/05/28 21:51:47 deraadt Exp $ */
/* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */
/*-
@@ -168,25 +168,25 @@ main(argc, argv)
* Discard setgid privileges if not the running kernel so that bad
* guys can't print interesting stuff from kernel memory.
*/
- if (core != NULL || kernel != NULL) {
+ if (core != NULL || kernel != NULL || action != CCD_DUMP) {
setegid(getgid());
setgid(getgid());
}
switch (action) {
- case CCD_CONFIG:
- case CCD_UNCONFIG:
- exit(do_single(argc, argv, action));
- /* NOTREACHED */
-
- case CCD_CONFIGALL:
- case CCD_UNCONFIGALL:
- exit(do_all(action));
- /* NOTREACHED */
-
- case CCD_DUMP:
- exit(dump_ccd(argc, argv));
- /* NOTREACHED */
+ case CCD_CONFIG:
+ case CCD_UNCONFIG:
+ exit(do_single(argc, argv, action));
+ /* NOTREACHED */
+
+ case CCD_CONFIGALL:
+ case CCD_UNCONFIGALL:
+ exit(do_all(action));
+ /* NOTREACHED */
+
+ case CCD_DUMP:
+ exit(dump_ccd(argc, argv));
+ /* NOTREACHED */
}
/* NOTREACHED */
}