Dgamelaunch is a project mainly written in C and SHELL, based on the View license.
Fork of dgamelaunch to match my nethack modifications
dgamelaunch is a network-based game shell where anyone can sign up for an account and start playing any game which suits your fancy - currently, though, it only supports NetHack (see http://www.nethack.org).
It requires GNU Make (often called gmake), a curses library and development headers to build and should compile without issue on Linux, Solaris, FreeBSD 4 and 5. (Whether it runs on all of these platforms is a different issue. We'd like to hear about it.)
On all platforms you should make sure that the curses library is accessible at runtime using the -R flag to gcc, or using LD_RUN_PATH or LD_LIBRARY_PATH as environment variables during build and run time, respectively.
NOTE: As of version 1.4 of dgamelaunch, 'ee' is now the default rc-file editor. Using the 'virus' editor is still supported - all you have to do is
gmake clean; gmake VIRUS=1
(The gmake clean will guarantee that the dgamelaunch binary gets rebuilt.)
dgamelaunch was originally developed by M. Drew Streib [email protected] 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/
If you decide to not use dgl-create-chroot, you're on your own and we assume you have enough clue to figure out exactly what's needed for the chroot to operate correctly.
(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.)
Note that using a username in dgamelaunch.conf will cause (part of) your passwd database to be loaded into dgamelaunch's memory space. If you use BSD, this will also include encrypted passwords. Therefore, it's recommended to put the uid in the dgamelaunch.conf. The same applies to groups, but openpty(3) often looks up the tty group anyway.
If you choose a login shell make sure dgamelaunch is setuid root. (that is, chmod 4755 dgamelaunch.) It will shed privs right after entering the chroot jail 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 -q -f /etc/dgamelaunch.conf 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 -q -f /etc/dgamelaunch.conf
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.
It goes without saying that the argument after -L must point to dgamelaunch's exact location. Also, the location of dgamelaunch.conf is variable and of course should be customized by you.
NOTE: It appears that the -L option is not very widely supported. FreeBSD's telnetd uses -p instead, and you can't give arguments (arguments appropriate to standard login are used). Some other telnetds do not support anything like this at all.
The -f option, followed by a filename, specifies the path to the config file to use for dgamelaunch. If you specify the right path for DEFCONFIG in the Makefile, you may be able to omit this.
For dgamelaunch, the -q option will silence errors pertaining to the server configuration. This is recommended for use within inetd to prevent spamming the clients, but when testing and setting up we strongly suggest you leave it off until running dgamelaunch produces no error output on stderr.