Commit Graph

27 Commits

Author SHA1 Message Date
dholland d6160edeb8 Use ssize_t for read() results. Don't use int for lseek() results. 2014-03-22 23:45:34 +00:00
dholland 2ea1f2138b Christos points out that usage should not use errx, but should use
getprogname.
2010-01-03 17:08:45 +00:00
dholland 381a1804f4 Split struct betinfo into its own header file so it can be shared
between canfield and cfscores, instead of copy-pasted.
2010-01-01 06:37:15 +00:00
dholland 97ebabce84 Use NULL instead of 0 for pointer tests. Remove an unnecessary cast. 2010-01-01 06:31:18 +00:00
dholland 93abe19853 Send error messages to stderr. Use errx/warnx, not printf. 2010-01-01 06:20:45 +00:00
dholland 07673b8c8a Correct usage message. 2010-01-01 06:16:36 +00:00
dholland f59d107e64 sprinkle static 2009-08-12 05:35:44 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
dholland 3bf4735ba0 Work around gcc signedness warning: if you check for uid_t < 0, gcc warns
because it's unsigned, but I don't really want to rely on uid_t being
unsigned on every platform this code might propagate to.
2008-01-28 02:37:50 +00:00
jmc 52d1fdd324 KNF and WARNS=3 2005-07-01 16:50:55 +00:00
jsm cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +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
lukem bcf4617b61 some makefile de-linting 2002-09-18 06:16:39 +00:00
tv a2291b79c0 MKfoo=no -> NOfoo= 2001-12-12 00:07:45 +00:00
matt 3233065035 More include additions for exit, abs, strcmp, etc. 2000-07-03 03:57:39 +00:00
mycroft f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +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 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 5d3d6c7da3 Use symbolic constants for seek(), open(). Fixed as per PR 6057 by
Joseph Myers <jsm@octomino.demon.co.uk>.
1998-08-29 22:47:56 +00:00
lukem dd1343dba9 use CPPFLAGS instead of CFLAGS 1997-10-22 04:42:45 +00:00
lukem 971aa64ada use err/warn instead of perror 1997-10-11 02:41:45 +00:00
lukem 83cce15aa4 WARNSify 1997-10-10 12:26:34 +00:00
cgd 101657d110 clean up import 1995-03-21 15:03:38 +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