Commit Graph

10 Commits

Author SHA1 Message Date
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 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
hubertf 148eb780dc This patch makes fish(6) honour PAGER for viewing the instructions.
The detailed behaviour follows POSIX.2.  A similar patch for wump(6)
which was accepted is in bin/6699.  Fish does not need any setgid
privileges it gets from dm, so this patch also moves the gid resetting
earlier.

Reported in PR 7986 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-14 17:30:21 +00:00
kristerw a9a6e776fa Buffer overflow fix (from OpenBSD) 1999-04-24 22:09:06 +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
christos 732b368142 PR/4489: Mika Nystroem: Security hole exec'ing more in fish instructions. 1997-11-16 21:41:53 +00:00
lukem f1b992e36e WARNSify 1997-10-10 12:58:29 +00:00
cgd 42fb1b9d4a merge with Lite, new RCS id conventions, etc. 1995-03-23 08:28:00 +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