Go to file
Joshua Kwan 0b590733ff Here's a better fix
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@100 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
2004-01-06 02:08:53 +00:00
.cvsignore Ignore nethackstub binary and ktrace.out (output of ktrace syscall tracer). 2004-01-05 14:03:38 +00:00
Bugs Update all of the administrivia to reflect current state 2004-01-02 11:59:50 +00:00
COPYING add io.c to the 4-BSD stuff 2004-01-05 23:26:16 +00:00
Changelog version 1.3.10.1 doesn't allude to how much new crap is in this release. 2004-01-06 01:38:11 +00:00
Makefile version 1.3.10.1 doesn't allude to how much new crap is in this release. 2004-01-06 01:38:11 +00:00
README Added copyright lines to COPYING, completely rewrote README. Feedback appreciated. 2004-01-04 23:33:10 +00:00
TODO scratch one off 2004-01-05 17:31:01 +00:00
config.l works! 2004-01-05 09:18:39 +00:00
config.y works! 2004-01-05 09:18:39 +00:00
dgamelaunch.c Here's a better fix 2004-01-06 02:08:53 +00:00
dgamelaunch.conf First try at the config file system. Still need to change usage of all 2004-01-05 01:25:38 +00:00
dgamelaunch.h some fixes 2004-01-05 17:27:49 +00:00
dgl-banner I can't stand it anymore, reindenting with 2 spaces, 2003-12-31 19:47:49 +00:00
dgl-create-chroot Make dgl-create-chroot.conf file clearer in the comments. 2004-01-04 16:42:08 +00:00
dgl-create-chroot.conf.example Make dgl-create-chroot.conf file clearer in the comments. 2004-01-04 16:42:08 +00:00
dgl-default-rcfile initial commit of new dgamelaunch to CVS 2003-12-30 21:30:32 +00:00
io.c I can't stand it anymore, reindenting with 2 spaces, 2003-12-31 19:47:49 +00:00
io.h initial commit of new dgamelaunch to CVS 2003-12-30 21:30:32 +00:00
last_char_is.c I can't stand it anymore, reindenting with 2 spaces, 2003-12-31 19:47:49 +00:00
nethackstub.c #include <string.h> 2004-01-05 17:44:30 +00:00
nh343-simple_mail.diff Revamp the simplemail support 2004-01-04 00:21:39 +00:00
stripgfx.c I can't stand it anymore, reindenting with 2 spaces, 2003-12-31 19:47:49 +00:00
stripgfx.h initial commit of new dgamelaunch to CVS 2003-12-30 21:30:32 +00:00
strlcat.c reindentation 2004-01-04 22:49:29 +00:00
strlcpy.c Reindent, and add some error handling for kill 2004-01-04 02:19:12 +00:00
ttyplay.c graceful_exit, does nothing but please deprecate exit(). 2004-01-04 01:45:21 +00:00
ttyrec.c It kind of works now. However, we must beware the static buffers that we made 2004-01-05 01:55:08 +00:00
ttyrec.h I can't stand it anymore, reindenting with 2 spaces, 2003-12-31 19:47:49 +00:00
virus.c graceful_exit, does nothing but please deprecate exit(). 2004-01-04 01:45:21 +00:00

README

dgamelaunch attempts to be lean and at least somewhat portable though development is rather Linux-specific. It will most likely compile on a modern Linux distro and you won't need any esoteric headers or libraries.

The most important thing to be away of are the defines in dgamelaunch.h, they are pretty much self-explanatory. Realize however, these are all in their own chroot jail.

dgamelaunch was originally developed by M. Drew Streib <dtype@dtype.org> but is now a collaborative project. Copyright and contact information is in the COPYING file, included with this package.
Mailing list: http://alt.org/mailman/listinfo/nethack/

BASIC SETUP INSTRUCTIONS
========================

1) Setup a chroot jail. There is a helpful script included to this but it will require modification if you change the defines in dgamelaunch.h

	dgamelaunch]$ ./dgl-create-chroot

You will probably want to run this as root as it writes to generally non-world-writable places.

2) Compile nethack. Make sure that it knows where the playground will be, this can be automated through dgl-create-chroot. If you don't understand this, the defaults will probably do. A static compile of nethack is recommended unless you want to copy all the libraries into the jail.

(Note: Try not to, for security, to put anything else in the chroot. You may need to put gzip in there though if you compile nethack to use it for compression.)

3) Before you continue double check that the user id's in dgamelaunch.h's defines are the owners of the chroot directory and all it's files. This is required for all files except executables (which can be only by anyone as long as they are executable.)

4) Setup dgamelaunch as one of the following:
	a) The shell for a single login.
	b) An (x)inetd service.

If you choose a login shell make sure dgamelaunch is set-uid root. It will shed privs right after chroot though.

Example xinetd lines:

service telnet
{
  socket_type     = stream
  protocol  = tcp
  wait      = no
  user      = root
  server    = /usr/sbin/in.telnetd
  server_args     = -h -L /opt/nethack/nethack.dtype.org/dgamelaunch
  rlimit_cpu      = 3600
  bind      = 64.71.163.206
}

A classic inetd line would look like this:

telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch

In both cases, the -L specifies an alternate login program (telnetlogin is
invoked by default) and -h prevents revealing of a login banner (for example,
"Debian GNU/Linux testing/unstable influx") before starting the login shell.

5) Test your compilation of dgamelaunch by running it as root. If this works, a shell login or (x)inetd will work with the correct configuration. If you have problems with dgamelaunch's display make sure that your chroot's /etc/terminfo directory is populated.