Commit Graph

16 Commits

Author SHA1 Message Date
dholland ae56ae8f3f Use __dead and __printflike instead of __attribute__. 2011-08-26 06:18:16 +00:00
dholland 1e99780e5d sprinkle static 2009-08-12 08:44:45 +00:00
dholland 130a8172b6 ANSIfy. Remove unnecessary casts. Clean up for -Wsign-compare. Make more
things file-static. Other minor tidyups, and fix a couple minor bugs found
along the way.
2008-01-14 03:50:01 +00:00
dholland 23c02a454f Whitespace/KNF nits. 2008-01-14 00:23:51 +00:00
dholland e94a5bc9f9 Comprehensive (or at least extensive) string handling cleanup for rogue.
This patch dates (mostly) back to 2002; the critical parts of it were
handled back then by security-officer. As far as I know, there's
nothing exploitable fixed herein.

A slightly earlier version of this patch was reviewed by Christian Biere
when I filed it as PR 34750.
2007-12-27 23:52:59 +00:00
agc e5aeb4ea46 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
2003-08-07 09:36:50 +00:00
tron 10f663ea7a Make "rogue" build with "WARNS=2". The necessary patches were supplied
by David A. Holland in PR bin/17498.
2002-07-07 09:35:07 +00:00
wiz e65cad56b9 Fix for FreeBSD/13278, from FreeBSD:
When a game ends that makes the top 10, the function insert_score in
score.c is called to make the new score file.  But the case for KFIRE
(killed by fire) incorrectly uses strcpy instead of strcat (all the
other cases use strcat).  This puts the string in the wrong place and
corrupts the score file.
2001-08-09 13:02:49 +00:00
jsm 5367f3400c Security improvements for games (largely from or inspired by OpenBSD).
Games which run setgid from dm, but don't need to, should drop their
privileges at startup.

Games which have a scorefile should open it at startup, then drop all
privileges leaving just the open writable file descriptor.  If the
game can invoke subprocesses, this should be made close-on-exec.

Games with scorefiles should make sure they do not get a file
descriptor < 3.  (Otherwise, they could get confused and corrupt the
scorefile when using stdin, stdout or stderr.)

Some old setuid revokes from the days of setuid games change into gid
revokes.
1999-09-12 09:02:20 +00:00
hubertf 6d265b3268 constify, per PR 6148 1998-11-10 13:01:31 +00:00
lukem 2736b51163 WARNSify (not an insignificant task...) 1997-10-12 11:45:01 +00:00
cgd 7ee35daafd clean up import, NetBSD RCS Ids 1995-04-22 10:27:22 +00:00
cgd 02357d57aa new curses update 1993-11-10 10:02:16 +00:00
mycroft e6923339bf Use `r+' rather than `a+' when opening score file. 1993-09-23 22:28:42 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00