Go to file
Pasi Kallinen 47cfe66d43 ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@597 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
2011-10-03 15:23:14 +00:00
examples ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
.cvsignore Committing this, currently broken, shouldn't be within 5 minutes 2004-02-22 05:57:36 +00:00
Bugs no bugs KNOWN 2004-01-23 18:22:50 +00:00
COPYING re-mention virus and last_char_is.c in COPYING 2004-01-27 17:31:26 +00:00
Changelog Minor optimization in watching menu. 2010-05-07 20:01:40 +00:00
Makefile.in Remove the internal text editor and all the support code; now compiles virus and ee as standalone executables. 2010-05-18 20:39:32 +00:00
README Be more clear that GNU Make is required. 2004-06-13 16:10:12 +00:00
TODO Bugfix: when using sqlite and registering a nick with length longer or equal to max_newnick_len, it may have succeeded even if such a nick already existed. 2011-10-03 13:47:19 +00:00
autogen.sh all workie 2004-06-18 21:41:52 +00:00
config.l ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
config.y ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
configure.ac Fix corruption of non-ASCII characters in banners. 2011-10-03 15:05:31 +00:00
convert_dgl-login.sh Improve the flat text db -> sqlite3 db conversion script. 2008-11-25 16:13:50 +00:00
dgamelaunch.8 Merge J. Ali Harlow's patch for NhExt support, with a few changes. 2004-04-21 16:22:55 +00:00
dgamelaunch.c Fix corruption of non-ASCII characters in banners. 2011-10-03 15:05:31 +00:00
dgamelaunch.h ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
dgl-common.c Add extra_info_file support. (Darshan Shaligram <scintilla@gmail.com>) 2011-10-03 15:00:14 +00:00
dgl-create-chroot Don't assume sudo is passwordless. 2011-01-14 21:08:44 +00:00
dgl-default-rcfile oops 2004-01-25 22:54:03 +00:00
ee.c Remove the internal text editor and all the support code; now compiles virus and ee as standalone executables. 2010-05-18 20:39:32 +00:00
install-sh autoconfize 2004-06-18 17:57:29 +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 ok, readd virus 2004-01-25 22:38:59 +00:00
mygetnstr.c Handle screen size changes. 2009-10-18 00:17:50 +00:00
nethackstub.c Actually exit on SIGTERM, this appears to be more convenient for most tests. 2004-03-04 14:31:21 +00:00
nh343-simple_mail.diff fix a buffer overflow 2004-01-06 19:04:07 +00:00
setproctitle.c setproctitle for teh lunix 2004-07-03 19:19:28 +00:00
stresstest.sh Wait only 1/10 instead of 1 second between processes. 2004-03-17 13:51:31 +00:00
stresstest_create.sh Stress-test script for creation of new accounts 2004-02-16 17:47:41 +00:00
stripgfx.c Make ibmgraphics stripping work (decgraphics stripping still doesn't work 2004-02-02 23:42:41 +00:00
stripgfx.h Header cleanup -- add #ifndef wrapping 2004-01-30 02:28:48 +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 TTY playback fixes from blackpenguin. 2010-09-13 16:18:22 +00:00
ttyplay.h Accept spectate commands when doing catchup-playback for ttyrecs. From Darshan Shaligram 2010-03-02 17:42:24 +00:00
ttyrec.c ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
ttyrec.h ancient encodings: config option (Adam Borowski <kilobyte@angband.pl>) 2011-10-03 15:23:14 +00:00
virus.c Remove the internal text editor and all the support code; now compiles virus and ee as standalone executables. 2010-05-18 20:39:32 +00:00

README

dgamelaunch
===========

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 <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 accomplish this,
called dgl-create-chroot, in the source directory. The default settings are
viewable by editing the script; to customize the installation, look at
dgl-create-chroot.conf.example.* (also in the source directory) and edit it to
suit your needs, and save it into the same directory as dgl-create-chroot as
dgl-create-chroot.conf. It's very likely you need to run the script as root.
The script will not work with the very limited System V /bin/sh, such found on
Solaris; start it with ksh instead.

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.

2) Compile nethack. Make sure the directories in the chroot match up with
where nethack thinks everything is. You may need to edit the VAR_PLAYGROUND
variable in include/unixconf.h and/or the HACKDIR variable in include/config.h.

(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) Make a copy of dgamelaunch.conf and edit it. This will contain information
for dgamelaunch about what uid/username, gid/group to shed privileges to at
runtime. It must also contain the path to nethack, and needs to know certain
aspects of your chroot.

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.

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 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.

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 (or whatever directory your ncurses uses) is
populated.