diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/canfield/canfield/Makefile | 3 | ||||
-rw-r--r-- | games/canfield/canfield/canfield.6 | 2 | ||||
-rw-r--r-- | games/canfield/canfield/canfield.c | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/games/canfield/canfield/Makefile b/games/canfield/canfield/Makefile index 7b60e29..a3b3a7c 100644 --- a/games/canfield/canfield/Makefile +++ b/games/canfield/canfield/Makefile @@ -7,6 +7,9 @@ LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame MLINKS= canfield.6 cfscores.6 +beforeinstall: + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ + ${DESTDIR}/var/games/cfscores .include "../../Makefile.inc" .include <bsd.prog.mk> diff --git a/games/canfield/canfield/canfield.6 b/games/canfield/canfield/canfield.6 index 2670f73..dcf5fc1 100644 --- a/games/canfield/canfield/canfield.6 +++ b/games/canfield/canfield/canfield.6 @@ -108,7 +108,7 @@ played the game since the database was set up. .br /usr/games/cfscores the database printer .br -/usr/games/lib/cfscores the database of scores +/var/games/cfscores the database of scores .SH BUGS It is impossible to cheat. .SH AUTHORS diff --git a/games/canfield/canfield/canfield.c b/games/canfield/canfield/canfield.c index f13fed6..5380434 100644 --- a/games/canfield/canfield/canfield.c +++ b/games/canfield/canfield/canfield.c @@ -58,6 +58,8 @@ static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93"; #include <ctype.h> #include <signal.h> #include <termios.h> +#include <unistd.h> +#include <stdlib.h> #include "pathnames.h" @@ -1567,9 +1569,10 @@ initall() { int i; - srandom(getpid()); + srandomdev(); time(&acctstart); initdeck(deck); + uid = getuid(); if (uid < 0) uid = 0; dbfd = open(_PATH_SCORE, 2); @@ -1692,10 +1695,6 @@ main(argc, argv) noecho(); initall(); - /* revoke privs */ - setegid(getgid()); - setgid(getgid()); - instruct(); makeboard(); for (;;) { |