diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-28 21:51:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-28 21:51:48 +0000 |
commit | 8e1d29ff1c05f208f18d69b2637cf96eefec722b (patch) | |
tree | 0fa93cc9a5109de4589b1955e02ca91cabd42f65 | |
parent | bd3d9a7e1b5b01ff023ac5e1a3e2bfe7d7b82d24 (diff) |
be more paranoid about gid revoking
-rw-r--r-- | sbin/ccdconfig/ccdconfig.c | 30 |
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 */ } |