diff options
author | ache <ache@FreeBSD.org> | 1997-09-24 03:28:24 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-09-24 03:28:24 +0000 |
commit | 88bcce4b0769b47cf4361d6b4490d8ced3c0ceac (patch) | |
tree | ad5305d1e0e6cf4eb9dd58ce8664abc92fa0f867 /games | |
parent | d6530ba40d9771bd76656602debadbc1c34f5883 (diff) | |
download | FreeBSD-src-88bcce4b0769b47cf4361d6b4490d8ced3c0ceac.zip FreeBSD-src-88bcce4b0769b47cf4361d6b4490d8ced3c0ceac.tar.gz |
Installed scenarios was unreadable with change games uid->gid, fix it
Beforeinstall score file to the right place
Use srandomdev
Remove revoke, it broke scores and scenarios
Fix names in FILES manpage section
Diffstat (limited to 'games')
-rw-r--r-- | games/atc/Makefile | 6 | ||||
-rw-r--r-- | games/atc/atc.6 | 6 | ||||
-rw-r--r-- | games/atc/log.c | 2 | ||||
-rw-r--r-- | games/atc/main.c | 14 |
4 files changed, 13 insertions, 15 deletions
diff --git a/games/atc/Makefile b/games/atc/Makefile index 64f388c..f129096 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 <bsd.prog.mk> diff --git a/games/atc/atc.6 b/games/atc/atc.6 index a14e27d..e16dbc6 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 71f0167..9206dc1 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 6ba227c..4f4eddb 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, |