diff --git a/games/atc/Makefile b/games/atc/Makefile index 64f388cd5838..f129096f13de 100644 --- a/games/atc/Makefile +++ b/games/atc/Makefile @@ -7,12 +7,14 @@ SRCS= extern.c grammar.c graphics.c input.c lex.c list.c log.c \ MAN6= atc.6 DPADD= ${LIBL} ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ll -lm -lcurses -ltermcap -lcompat -GAMES= ATC_scores Game_List Killer crossover default easy game_2 +GAMES= Game_List Killer crossover default easy game_2 CLEANFILES=grammar.c y.tab.h lex.c HIDEGAME=hidegame beforeinstall: - (cd ${.CURDIR}/games; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 400 \ + (cd ${.CURDIR}/games; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 440 \ ${GAMES} ${DESTDIR}${SHAREDIR}/games/atc) + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/games/ATC_scores \ + ${DESTDIR}/var/games/atc_score .include diff --git a/games/atc/atc.6 b/games/atc/atc.6 index a14e27d6c647..e16dbc641a59 100644 --- a/games/atc/atc.6 +++ b/games/atc/atc.6 @@ -576,11 +576,9 @@ line: [ ( 1 1 ) ( 6 6 ) ] Files are kept in a special directory. See the OPTIONS for a way to print this path out. .TP 16 -.B ATC_score -Where the scores are kept. +/var/games/atc_score Where the scores are kept. .TP 16 -.B Game_List -The list of playable games. +/usr/share/games/atc/Game_List The list of playable games. .SH AUTHOR .LP Ed James, UC Berkeley: edjames@ucbvax.berkeley.edu, ucbvax!edjames diff --git a/games/atc/log.c b/games/atc/log.c index 71f016767928..9206dc1ec6b0 100644 --- a/games/atc/log.c +++ b/games/atc/log.c @@ -100,7 +100,7 @@ log_score(list_em) #endif umask(0); - fd = open(_PATH_SCORE, O_CREAT|O_RDWR, 0644); + fd = open(_PATH_SCORE, O_CREAT|O_RDWR, 0664); if (fd < 0) { perror(_PATH_SCORE); return (-1); diff --git a/games/atc/main.c b/games/atc/main.c index 6ba227cf2de1..4f4eddb3732c 100644 --- a/games/atc/main.c +++ b/games/atc/main.c @@ -59,7 +59,7 @@ static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; main(ac, av) char *av[]; { - int seed; + int seed = 0; int f_usage = 0, f_list = 0, f_showscore = 0; int f_printpath = 0; char *file = NULL; @@ -70,11 +70,7 @@ main(ac, av) extern char *default_game(), *okay_game(); extern void log_score(), quit(), update(); - /* revoke privs */ - setegid(getgid()); - setgid(getgid()); - - start_time = seed = time(0); + start_time = time(0); name = *av++; while (*av) { @@ -102,7 +98,8 @@ main(ac, av) f_printpath++; break; case 'r': - seed = atoi(*av); + srandom(atoi(*av)); + seed = 1; av++; break; case 'f': @@ -119,7 +116,8 @@ main(ac, av) ptr++; } } - srandom(seed); + if (!seed) + srandomdev(); if (f_usage) fprintf(stderr,