summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Security improvements for games (largely from or inspired by OpenBSD).jsm1999-09-1226-75/+216
| | | | | | | | | | | | | | | 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.
* Use STD*_FILENO.kleink1999-09-101-4/+4
|
* Check for write errors in auxiliary programs used during build of games.jsm1999-09-104-12/+24
|
* Compare getchar() against EOF, not -1.jsm1999-09-101-3/+3
|
* Fix glitch in const changes (bin/8365 from John.P.Darrow@wheaton.edu).jsm1999-09-101-2/+2
|
* Include <time.h> in various places in the games where time() or time_tjsm1999-09-099-18/+29
| | | are used.
* Check for failure of malloc() and calloc() at various places in the games.jsm1999-09-099-20/+51
|
* Remove extra blank line in copyright.simonb1999-09-091-2/+1
|
* Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate injsm1999-09-0815-72/+72
| | | the games.
* Add `__noreturn__' and `__unused__' attributes where appropriate tojsm1999-09-0847-144/+152
| | | | | | | | | | | | 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).
* Add use of `const' where appropriate to the games.jsm1999-09-0892-636/+653
| | | | | | | | | 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.
* Removed unused array Movenames[].jsm1999-09-081-6/+2
|
* Convert to something resembling KNF.simonb1999-08-2118-371/+377
|
* Instead of writing out a structure that contains pointers as the headersimonb1999-08-213-18/+62
| | | | | | of the card decks file, just write out the number of cards for each deck. Also use "off_t" for offsets into the file (that are stored after the number of cards) instead of "long". /usr/share/games/cards.pck is now MI.
* Use new endian-specific conversion macros - 64-bit off_t's are nowsimonb1999-08-215-34/+37
| | | | | | | the stored the same regardess of the byte order of the generating host. Note in the strfile(8) man page that all fields are big-endian, not in network byte order.
* Don't chown installed files or directories if UNPRIVILEGED is defined.simonb1999-08-211-1/+5
| | | | | "make build" should now work as a non-root user (tested on Alpha). mtree spits out lots of warnings during "make distrib-dirs", but these are non-fatal.
* Use ${INSTPRIV} with ${INSTALL}.simonb1999-08-211-3/+3
|
* Make phrase to enter password again clearerhubertf1999-08-181-2/+2
|
* In name section, use .Dq macro rather than writing double quote directly.enami1999-08-171-2/+3
|
* Spell "privilege" correctly (correct spelling from Jonathan Stone).simonb1999-08-161-1/+1
|
* Adapt to change of "termcap.h".tron1999-08-143-7/+7
|
* Adapt to change in "termcap.h".tron1999-08-141-3/+2
|
* Adapt to change of "termcap.h".tron1999-08-142-6/+6
|
* Fix the part of pr8201 which is IMHO a bug: the error message now goessommerfeld1999-08-131-2/+2
| | | | | | | | to stderr. The existing error message ("I don't know what xxx means") is unchanged, as it is stylisticly in keeping with the light-hearted nature of the program, and is also more likely to be accurate than the "no such acronym" error message proposed in 8201.
* Leave ^Z-handling to the system (curses? no idea, at least it works :-),hubertf1999-08-101-24/+2
| | | and don't wait for two seconds when game is over.
* Print score after endwin() so it isn't deleted immediately afterward.hubertf1999-08-081-4/+7
|
* Revert inclusion of <string.h> now that curses has been fixed.simonb1999-08-081-3/+2
|
* Fortunes from those Unamerican Activities bumper stickers you see onthorpej1999-08-043-3/+395
| | | mountain bikes owned by Gen-X'ers.
* Need <strings.h>.thorpej1999-08-041-2/+3
|
* This patch converts worms(6) to use curses, therebyhubertf1999-07-302-165/+59
| | | | | | | | simplifying the code and improving its portability. It also adds a delay option from OpenBSD, to allow reasonable speed display on fast terminals, adds use of const, and fixes signal handling and use of errx() where appropriate. Patch supplied in PR 6661 by Joseph Myers <jsm28@cam.ac.uk>.
* This patch converts rain(6) to use curses, therebyhubertf1999-07-303-147/+58
| | | | | | | | significantly simplifying the code and improving its portability. It also adds a delay option from OpenBSD to make the display go at a useful speed on fast terminals, and fixes signal handling to make it reliable. Patch supplied by Joseph Myers <jsm28@cam.ac.uk> in PR 6659.
* This patch fixes adventure(6) to use `extern' on declarations ofhubertf1999-07-282-40/+100
| | | | | | | | | | | objects in its header file, and to add corresponding definitions to init.c accordingly. (See the C standard - relying on linker commons where there are multiple uninitialised declarations of an object in the program traditionally works on Unix, but is not standard C.) The patch also removes a bit-rotten code fragment under #ifdef OLDSTUFF. Patch submitted in PR 8105 by Joseph Myers <jsm28@cam.ac.uk>
* This is a trivial fix to backgammon(6): '\a' is cleaner than '\007'.hubertf1999-07-281-3/+3
| | | Submitted in PR 8104 by Joseph Myers <jsm28@cam.ac.uk>
* This patch makes worm(6) keep the cursor on the head of the worm.hubertf1999-07-281-2/+5
| | | Submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8103.
* This patch adds references to the main punched card, paper tape andhubertf1999-07-281-1/+15
| | | | | | | | | | | | Morse code standards to the bcd(6) manpage (which also serves as the manpages ppt(6) and morse(6)). (The only one of these standards I have read is the ECMA-10 paper tape standard, which is also probably the least readily available, since ECMA don't supply copies of obsolete standards, though they will supply printed copies of any or all of their current standards at no charge.) Patch submitted in PR 8102 by Joseph Myers <jsm28@cam.ac.uk>
* This patch makes bcd(6) use `const' where appropriate, and usehubertf1999-07-281-5/+5
| | | | | | unsigned char rather than char for values that end up passed to isascii() and also used as array indices. Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8093.
* This patch fixes a remaining relic of the backgammon(6) "executehubertf1999-07-281-3/+3
| | | | | saved game to continue playing" problem described in bin/6077. Patch contributed by Joseph Myers <jsm28@cam.ac.uk> in PR 8092.
* In atc(6), the function getAChar() has BSD and SYSV variants to dealhubertf1999-07-281-8/+7
| | | | | | | | | | | with variations in EINTR behaviour, but the optimisation of using the BSD version where the SYSV version isn't needed is insignificant. This patch therefore simplifies the code by making there be just one version, a more paranoid (about EOF when errno is already EINTR) version of the SYSV code. Since the BSD/SYSV defines are mainly used to control whether BSD timers are used, this helps where BSD timers but SYSV EINTR handling are wanted. Patch supplied in PR 8091 by Joseph Myers <jsm28@cam.ac.uk>
* This patch improves the handling of save files in battlestar(6), byhubertf1999-07-286-44/+119
| | | | | | | | | | allowing the user to choose the name of the save file and specify it on the command line when restoring. It also eliminates a buffer overrun in determining the path to the save file, and any particular arbitrary limit on the name length. In the name of a tidier home directory, the default name is changed from "Bstar" to ".Bstar". Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk> Minor modification (s/startup/filename/ in initialize()) by me.
* make sure only whole words are matched, use [:space:] RE to avoid embeddeddrochner1999-07-271-2/+3
| | | <TAB>s
* Remove empty functin check_adir() and references to it.hubertf1999-07-261-9/+2
|
* This patch adds to backgammon(6) a couple of noreturn attributeshubertf1999-07-261-3/+3
| | | | | missed in bin/6144. Patch submitted in PR 8082 by Joseph Myers <jsm28@cam.ac.uk>
* This patch makes backgammon(6) check that, if you use the -s option tohubertf1999-07-261-3/+7
| | | | | recover a saved game, then you specify a file name. Patch submitted in PR 8081 by Joseph Myers <jsm28@cam.ac.uk>
* This adds a check for memory allocation failure to one place inhubertf1999-07-261-2/+6
| | | | | | | backgammon(6). The use of write(2) for the message may seem odd, but is used in another place in this game. (Actually, a lot of backgammon(6) could do with being substantially cleaned up.) Patch submitted in PR 8080 by Joseph Myers <jsm28@cam.ac.uk>
* Check whatis(1) if we don't find an acronym matching the argumentbriggs1999-07-252-5/+16
|
* We're in section 6.thorpej1999-07-251-2/+2
|
* This patch marks unused parameters in atc(6) as such.hubertf1999-07-255-28/+28
| | | Patch submitted in PR 8058 by Joseph Myers <jsm28@cam.ac.uk>
* Hardcore const poisoninghubertf1999-07-251-4/+4
| | | Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8057
* This patch makes atc(6) check for memory allocation failure.hubertf1999-07-242-6/+12
| | | | | Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8056, with small enhancement to make clearer when loser() is called with NULL.
* Use getopt instead of home grown command line parsing.mjl1999-07-241-44/+30
| | | Patch from Joseph Myers <jsm28@cam.ac.uk> in PR/8062.