Commit Graph

16 Commits

Author SHA1 Message Date
mycroft f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +00:00
jsm d8d956c46c Improve snscore error handling. 2000-01-21 00:27:03 +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 092d313019 Add use of `const' 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).

Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-08 21:17:44 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
hubertf 9a9bb90e33 fix main() prototype, per PR#5867 1998-09-11 14:25:22 +00:00
mycroft a6bb9f4ef1 const poisoning. 1998-07-27 01:12:35 +00:00
lukem 10d5d0d9ce use CPPFLAGS instead of CFLAGS 1997-10-22 05:26:25 +00:00
lukem 2d3e71aa25 WARNSify, KNFify 1997-10-12 01:49:24 +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 203fe70edb clean up import, NetBSD RCS Ids, etc. 1995-04-22 08:34:18 +00:00
cgd eb6b212c8d initialize variable! 1994-04-05 00:42:49 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +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