Commit Graph
100 Commits
Author SHA1 Message Date
nhkeni 6c2b02aa8c clarify fixes entry 2022-06-01 14:02:13 -04:00
nhkeni 8a6c3d8de5 5.3.5 is not currently compatible with NHL_SANDBOX, but make it compile
with 5.3.5 and !NHL_SANDBOX
2022-05-18 14:11:00 -04:00
nhkeni c81dcf6713 Don't sanity check LUA_VERSION for sandbox if no sandbox. 2022-05-18 13:24:13 -04:00
nhkeni e5648584b3 update headers on Lua files 2022-05-10 07:44:26 -04:00
nhkeni c6c61a1419 Lua sandbox
Change table format to handle functions never to be included.
Clean up bit masks and tables of functions.
Remove some old comments and out-of-date code.
2022-05-07 17:45:36 -04:00
nhkeni 79e04d3a65 nhlua.c: bugfix - remove the handler after calling lua_pcall() 2022-05-01 21:09:59 -04:00
nhkeni b8ee09b843 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-04-29 21:11:10 -04:00
nhkeni 6bd2172ba7 Lua sandbox
This is enough to prevent abuse by denying access to functions and
    denial of service (RAM and instruction step limits), but not enough
    to allow restricted use of things that require finer control (e.g.
    filesystem access).

    If something goes wrong, the whole thing can be turned off, for
    now, in config.h (see NHL_SANDBOX).

    None of the current functionality requires changes to build systems;
    some of the possible future functionality may require some #defines
    - TBD.  There is lots of dead code (#ifdef notyet) for bits of that
    additional functionality; we can rip it out if we don't want those
    additions or we can complete (parts of) it depending on our needs.

    All current uses of Lua are connected to sandboxes and guarded with
    nhl_pcall (sandbox and lua_pcall wrapper); options and limits can
    be set at the callsites in the passed nhl_sandbox_info.  Some of
    the error handling may be wrong - panic() vs.  impossible() vs
    silence.

    Memory and instruction step limits should be tuned prior to release;
    there's no point tuning them now.
2022-04-29 19:46:33 -04:00
nhkeni 7840ef9554 un-streq followup 2022-03-19 20:49:00 -04:00
nhkeni 64371dc8b3 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-03-18 20:34:59 -04:00
nhkeni b5c5496d17 Replace streq() with str_start_is(), which actually has the intended semantics.
Contributed by Michael Meyer.
2022-03-18 20:33:13 -04:00
nhkeni f32ab9d792 tile2x11.c needs a local copy of FITSuint_ for alloc.o 2022-03-17 20:20:39 -04:00
nhkeni ebe08a8c75 tile2bmp.c needs a local copy of FITSuint_ for alloc.o 2022-03-17 19:27:02 -04:00
nhkeni 3cc0043dfe Fix dlb_main type issues. 2022-03-17 18:12:40 -04:00
nhkeni 7dba4f1236 Add FITSint() and FITSuint(),
which cast long long to int while panicking on overflow
2022-03-17 18:10:38 -04:00
nhkeni e2d5013e01 Typedef getloc_flags_t for struct unpacked_coord.getloc_flags and related. 2022-03-17 17:17:13 -04:00
nhkeni fc5e991b06 Add typedef mmflags_t to assure enough bits for all MM_* flags. 2022-03-17 17:14:12 -04:00
nhkeni f8830e69e2 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-03-17 16:57:31 -04:00
nhkeni e260403f3b Guard variable used only with SYSCF_FILE. 2022-03-17 16:56:59 -04:00
nhkeni 9f3063df01 Make pointer differenace a long. 2022-03-17 16:56:25 -04:00
nhkeni 7a790c2a30 Use lua_Integer when interfacing with lua. 2022-03-17 16:30:16 -04:00
nhkeni 1151d54500 Add and use Strlen(), like strlen() but panics on unreasonably long strings. 2022-03-16 21:42:00 -04:00
nhkeni ff1289e828 Add Strlen(), a strlen(3) that panics if string is stupid long and returns unsigned.
First batch of changes to use it to suppress warnings.
2022-03-16 21:34:21 -04:00
nhkeni 1e31fee0df Don't infringe on POSIX typedef namespace. 2022-03-16 21:31:26 -04:00
nhkeni 3e4ea0a2c3 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-03-16 21:27:22 -04:00
nhkeni b444085d38 ssize_t for Windows 2022-03-16 21:27:06 -04:00
nhkeni 7f484815e5 Add streq() and start finding places it fixes warnings.
Some type fixes from Michael Allison.
2022-03-16 18:50:17 -04:00
nhkeni dc72e07a2b Make readLenType generally available. Fix some warnings around read(2). 2022-03-16 18:41:45 -04:00
nhkeni a64a666f78 Various type and cast bits. 2022-03-16 18:18:52 -04:00
nhkeni e51026aee1 LIMIT_TO_RANGE_INT macro and various casts. 2022-03-16 17:59:23 -04:00
nhkeni 81b014977d Some easy loss-of-precision fixes. 2022-03-16 17:49:29 -04:00
nhkeni 16ea5e7fa6 cmdcount_t
Add a type to force g.{command_count,last_command_count,multi} to have the
same type (because cmd.c: g.multi = g.command_count;) and some resulting
cleanup.
2022-03-16 17:33:44 -04:00
nhkeni ab16cf83b1 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-03-16 17:22:43 -04:00
nhkeni 3aed0c61bc xcode cleanup:
don't use git (so tarball distribution should work)
 name the build shell scripts
2022-03-16 17:03:54 -04:00
nhkeni 41203982be Fix xcode recover install 2022-03-16 15:06:55 -04:00
nhkeni 0b4fad3cb7 NetHack.xcodeproj: update handling of Lua 2022-03-16 15:05:19 -04:00
nhkeni 3cf1b87914 cmdcount_t
Add a type to force g.{command_count,last_command_count,multi} to have the
same type (because cmd.c: g.multi = g.command_count;) and some resulting
cleanup.
2022-02-27 20:01:49 -05:00
nhkeni ae28e259ab nethack.6 bits
Restore hard-coded author name.
Fix overlong line causing wrapping error.
2022-02-21 11:18:58 -05:00
nhkeni e10dff845f remove more leading zeroes 2022-02-08 11:35:44 -05:00
nhkeni 1d72646e87 dlb.6: remove leading zero from day-of-month 2022-02-08 10:31:43 -05:00
nhkeni 1d210ed722 prevent ..files value from being pull from ..
This was creating extra nethack.ico entries in Files.
2022-02-04 15:11:04 -05:00
nhkeni 1647125f89 rationalize extensions in doc directory
rename text files to have .txt extension, etc
    update references to changed filenames
2022-01-29 16:28:06 -05:00
nhkeni 6feb4f09bc enable NH_DATESUB for all .6 files 2022-01-29 16:09:26 -05:00
Kenneth Lorber 6991800adc Merge branch 'keni-datesub2' into NetHack-3.7 2022-01-11 16:49:21 -05:00
Kenneth Lorber 3a4cee5955 Enable automated date generation on the Guidebook source files. 2022-01-11 15:39:20 -05:00
keni 4c16f74b7f Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2021-02-02 20:46:54 -05:00
keni 97141cd421 src/end.c: improve backtrace text spacing (see #K3259) 2021-02-02 20:45:45 -05:00
keni 76b7e63888 Guidebook.tex: fix formatting typos 2020-02-01 21:17:49 -05:00
keni be01fba97a add date to Guidebook.mn title page 2019-12-15 12:38:42 -05:00
keni e32a132a7c grammar tid 2019-11-17 18:41:03 -05:00
keni a3777d6ead Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-14 08:21:12 -05:00
keni 78716ab4bf attempt to fix .BR macro 2019-11-14 08:20:38 -05:00
keni 5676508180 Guidebook.mn: drop unneeded escaping 2019-05-07 13:53:24 -04:00
keni fe055cd6bc This is cron-daily v1-May-5-2019. guidebook updated: doc/Guidebook.txt
to 948099800b722f9be0e8f9c8d4d96cfda5cea98e
2019-05-05 13:32:53 -04:00
keni 1386d39b32 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2019-04-04 17:01:48 -04:00
keni e0e937e7b6 Solaris hints files from Kevin Smolkowski 2019-04-04 17:00:51 -04:00
keni 1825f51c4f Minor Guidebook.{tex,mn} wording and typos. UR macro. 2019-02-22 20:00:14 -05:00
keni 738dce6b00 set up for proper generation of Files file 2019-02-21 20:32:36 -05:00
keni 9a9f76bf5c fix typos in header line so expansion works 2018-12-29 19:19:30 -05:00
keni 8556613408 Add missing control file. 2018-11-10 14:45:50 -05:00
keni 0c46e9494f Docs for NetHack [nt]roff Guidebook macros. 2018-11-03 22:30:23 -04:00
keni 8fa94ee29b Add the original docs for tmac.n 2018-11-03 20:15:34 -04:00
keni 1aad6bcfba Show monstr.c more accurately in Files 2018-10-22 10:09:28 -04:00
keni cd3078c8be Remove "makedefs -m" and monstr.c from the Unix build. 2018-10-21 08:45:55 -04:00
keni 870b71de8c Deprecate "makedefs -m".
mons[].difficulty takes over for monstr[]
Invoking "makedefs -m" gives a deprecation message; it is also included
in the (now mostly empty) monstr.c.
Ports should now remove "makedefs -m" from their build procedures but this
commit does not include that change.
2018-10-21 08:45:55 -04:00
keni 17b48480a5 Remove "makedefs -m" and monstr.c from the Unix build. 2018-10-20 23:14:34 -04:00
keni f222023bd8 Deprecate "makedefs -m".
mons[].difficulty takes over for monstr[]
Invoking "makedefs -m" gives a deprecation message; it is also included
in the (now mostly empty) monstr.c.
Ports should now remove "makedefs -m" from their build procedures but this
commit does not include that change.
2018-10-20 23:14:33 -04:00
keni 3b298d40c2 fix numerical ordering in Files 2018-10-19 17:55:37 -04:00
keni 9cc77afd96 fix numerical ordering in Files 2018-10-19 10:45:32 -04:00
keni 327336ff01 Update Files. Add missing files and missing .lev section. 2018-10-18 23:22:31 -04:00
keni 5a10926644 Update Files. Add missing files and missing .lev section. 2018-09-29 16:43:39 -04:00
keni 0e51afc7cd update Files attributes with priorities and %s substitution 2018-05-31 21:42:06 -04:00
keni a1b19734e9 update autogenerated Files file 2018-05-29 19:33:33 -04:00
keni 13db5d2db8 add autogenerated Files 2018-05-29 19:31:40 -04:00
keni e7b901419b Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-29 19:31:18 -04:00
keni 9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -04:00
keni f810a45dc1 fix H7138: sys/unix/setup.sh fails with no arguments
Sanity check was in the wrong place.
2018-05-15 16:30:28 -04:00
keni 0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni 09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
keni 11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
keni 98186fca84 Escaping escape characters that escaped previous updates. 2018-04-19 19:37:44 -04:00
keni 662380bf8c fix makedefs.6 formatting errors 2018-04-15 16:12:19 -04:00
keni ce38567aeb fix makedefs.6 formatting errors 2018-04-15 13:56:55 -04:00
keni 6cf611cbc7 Merge remote-tracking branch 'origin/NetHack-3.6.0'
(required manual merge in include/config.h)
2018-04-15 13:50:59 -04:00
keni 123268e0c9 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-03-22 16:27:26 -04:00
keni 6afb3ead34 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-03-10 19:14:11 -05:00
keni ef0448dd79 Merge githash 2018-02-26 09:03:12 -05:00
keni cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
keni cf9cf038f3 gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first
NHgithook.pm: add some warnings if nhversioning can't open files
make sure nhversioning fails before opening gitinfo.txt if it can't get valid
 data
2018-02-23 19:50:15 -05:00
keni 6aa594b8d0 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-02-20 10:09:57 -05:00
keni 12530cb155 infrastructure fixes:
- fix bug in git hooks that loses file permissions when doing variable expansion
- fix execute permissions on sys/unix/hints/macosx.sh
- explicitly call out perl as required for hooks in Developer.txt
2018-02-16 12:07:37 -05:00
keni 02ded08909 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-01-27 20:17:57 -05:00
keni d540b285d0 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-01-15 14:18:53 -05:00
keni f9144fa576 build fixes for MacOSX:
- fix generation of sysconf when WANT_SOURCE_INSTALL=1
- use xcrun as main search for gdb
- turn gdb off in most cases
2018-01-09 20:59:26 -05:00
keni cc5e1baf56 Move CONWAY cleanup from the save code to goto_level to prevent a
coredump I still can't reproduce.  CONWAY_DEBUGGING is enhanced
and left enabled.
2018-01-07 17:49:14 -05:00
keni bac337fed6 fix spelling error 2018-01-06 16:31:24 -05:00
keni 3bcf6a0c95 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-12-24 15:28:18 -05:00
keni d7e7a7d0ee Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-12-04 17:34:59 -05:00
keni 51daa87e49 Add github to the developer docs. 2017-12-04 17:33:41 -05:00