summaryrefslogtreecommitdiffstats
path: root/games/hack/Makefile
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-09-24 08:58:44 +0000
committerache <ache@FreeBSD.org>1997-09-24 08:58:44 +0000
commitc332edcb082f1bf06a3a5702ff16593fe53d00dc (patch)
treeddd06bffa163ae4d5c0cf72c60c0c757edc62a68 /games/hack/Makefile
parent8a2532864c311362e03def0330257451972d754a (diff)
downloadFreeBSD-src-c332edcb082f1bf06a3a5702ff16593fe53d00dc.zip
FreeBSD-src-c332edcb082f1bf06a3a5702ff16593fe53d00dc.tar.gz
Make hack suid "games" (additionly to sgid "games" as run),
it is needed for savegames and bones, they intendent to not be altered by user and can't be pre-created as scorefile. Clear savegames on install: target too, not only bones Install rumors not readable by all. Cleanup includes a little.
Diffstat (limited to 'games/hack/Makefile')
-rw-r--r--games/hack/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/games/hack/Makefile b/games/hack/Makefile
index 439b06c..03b8dff 100644
--- a/games/hack/Makefile
+++ b/games/hack/Makefile
@@ -20,6 +20,13 @@ HIDEGAME=hidegame
DPSRCS+= hack.onames.h
CLEANFILES+= hack.onames.h makedefs
+#
+# Need to be suid for created savefiles and bones, they must not be
+# altered by user
+#
+BINOWN= games
+BINMODE= 4550
+
.depend: hack.onames.h
hack.onames.h: makedefs def.objects.h
@@ -33,11 +40,12 @@ beforeinstall:
${DESTDIR}/var/games/hackdir/perm
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/hackdir/record
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/rumors \
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 ${.CURDIR}/rumors \
${DESTDIR}/var/games/hackdir/rumors
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${.CURDIR}/help ${.CURDIR}/hh ${.CURDIR}/data \
${DESTDIR}/var/games/hackdir
- rm -f ${DESTDIR}/var/games/hackdir/bones*
+ rm -f ${DESTDIR}/var/games/hackdir/bones* \
+ ${DESTDIR}/var/games/hackdir/save/*
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud