Use setgid(), not setregid().
This commit is contained in:
parent
de328af944
commit
f9eca6973d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.15 2000/05/08 07:55:59 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.14 1999/07/16 01:38:20 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.15 2000/05/08 07:55:59 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -74,7 +74,7 @@ main(argc, argv)
|
||||
struct text *kk;
|
||||
|
||||
/* revoke setgid privileges from dm */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
init(); /* Initialize everything */
|
||||
signal(SIGINT, trapdel);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $ */
|
||||
/* $NetBSD: arithmetic.c,v 1.15 2000/05/08 07:56:00 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $");
|
||||
__RCSID("$NetBSD: arithmetic.c,v 1.15 2000/05/08 07:56:00 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -121,7 +121,7 @@ main(argc, argv)
|
||||
int ch, cnt;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
while ((ch = getopt(argc, argv, "r:o:")) != -1)
|
||||
switch(ch) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.10 1999/07/24 15:50:44 mjl Exp $ */
|
||||
/* $NetBSD: main.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -55,7 +55,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.10 1999/07/24 15:50:44 mjl Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -80,7 +80,7 @@ main(ac, av)
|
||||
|
||||
/* Open the score file then revoke setgid privileges */
|
||||
open_score_file();
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
start_time = seed = time(NULL);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.16 2000/05/08 07:56:01 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.16 2000/05/08 07:56:01 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -102,7 +102,7 @@ main(argc, argv)
|
||||
long t; /* time for random num generator */
|
||||
|
||||
/* revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
/* initialization */
|
||||
bflag = 2; /* default no board */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: teach.c,v 1.10 1999/08/14 16:29:23 tron Exp $ */
|
||||
/* $NetBSD: teach.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: teach.c,v 1.10 1999/08/14 16:29:23 tron Exp $");
|
||||
__RCSID("$NetBSD: teach.c,v 1.11 2000/05/08 07:56:01 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -73,7 +73,7 @@ main(argc, argv)
|
||||
int i;
|
||||
|
||||
/* revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
signal(SIGINT, getout);
|
||||
if (tcgetattr(0, &old) == -1) /* get old tty mode */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: battlestar.c,v 1.9 1999/09/18 16:40:04 jsm Exp $ */
|
||||
/* $NetBSD: battlestar.c,v 1.10 2000/05/08 07:56:01 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)battlestar.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: battlestar.c,v 1.9 1999/09/18 16:40:04 jsm Exp $");
|
||||
__RCSID("$NetBSD: battlestar.c,v 1.10 2000/05/08 07:56:01 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -68,7 +68,7 @@ main(argc, argv)
|
||||
|
||||
/* Open the score file then revoke setgid privileges */
|
||||
open_score_file();
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
initialize((argc < 2) ? NULL : (strcmp(argv[1], "-r") ? argv[1]
|
||||
: (argv[2] ? argv[2]
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bcd.c,v 1.9 1999/07/28 02:12:33 hubertf Exp $ */
|
||||
/* $NetBSD: bcd.c,v 1.10 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)bcd.c 8.2 (Berkeley) 3/20/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: bcd.c,v 1.9 1999/07/28 02:12:33 hubertf Exp $");
|
||||
__RCSID("$NetBSD: bcd.c,v 1.10 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -138,7 +138,7 @@ main(argc, argv)
|
||||
char cardline[80];
|
||||
|
||||
/* revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
/*
|
||||
* The original bcd prompts with a "%" when reading from stdin,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bog.c,v 1.15 1999/09/19 09:42:38 jsm Exp $ */
|
||||
/* $NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: bog.c,v 1.15 1999/09/19 09:42:38 jsm Exp $");
|
||||
__RCSID("$NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -135,7 +135,7 @@ main(argc, argv)
|
||||
char *bspec, *p;
|
||||
|
||||
/* revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
seed = 0;
|
||||
batch = debug = reuse = selfuse = sflag = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: caesar.c,v 1.10 2000/01/09 17:17:20 jsm Exp $ */
|
||||
/* $NetBSD: caesar.c,v 1.11 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: caesar.c,v 1.10 2000/01/09 17:17:20 jsm Exp $");
|
||||
__RCSID("$NetBSD: caesar.c,v 1.11 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -93,7 +93,7 @@ main(argc, argv)
|
||||
int obs[26], try, winner;
|
||||
|
||||
/* revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
winnerdot = 0;
|
||||
if (argc > 1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: canfield.c,v 1.16 2000/04/27 00:30:52 jdc Exp $ */
|
||||
/* $NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: canfield.c,v 1.16 2000/04/27 00:30:52 jdc Exp $");
|
||||
__RCSID("$NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -1686,7 +1686,7 @@ initall()
|
||||
dbfd = open(_PATH_SCORE, O_RDWR);
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
if (dbfd < 0)
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cfscores.c,v 1.8 1999/09/12 09:02:20 jsm Exp $ */
|
||||
/* $NetBSD: cfscores.c,v 1.9 2000/05/08 07:56:03 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cfscores.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: cfscores.c,v 1.8 1999/09/12 09:02:20 jsm Exp $");
|
||||
__RCSID("$NetBSD: cfscores.c,v 1.9 2000/05/08 07:56:03 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -80,7 +80,7 @@ main(argc, argv)
|
||||
int uid;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
if (argc > 2) {
|
||||
printf("Usage: cfscores [user]\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crib.c,v 1.12 1999/09/12 09:02:21 jsm Exp $ */
|
||||
/* $NetBSD: crib.c,v 1.13 2000/05/08 07:56:03 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)crib.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: crib.c,v 1.12 1999/09/12 09:02:21 jsm Exp $");
|
||||
__RCSID("$NetBSD: crib.c,v 1.13 2000/05/08 07:56:03 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -80,7 +80,7 @@ main(argc, argv)
|
||||
exit(1);
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
/* Set close-on-exec flag on log file */
|
||||
if (f != NULL) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fish.c,v 1.12 2000/03/28 19:37:54 tron Exp $ */
|
||||
/* $NetBSD: fish.c,v 1.13 2000/05/08 07:56:03 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fish.c,v 1.12 2000/03/28 19:37:54 tron Exp $");
|
||||
__RCSID("$NetBSD: fish.c,v 1.13 2000/05/08 07:56:03 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -107,7 +107,7 @@ main(argc, argv)
|
||||
int ch, move;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
while ((ch = getopt(argc, argv, "p")) != -1)
|
||||
switch(ch) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.9 1999/09/13 17:18:58 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.10 2000/05/08 07:56:03 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.9 1999/09/13 17:18:58 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.10 2000/05/08 07:56:03 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -99,7 +99,7 @@ main(argc, argv)
|
||||
};
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
color = curmove = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.8 1999/09/17 20:45:49 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.9 2000/05/08 07:56:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.8 1999/09/17 20:45:49 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.9 2000/05/08 07:56:04 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -60,7 +60,7 @@ main(argc, argv)
|
||||
int ch;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
while ((ch = getopt(argc, argv, "d:")) != -1) {
|
||||
switch (ch) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mille.c,v 1.9 1999/09/12 09:02:21 jsm Exp $ */
|
||||
/* $NetBSD: mille.c,v 1.10 2000/05/08 07:56:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mille.c,v 1.9 1999/09/12 09:02:21 jsm Exp $");
|
||||
__RCSID("$NetBSD: mille.c,v 1.10 2000/05/08 07:56:04 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -62,7 +62,7 @@ main(ac, av)
|
||||
bool restore;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
if (strcmp(av[0], "a.out") == 0) {
|
||||
outf = fopen("q", "w");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: monop.c,v 1.10 2000/01/09 17:17:20 jsm Exp $ */
|
||||
/* $NetBSD: monop.c,v 1.11 2000/05/08 07:56:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: monop.c,v 1.10 2000/01/09 17:17:20 jsm Exp $");
|
||||
__RCSID("$NetBSD: monop.c,v 1.11 2000/05/08 07:56:04 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -68,7 +68,7 @@ main(ac, av)
|
||||
char *av[];
|
||||
{
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
srand(getpid());
|
||||
if (ac > 1) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: morse.c,v 1.8 1999/09/12 09:02:22 jsm Exp $ */
|
||||
/* $NetBSD: morse.c,v 1.9 2000/05/08 07:56:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: morse.c,v 1.8 1999/09/12 09:02:22 jsm Exp $");
|
||||
__RCSID("$NetBSD: morse.c,v 1.9 2000/05/08 07:56:04 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -115,7 +115,7 @@ main(argc, argv)
|
||||
char *s, *p;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
while ((ch = getopt(argc, argv, "ds")) != -1)
|
||||
switch((char)ch) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ppt.c,v 1.7 1999/12/16 13:38:28 jsm Exp $ */
|
||||
/* $NetBSD: ppt.c,v 1.8 2000/05/08 07:56:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ppt.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: ppt.c,v 1.7 1999/12/16 13:38:28 jsm Exp $");
|
||||
__RCSID("$NetBSD: ppt.c,v 1.8 2000/05/08 07:56:04 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -62,7 +62,7 @@ main(argc, argv)
|
||||
char *p;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
(void) puts("___________");
|
||||
if (argc > 1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quiz.c,v 1.17 1999/12/16 13:45:48 jsm Exp $ */
|
||||
/* $NetBSD: quiz.c,v 1.18 2000/05/08 07:56:05 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: quiz.c,v 1.17 1999/12/16 13:45:48 jsm Exp $");
|
||||
__RCSID("$NetBSD: quiz.c,v 1.18 2000/05/08 07:56:05 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -89,7 +89,7 @@ main(argc, argv)
|
||||
const char *indexfile;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
indexfile = _PATH_QUIZIDX;
|
||||
while ((ch = getopt(argc, argv, "i:t")) != -1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.15 2000/01/19 19:43:42 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.15 2000/01/19 19:43:42 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -71,7 +71,7 @@ main(ac, av)
|
||||
exit(1);
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
show_only = FALSE;
|
||||
Num_games = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: snake.c,v 1.15 1999/10/26 06:38:31 cgd Exp $ */
|
||||
/* $NetBSD: snake.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: snake.c,v 1.15 1999/10/26 06:38:31 cgd Exp $");
|
||||
__RCSID("$NetBSD: snake.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -163,7 +163,7 @@ main(argc, argv)
|
||||
warn("fopen %s", _PATH_LOGFILE);
|
||||
sleep(2);
|
||||
}
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
(void) time(&tv);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: snscore.c,v 1.12 2000/01/21 00:27:03 jsm Exp $ */
|
||||
/* $NetBSD: snscore.c,v 1.13 2000/05/08 07:56:05 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)snscore.c 8.1 (Berkeley) 7/19/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: snscore.c,v 1.12 2000/01/21 00:27:03 jsm Exp $");
|
||||
__RCSID("$NetBSD: snscore.c,v 1.13 2000/05/08 07:56:05 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -79,7 +79,7 @@ main()
|
||||
struct passwd *p;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
fd = fopen(recfile, "r");
|
||||
if (fd == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.8 1999/09/18 19:38:56 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.9 2000/05/08 07:56:06 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.8 1999/09/18 19:38:56 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.9 2000/05/08 07:56:06 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -177,7 +177,7 @@ char **argv;
|
||||
struct termios argp;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
av = argv;
|
||||
ac = argc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: worm.c,v 1.18 2000/01/09 17:17:21 jsm Exp $ */
|
||||
/* $NetBSD: worm.c,v 1.19 2000/05/08 07:56:06 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: worm.c,v 1.18 2000/01/09 17:17:21 jsm Exp $");
|
||||
__RCSID("$NetBSD: worm.c,v 1.19 2000/05/08 07:56:06 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -102,7 +102,7 @@ main(argc, argv)
|
||||
{
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
if (argc == 2)
|
||||
start_len = atoi(argv[1]);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wump.c,v 1.12 1999/09/12 09:02:24 jsm Exp $ */
|
||||
/* $NetBSD: wump.c,v 1.13 2000/05/08 07:56:06 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: wump.c,v 1.12 1999/09/12 09:02:24 jsm Exp $");
|
||||
__RCSID("$NetBSD: wump.c,v 1.13 2000/05/08 07:56:06 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -148,7 +148,7 @@ main(argc, argv)
|
||||
int c;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
setregid(getgid(), getgid());
|
||||
setgid(getgid());
|
||||
|
||||
#ifdef DEBUG
|
||||
while ((c = getopt(argc, argv, "a:b:hp:r:t:d")) != -1)
|
||||
|
Loading…
Reference in New Issue
Block a user