1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

No dm -> no need to revoke setegid.

This commit is contained in:
pjanzen 2002-05-31 03:39:55 +00:00
parent d69f1ffac7
commit ef2c807a96
31 changed files with 66 additions and 190 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.11 2001/02/04 06:07:20 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.12 2002/05/31 03:39:55 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.5 1996/05/21 21:53:09 mrg Exp $ */
/*-
@ -49,7 +49,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.11 2001/02/04 06:07:20 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.12 2002/05/31 03:39:55 pjanzen Exp $";
#endif
#endif /* not lint */
@ -72,10 +72,6 @@ main(argc, argv)
int rval, ll;
struct text *kk;
/* revoke privs */
setegid(getgid());
setgid(getgid());
init(); /* Initialize everything */
signal(SIGINT, trapdel);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: arithmetic.c,v 1.9 2002/02/16 21:27:08 millert Exp $ */
/* $OpenBSD: arithmetic.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.9 2002/02/16 21:27:08 millert Exp $";
static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -121,10 +121,6 @@ main(argc, argv)
extern int optind;
int ch, cnt;
/* revoke privs */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "hr:o:")) != -1)
switch(ch) {
case 'o': {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.10 2001/07/09 07:04:27 deraadt Exp $ */
/* $OpenBSD: main.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.10 2001/07/09 07:04:27 deraadt Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -107,10 +107,6 @@ main (argc,argv)
char c; /* non-descript character storage */
long t; /* time for random num generator */
/* revoke privs */
setegid(getgid());
setgid(getgid());
signal(SIGINT, getout); /* trap interrupts */
initcurses();

View File

@ -1,4 +1,4 @@
/* $OpenBSD: teach.c,v 1.10 2001/07/09 07:04:28 deraadt Exp $ */
/* $OpenBSD: teach.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: teach.c,v 1.10 2001/07/09 07:04:28 deraadt Exp $";
static char rcsid[] = "$OpenBSD: teach.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -73,10 +73,6 @@ main(argc, argv)
{
int i;
/* revoke privs */
setegid(getgid());
setgid(getgid());
signal(SIGINT, getout);
initcurses();
text(hello);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: banner.c,v 1.7 1998/09/15 05:22:46 pjanzen Exp $ */
/* $OpenBSD: banner.c,v 1.8 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: banner.c,v 1.4 1995/04/22 11:55:15 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)banner.c 8.3 (Berkeley) 4/2/94";
#else
static char rcsid[] = "$OpenBSD: banner.c,v 1.7 1998/09/15 05:22:46 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: banner.c,v 1.8 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -1037,10 +1037,6 @@ main(argc, argv)
{
int ch;
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "w:tdh")) != -1)
switch (ch) {
case 'd':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bcd.c,v 1.7 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: bcd.c,v 1.8 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)bcd.c 8.2 (Berkeley) 3/20/94";
#else
static char rcsid[] = "$OpenBSD: bcd.c,v 1.7 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: bcd.c,v 1.8 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -141,10 +141,6 @@ main(argc, argv)
* but this seems kind of silly. So this one doesn't.
*/
/* revoke privs */
setegid(getgid());
setgid(getgid());
if (argc > 1) {
while (--argc)
printcard(*++argv);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bog.c,v 1.8 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: bog.c,v 1.9 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)bog.c 8.1 (Berkeley) 6/11/93";
#else
static char rcsid[] = "$OpenBSD: bog.c,v 1.8 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: bog.c,v 1.9 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -133,10 +133,6 @@ main(argc, argv)
int ch, done, i, sflag;
char *bspec, *p;
/* revoke */
setegid(getgid());
setgid(getgid());
seed = 0;
batch = debug = reuse = selfuse = sflag = 0;
bspec = NULL;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bs.c,v 1.12 2002/02/18 06:45:26 deraadt Exp $ */
/* $OpenBSD: bs.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* bs.c - original author: Bruce Holloway
* salvo option by: Chuck A DeGaul
@ -11,10 +11,10 @@
*/
#ifndef lint
static char rcsid[] = "$OpenBSD: bs.c,v 1.12 2002/02/18 06:45:26 deraadt Exp $";
static char rcsid[] = "$OpenBSD: bs.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $";
#endif
/* #define _POSIX_SOURCE */ /* (setegid, random) */
/* #define _POSIX_SOURCE */ /* ( random() ) */
#include <sys/param.h>
#include <sys/types.h>
@ -1347,10 +1347,6 @@ static int scount(int who)
int main(int argc, char *argv[])
{
/* revoke privs */
setegid(getgid());
setgid(getgid());
do_options(argc, argv);
intro();

View File

@ -1,4 +1,4 @@
/* $OpenBSD: caesar.c,v 1.9 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: caesar.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@ -51,7 +51,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: caesar.c,v 1.9 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: caesar.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -88,14 +88,10 @@ main(argc, argv)
int argc;
char **argv;
{
register int ch, dot, i, nread, winnerdot;
register char *inbuf, *p, **av;
int ch, dot, i, nread, winnerdot;
char *inbuf, *p, **av;
int obs[26], try, winner;
/* revoke privs */
setegid(getgid());
setgid(getgid());
/* check to see if we were called as rot13 */
av = argv;
p = strrchr(*av, '/');

View File

@ -1,4 +1,4 @@
/* $OpenBSD: factor.c,v 1.12 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: factor.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: factor.c,v 1.5 1995/03/23 08:28:07 cgd Exp $ */
/*
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95";
#else
static char rcsid[] = "$OpenBSD: factor.c,v 1.12 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: factor.c,v 1.13 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -107,10 +107,6 @@ main(argc, argv)
int ch;
char *p, buf[100]; /* > max number of digits. */
/* revoke privs */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != -1)
switch (ch) {
case '?':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: fish.c,v 1.10 2002/02/16 21:27:09 millert Exp $ */
/* $OpenBSD: fish.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: fish.c,v 1.10 2002/02/16 21:27:09 millert Exp $";
static char rcsid[] = "$OpenBSD: fish.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -107,10 +107,6 @@ main(argc, argv)
{
int ch, move;
/* revoke privs */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "ph")) != -1)
switch(ch) {
case 'p':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.11 2001/03/30 04:40:07 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.12 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@ -45,7 +45,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.11 2001/03/30 04:40:07 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.12 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -99,10 +99,6 @@ main(argc, argv)
};
char *tmpname;
/* revoke privs */
setegid(getgid());
setgid(getgid());
prog = strrchr(argv[0], '/');
if (prog)
prog++;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: grdc.c,v 1.10 2002/02/16 21:27:10 millert Exp $ */
/* $OpenBSD: grdc.c,v 1.11 2002/05/31 03:40:00 pjanzen Exp $ */
/*
* Grand digital clock for curses compatible terminals
* Usage: grdc [-s] [n] -- run for n seconds (default infinity)
@ -60,10 +60,6 @@ main(argc, argv)
struct timespec delay;
char *ep;
/* revoke privs */
setegid(getgid());
setgid(getgid());
scrol = 0;
while ((i = getopt(argc, argv, "sh")) != -1)
switch (i) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.6 1999/09/25 20:51:53 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.7 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.6 1999/09/25 20:51:53 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.7 2002/05/31 03:40:00 pjanzen Exp $";
#endif
#endif /* not lint */
@ -60,10 +60,6 @@ main(argc, argv)
{
int ch;
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "d:h")) != -1) {
switch (ch) {
case 'd':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: hunt.c,v 1.9 2002/02/16 21:27:10 millert Exp $ */
/* $OpenBSD: hunt.c,v 1.10 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */
/*
* Hunt
@ -78,10 +78,6 @@ main(ac, av)
int option;
struct servent *se;
/* Revoke privs: */
setegid(getgid());
setgid(getgid());
enter_status = env_init((long) Q_CLOAK);
while ((c = getopt(ac, av, "Sbcfh:l:mn:op:qst:w:")) != -1) {
switch (c) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: driver.c,v 1.11 2002/02/16 21:27:10 millert Exp $ */
/* $OpenBSD: driver.c,v 1.12 2002/05/31 03:40:00 pjanzen Exp $ */
/* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $ */
/*
* Hunt
@ -74,10 +74,6 @@ main(ac, av)
First_arg = av[0];
/* Revoke privs: */
setegid(getgid());
setgid(getgid());
config();
while ((c = getopt(ac, av, "sp:a:D:")) != -1) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mille.c,v 1.10 2001/09/03 21:36:12 pjanzen Exp $ */
/* $OpenBSD: mille.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: mille.c,v 1.4 1995/03/24 05:01:48 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: mille.c,v 1.10 2001/09/03 21:36:12 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: mille.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -62,10 +62,6 @@ main(ac, av)
{
bool restore;
/* revoke */
setegid(getgid());
setgid(getgid());
#ifdef DEBUG
if (strcmp(av[0], "a.out") == 0) {
outf = fopen("q", "w");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: initdeck.c,v 1.9 2002/02/16 21:27:10 millert Exp $ */
/* $OpenBSD: initdeck.c,v 1.10 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: initdeck.c,v 1.3 1995/03/23 08:34:43 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)initdeck.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: initdeck.c,v 1.9 2002/02/16 21:27:10 millert Exp $";
static char rcsid[] = "$OpenBSD: initdeck.c,v 1.10 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -88,10 +88,6 @@ main(ac, av)
{
int n;
/* revoke */
setegid(getgid());
setgid(getgid());
getargs(ac, av);
if ((inf = fopen(infile, "r")) == NULL)
err(1, "%s", infile);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: morse.c,v 1.8 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: morse.c,v 1.9 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1988, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: morse.c,v 1.8 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: morse.c,v 1.9 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -130,10 +130,6 @@ main(argc, argv)
int ch;
char *p;
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "dsh")) != -1)
switch((char)ch) {
case 'd':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: number.c,v 1.8 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: number.c,v 1.9 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)number.c 8.3 (Berkeley) 5/4/95";
#else
static char rcsid[] = "$OpenBSD: number.c,v 1.8 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: number.c,v 1.9 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -99,10 +99,6 @@ main(argc, argv)
int ch, first;
char line[LINELEN];
/* revoke */
setegid(getgid());
setgid(getgid());
lflag = 0;
while ((ch = getopt(argc, argv, "hl")) != -1)
switch (ch) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pig.c,v 1.7 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: pig.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: pig.c,v 1.2 1995/03/23 08:41:40 cgd Exp $ */
/*-
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)pig.c 8.2 (Berkeley) 5/4/95";
#else
static char rcsid[] = "$OpenBSD: pig.c,v 1.7 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: pig.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -69,10 +69,6 @@ main(argc, argv)
int ch;
char buf[1024];
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != -1)
switch(ch) {
case '?':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pom.c,v 1.7 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: pom.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $ */
/*
@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: pom.c,v 1.7 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: pom.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -103,10 +103,6 @@ main(argc, argv)
int cnt;
char buf[1024];
/* revoke */
setegid(getgid());
setgid(getgid());
if (argc > 1) {
tmpt = parsetime(argv[1]);
strftime(buf, sizeof(buf), "%a %Y %b %e %H:%M:%S (%Z)",

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ppt.c,v 1.6 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: ppt.c,v 1.7 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: ppt.c,v 1.4 1995/03/23 08:35:40 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ppt.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: ppt.c,v 1.6 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: ppt.c,v 1.7 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -59,12 +59,8 @@ main(argc, argv)
int argc;
char **argv;
{
register int c;
register char *p;
/* revoke */
setegid(getgid());
setgid(getgid());
int c;
char *p;
(void) puts("___________");
if (argc > 1)
@ -82,9 +78,9 @@ main(argc, argv)
static void
putppt(c)
register int c;
int c;
{
register int i;
int i;
(void) putchar('|');
for (i = 7; i >= 0; i--) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: primes.c,v 1.10 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: primes.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */
/*
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)primes.c 8.5 (Berkeley) 5/10/95";
#else
static char rcsid[] = "$OpenBSD: primes.c,v 1.10 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: primes.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -123,10 +123,6 @@ main(argc, argv)
int ch;
char *p;
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != -1)
switch (ch) {
case '?':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: quiz.c,v 1.10 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: quiz.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: quiz.c,v 1.9 1995/04/22 10:16:58 cgd Exp $ */
/*-
@ -48,7 +48,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
#else
static char rcsid[] = "$OpenBSD: quiz.c,v 1.10 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: quiz.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -86,10 +86,6 @@ main(argc, argv)
int ch;
const char *indexfile;
/* revoke */
setegid(getgid());
setgid(getgid());
indexfile = _PATH_QUIZIDX;
while ((ch = getopt(argc, argv, "i:t")) != -1)
switch(ch) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: rain.c,v 1.10 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: rain.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rain.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: rain.c,v 1.10 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: rain.c,v 1.11 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -76,10 +76,6 @@ main(argc, argv)
int ch;
int xpos[5], ypos[5];
/* revoke */
setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "d:h")) != -1)
switch(ch) {
case 'd':

View File

@ -1,4 +1,4 @@
/* $OpenBSD: random.c,v 1.7 2002/02/16 21:27:11 millert Exp $ */
/* $OpenBSD: random.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)random.c 8.5 (Berkeley) 4/5/94";
#else
static char rcsid[] = "$OpenBSD: random.c,v 1.7 2002/02/16 21:27:11 millert Exp $";
static char rcsid[] = "$OpenBSD: random.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -74,10 +74,6 @@ main(argc, argv)
int ch, random_exit, selected, unbuffer_output;
char *ep;
/* revoke privs */
setegid(getgid());
setgid(getgid());
random_exit = unbuffer_output = 0;
while ((ch = getopt(argc, argv, "erh")) != -1)
switch (ch) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.7 1999/03/12 03:02:42 pjanzen Exp $ */
/* $OpenBSD: main.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.4 1995/04/22 10:59:10 cgd Exp $ */
/*
@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: main.c,v 1.7 1999/03/12 03:02:42 pjanzen Exp $";
static char rcsid[] = "$OpenBSD: main.c,v 1.8 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -143,10 +143,6 @@ main(argc, argv)
register int ac;
register char **av;
/* revoke privs */
setegid(getgid());
setgid(getgid());
av = argv;
ac = argc;
av++;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: worm.c,v 1.15 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: worm.c,v 1.16 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: worm.c,v 1.15 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: worm.c,v 1.16 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -110,10 +110,6 @@ main(argc, argv)
struct timezone tz;
fd_set rset;
/* revoke */
setegid(getgid());
setgid(getgid());
FD_ZERO(&rset);
setbuf(stdout, outbuf);
srandom(getpid());

View File

@ -1,4 +1,4 @@
/* $OpenBSD: worms.c,v 1.11 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: worms.c,v 1.12 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: worms.c,v 1.11 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: worms.c,v 1.12 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -199,10 +199,6 @@ main(argc, argv)
const char *field;
u_int delay = 0;
/* revoke */
setegid(getgid());
setgid(getgid());
length = 16;
number = 3;
trail = ' ';

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wump.c,v 1.17 2002/02/16 21:27:12 millert Exp $ */
/* $OpenBSD: wump.c,v 1.18 2002/05/31 03:40:01 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93";
#else
static char rcsid[] = "$OpenBSD: wump.c,v 1.17 2002/02/16 21:27:12 millert Exp $";
static char rcsid[] = "$OpenBSD: wump.c,v 1.18 2002/05/31 03:40:01 pjanzen Exp $";
#endif
#endif /* not lint */
@ -155,10 +155,6 @@ main(argc, argv)
{
int c;
/* revoke */
setegid(getgid());
setgid(getgid());
#ifdef DEBUG
while ((c = getopt(argc, argv, "a:b:hop:r:t:d")) != -1)
#else