BINGRP?= games
.if defined(HIDEGAME)
BINDIR?= /usr/games/hide
-BINMODE?= 2550
+BINMODE?= 550
.else
BINDIR?= /usr/games
.endif
extern char *default_game(), *okay_game();
extern void log_score(), quit(), update();
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
start_time = seed = time(0);
register char c; /* non-descript character storage */
long t; /* time for random num generator */
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
/* initialization */
{
register int i;
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
signal (2,getout);
{
int ch;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "w:td")) != EOF)
* but this seems kind of silly. So this one doesn't.
*/
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
if (argc > 1) {
-/* $OpenBSD: bs.c,v 1.2 1996/12/19 22:21:13 deraadt Exp $ */
+/* $OpenBSD: bs.c,v 1.3 1996/12/22 20:01:00 deraadt Exp $ */
/*
* bs.c - original author: Bruce Holloway
* salvo option by: Chuck A DeGaul
int argc;
char *argv[];
{
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
do_options(argc, argv);
int obs[26], try, winner;
char *malloc(), *strerror();
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
if (argc > 1)
raw();
noecho();
initall();
- setgid(getgid()); /* revoke */
+
+ /* revoke privs */
+ setegid(getgid());
+ setgid(getgid());
+
instruct();
makeboard();
for (;;) {
perror(_PATH_SCORE);
exit(2);
}
- setgid(getgid()); /* revoke */
+
+ /* revoke privs */
+ setegid(getgid());
+ setgid(getgid());
+
setpwent();
if (argc == 1) {
uid = getuid();
int ch;
char *p, buf[100]; /* > max number of digits. */
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != EOF)
-/* $OpenBSD: main.c,v 1.4 1996/12/21 21:17:51 tholo Exp $ */
+/* $OpenBSD: main.c,v 1.5 1996/12/22 20:01:16 deraadt Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
"%3d %-6s"
};
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
prog = strrchr(argv[0], '/');
-/* $OpenBSD: grdc.c,v 1.2 1996/12/19 22:21:30 deraadt Exp $ */
+/* $OpenBSD: grdc.c,v 1.3 1996/12/22 20:01:17 deraadt Exp $ */
/*
* Grand digital clock for curses compatible terminals
* Usage: grdc [-s] [n] -- run for n seconds (default infinity)
initscr();
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
signal(SIGINT,sighndl);
&& strcmp(dir, HACKDIR) /* and not the default? */
#endif
) {
- (void) setuid(getuid()); /* Ron Wessels */
- (void) setgid(getgid());
+ /* revoke */
+ setegid(getgid());
+ setgid(getgid());
}
#endif
f = fork();
if(f == 0){ /* child */
settty((char *) 0); /* also calls end_screen() */
- (void) setuid(getuid());
- (void) setgid(getgid());
+ /* revoke */
+ setegid(getgid());
+ setgid(getgid());
#ifdef CHDIR
(void) chdir(getenv("HOME"));
#endif CHDIR
{
void die();
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
initscr();
register bool restore;
- setgid(getgid()); /* run as the user */
+ /* revoke */
+ setegid(getgid());
+ setgid(getgid());
if (strcmp(av[0], "a.out") == 0) {
outf = fopen("q", "w");
char *av[]; {
int n;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
getargs(ac, av);
register int ch;
register char *p;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "s")) != EOF)
int ch, first;
char line[256];
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
lflag = 0;
int ch;
char buf[1024];
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != EOF)
double days, today, tomorrow;
int cnt;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
if (gettimeofday(&tp,&tzp)) {
register int c;
register char *p;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
(void) puts("___________");
int ch;
char *p;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
while ((ch = getopt(argc, argv, "")) != EOF)
register int ch;
char *indexfile;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
indexfile = _PATH_QUIZIDX;
struct winsize ws;
#endif
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
if (!(term = getenv("TERM"))) {
int ch, random_exit, selected, unbuffer_output;
char *ep;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
random_exit = unbuffer_output = 0;
extern int Max_per_uid;
void quit();
+ /* revoke */
+ setegid(getgid());
+ setgid(getgid());
+
show_only = FALSE;
if (ac > 1) {
bad_arg = FALSE;
if (isdigit(av[0][0]))
Max_per_uid = atoi(av[0]);
else {
- setuid(getuid());
- setgid(getgid());
Scorefile = av[0];
# ifdef FANCY
sp = rindex(Scorefile, '/');
rawscores = open(_PATH_RAWSCORES, O_RDWR|O_CREAT, 0644);
logfile = fopen(_PATH_LOGFILE, "a");
+
+ /* revoke privs */
+ setegid(getgid());
setgid(getgid());
(void)time(&tv);
struct passwd *p;
fd = fopen(recfile, "r");
- setgid(getgid());
+
if (fd == NULL) {
perror(recfile);
exit(1);
}
+
+ /* revoke privs */
+ setegid(getgid());
+ setgid(getgid());
+
printf("Snake players scores to date\n");
fread(&whoallbest, sizeof(short), 1, fd);
fread(&allbest, sizeof(short), 1, fd);
{
char ch;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
if (argc == 2)
struct winsize ws;
#endif
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
length = 16;
extern char *optarg;
int c;
+ /* revoke */
+ setegid(getgid());
setgid(getgid());
#ifdef DEBUG