Commit Graph

47 Commits

Author SHA1 Message Date
blymn 7147df1ef5 Change deprecated curses call to new equivalent. 2001-12-06 12:19:44 +00:00
wiz e7a85c433d Fix pasto. From FreeBSD. 2001-08-09 13:09:59 +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
christos 16263c885d remove duplicate decls 2001-02-05 01:04:25 +00:00
itojun d303927592 printf() pedant - do not pass variable alone, use %s.
idea from openbsd.  after looking at freebsd commit msgs from kris@freebsd.
2000-07-10 10:19:25 +00:00
matt 3233065035 More include additions for exit, abs, strcmp, etc. 2000-07-03 03:57:39 +00:00
soren 3872dc30f7 Fix doubled 'the'. 2000-03-13 22:53:22 +00:00
jsm 20e3305006 Fix -Wsign-compare warnings. 1999-09-18 19:38:46 +00:00
jsm 34d9941aa7 Fix buffer overrun in rogue. 1999-09-13 17:19:55 +00:00
jsm 50ab22237f Remove rogue's old and bit-rotten cut-down version of curses. 1999-09-13 17:14:07 +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
jsm a9c7f9b096 Check for failure of malloc() and calloc() at various places in the games. 1999-09-09 17:27:58 +00:00
jsm b03d4fa882 Add `__noreturn__' and `__unused__' attributes where appropriate to
the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Most noreturn attributes were previously added in bin/6144, with some
others that were missed then in bin/8082.  Previous `unused'
attributes were covered in bin/6557, bin/8058 and other PRs (all these
PRs have already been handled and closed).
1999-09-08 21:45:25 +00:00
abs 190c71aa67 s/SETUIDGAME/SETGIDGAME/ - catch up with the rest of the world. 1999-04-05 08:04:48 +00:00
hubertf 6d265b3268 constify, per PR 6148 1998-11-10 13:01:31 +00:00
hubertf 1c9494f62b mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>) 1998-09-13 15:27:25 +00:00
hubertf eb2507ecb2 fix prototype, per PR#5867 1998-09-11 14:11:57 +00:00
hubertf 3fd99e1631 fix prototypes, per PR#5867 1998-09-11 14:09:27 +00:00
hubertf 0ef663b102 fix prototype of mon_sees(), per PR#5867 1998-09-11 14:07:51 +00:00
mycroft a6bb9f4ef1 const poisoning. 1998-07-27 01:12:35 +00:00
hubertf d6a8a3d395 As per PR bin/5806 by Joseph Myers <jsm28@cam.ac.uk>/lash@tellabs.com:
- Init Random by time, not by pid
 - Fix lossage with fire-spitting, monster-killing dragons
1998-07-21 07:01:54 +00:00
jtc 2065ddb3da Simply include -lcurses instead of -lcurses -ltermcap 1998-02-18 22:37:30 +00:00
christos 85bf72e14e Remove -lcompat; not needed 1998-02-04 10:21:50 +00:00
mrg 6074e1b476 install games that need it setgid. 1997-11-20 00:12:30 +00:00
lukem 009fbbc126 use CPPFLAGS instead of CFLAGS 1997-10-22 05:05:21 +00:00
mycroft 71b1a37798 Better fix for the previous. 1997-10-15 12:43:35 +00:00
is adbd0f4b08 make gcc happy on Sparc 1997-10-15 09:27:06 +00:00
lukem 2736b51163 WARNSify (not an insignificant task...) 1997-10-12 11:45:01 +00:00
mycroft e96e918e60 Use bsd.subdir.mk as appropriate. 1997-10-11 09:34:07 +00:00
pk 58efb9d20c NULL => 0 (Arne Juul; PR#3629) 1997-05-17 19:24:44 +00:00
tls 2ea7b8f11a Sync to 4.4BSD-Lite2 1997-01-07 12:24:57 +00:00
mycroft c35b410216 Use POSIX tty semantics. 1995-04-28 23:49:19 +00:00
cgd c4816c32b3 Various changes to make games compile w/o warnings on the alpha:
Include appropriate includes, delete bogus function declarations,
change sizes of variables and casts.
1995-04-24 12:21:37 +00:00
cgd 75fd9356ae don't forget to install the docs. 1995-04-22 11:18:35 +00:00
cgd 7ee35daafd clean up import, NetBSD RCS Ids 1995-04-22 10:27:22 +00:00
cgd 4dfcb6d743 src/games/rogue from Lite 1995-04-22 10:20:57 +00:00
cgd c4c01d75b2 specify man pages the new way. 1994-12-22 09:31:26 +00:00
cgd 74dd75c267 don't -g by default 1994-04-01 08:31: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 3e1e16397e Rewrite special character handling. 1993-08-10 16:33:14 +00:00
jtc d7631ce14a Rogue stores scores in /var/games/rogue.scores, not .../rogue_roll. 1993-08-09 22:20:37 +00:00
jtc 999a901e2b Convert to -mandoc macros. 1993-08-05 03:28:31 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
mycroft b1bd4afedc Add RCS indentifiers. 1993-08-01 07:42:49 +00:00
mycroft cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00