[BACK]Return to README CVS log [TXT][DIR] Up to [contributed] / dgamelaunch-openbsd

Annotation of dgamelaunch-openbsd/README, Revision 1.1

1.1     ! rubenllo    1: dgamelaunch
        !             2: ===========
        !             3:
        !             4: dgamelaunch is a network-based game shell where anyone can sign up for an
        !             5: account and start playing any game which suits your fancy - games known to
        !             6: work with dgamelaunch are for example NetHack (http://www.nethack.org) and
        !             7: Crawl (http://crawl.develz.org).
        !             8:
        !             9:
        !            10: DGAMELAUNCH VERSIONS
        !            11: ====================
        !            12:
        !            13: Development version can be fetched from the source repository with git:
        !            14:
        !            15:   git clone git://github.com/paxed/dgamelaunch.git
        !            16:
        !            17: Releases are downloadable at http://alt.org/nethack/dgamelaunch/
        !            18:
        !            19:
        !            20: REQUIREMENTS
        !            21: ============
        !            22:
        !            23: - normal development tools (make, etc)
        !            24: - autotools (autogen, autoconf, automake)
        !            25: - ncurses library and development files
        !            26: - bison (or yacc or byacc)
        !            27: - flex (or lex)
        !            28: - optionally sqlite3 library and development files
        !            29:
        !            30:
        !            31: COMPILING
        !            32: =========
        !            33:
        !            34: Basically all you have to do is:
        !            35:
        !            36:   ./autogen.sh && make
        !            37:
        !            38: Some options you might want give to autogen:
        !            39:
        !            40:  --with-config-file=/absolute/path/to/dgamelaunch.config
        !            41:  --enable-shmem
        !            42:  --enable-sqlite
        !            43:
        !            44:
        !            45: Dgamelaunch should compile without issue on Linux, Solaris, FreeBSD 4 and 5.
        !            46: (Whether it _runs_ on all of these platforms is a different issue. We'd
        !            47: like to hear about it.)
        !            48:
        !            49: dgamelaunch was originally developed by M. Drew Streib <dtype@dtype.org> but
        !            50: is now a collaborative project. Copyright and contact information is in the
        !            51: COPYING file, included with this package.
        !            52:
        !            53:
        !            54: BASIC SETUP INSTRUCTIONS
        !            55: ========================
        !            56:
        !            57: These instructions are not current. For a more up-to-date ones, see
        !            58: http://nethackwiki.com/wiki/User:Paxed/HowTo_setup_dgamelaunch
        !            59:
        !            60:
        !            61:
        !            62:
        !            63: 1) Setup a chroot jail. There is a helpful script included to accomplish this,
        !            64: called dgl-create-chroot, in the source directory. The default settings are
        !            65: viewable by editing the script; to customize the installation, look at
        !            66: dgl-create-chroot.conf.example.* (also in the source directory) and edit it to
        !            67: suit your needs, and save it into the same directory as dgl-create-chroot as
        !            68: dgl-create-chroot.conf. It's very likely you need to run the script as root.
        !            69: The script will not work with the very limited System V /bin/sh, such found on
        !            70: Solaris; start it with ksh instead.
        !            71:
        !            72: If you decide to not use dgl-create-chroot, you're on your own and we assume
        !            73: you have enough clue to figure out exactly what's needed for the chroot to
        !            74: operate correctly.
        !            75:
        !            76: 2) Compile nethack. Make sure the directories in the chroot match up with
        !            77: where nethack thinks everything is. You may need to edit the VAR_PLAYGROUND
        !            78: variable in include/unixconf.h and/or the HACKDIR variable in include/config.h.
        !            79:
        !            80: (Note: Try not to, for security, to put anything else in the chroot. You may
        !            81: need to put gzip in there though if you compile nethack to use it for
        !            82: compression.)
        !            83:
        !            84: 3) Make a copy of dgamelaunch.conf and edit it. This will contain information
        !            85: for dgamelaunch about what uid/username, gid/group to shed privileges to at
        !            86: runtime. It must also contain the path to nethack, and needs to know certain
        !            87: aspects of your chroot.
        !            88:
        !            89: Note that using a username in dgamelaunch.conf will cause (part of) your
        !            90: passwd database to be loaded into dgamelaunch's memory space. If you use BSD,
        !            91: this will also include encrypted passwords. Therefore, it's recommended to
        !            92: put the uid in the dgamelaunch.conf. The same applies to groups, but openpty(3)
        !            93: often looks up the tty group anyway.
        !            94:
        !            95: 4) Setup dgamelaunch as one of the following:
        !            96:         a) The shell for a single login.
        !            97:         b) An (x)inetd service.
        !            98:
        !            99: If you choose a login shell make sure dgamelaunch is setuid root. (that is,
        !           100: chmod 4755 dgamelaunch.) It will shed privs right after entering the chroot
        !           101: jail though.
        !           102:
        !           103: Example xinetd lines:
        !           104:
        !           105: service telnet
        !           106: {
        !           107:   socket_type     = stream
        !           108:   protocol  = tcp
        !           109:   wait      = no
        !           110:   user      = root
        !           111:   server    = /usr/sbin/in.telnetd
        !           112:   server_args     = -h -L /opt/nethack/nethack.dtype.org/dgamelaunch -q -f /etc/dgamelaunch.conf
        !           113:   rlimit_cpu      = 3600
        !           114:   bind      = 64.71.163.206
        !           115: }
        !           116:
        !           117: A classic inetd line would look like this:
        !           118:
        !           119: telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch -q -f /etc/dgamelaunch.conf
        !           120:
        !           121: In both cases, the -L specifies an alternate login program (telnetlogin is
        !           122: invoked by default) and -h prevents revealing of a login banner (for
        !           123: example, "Debian GNU/Linux testing/unstable influx") before starting the
        !           124: login shell.
        !           125:
        !           126: It goes without saying that the argument after -L must point to dgamelaunch's
        !           127: exact location. Also, the location of dgamelaunch.conf is variable and of
        !           128: course should be customized by you.
        !           129:
        !           130: NOTE: It appears that the -L option is not very widely supported. FreeBSD's
        !           131: telnetd uses -p instead, and you can't give arguments (arguments appropriate
        !           132: to standard login are used). Some other telnetds do not support anything
        !           133: like this at all.
        !           134:
        !           135: The -f option, followed by a filename, specifies the path to the config file
        !           136: to use for dgamelaunch.  If you specify the right path for DEFCONFIG in the
        !           137: Makefile, you may be able to omit this.
        !           138:
        !           139: For dgamelaunch, the -q option will silence errors pertaining to the server
        !           140: configuration. This is recommended for use within inetd to prevent spamming
        !           141: the clients, but when testing and setting up we strongly suggest you leave it
        !           142: off until running dgamelaunch produces no error output on stderr.
        !           143:
        !           144: 5) Test your compilation of dgamelaunch by running it as root. If this
        !           145: works, a shell login or (x)inetd will work with the correct configuration.
        !           146: If you have problems with dgamelaunch's display make sure that your chroot's
        !           147: /etc/terminfo directory (or whatever directory your ncurses uses) is
        !           148: populated.
        !           149:
        !           150:
        !           151: COMMANDLINE PARAMETERS
        !           152: ======================
        !           153:
        !           154:  -a            Ignored.
        !           155:  -c            Shows error message and exits. (login shell command)
        !           156:  -e            Ignored.
        !           157:  -h            Ignored.
        !           158:  -i user       Autologin and run the register -command hook for "user"
        !           159:                (with password "user").
        !           160:  -p            Ignored.
        !           161:  -q            Be quiet, suppress errors.
        !           162:  -s            Show players currently playing.
        !           163:  -W user:msg   Send message "msg" to all players. The message seems
        !           164:                to come from "user".
        !           165:  -S            Free the shared memory block.
        !           166:  -D            Show contents of the shared memory block.
        !           167:
        !           168:
        !           169: ENVIRONMENT VARIABLES
        !           170: =====================
        !           171:
        !           172:  Linux telnetd allows importing the USER environment variables via telnet,
        !           173:  while FreeBSD does not.  FreeBSD, on the other hand, does allow the LOGNAME
        !           174:  environment variable.  Dgamelaunch will first check USER, then LOGNAME,
        !           175:  for "username:password", and tries autologin if either exists.
        !           176:  Dgamelaunch-specific DGLAUTH is checked before either of those.
        !           177:
        !           178:
        !           179: ERROR CODES
        !           180: ===========
        !           181:
        !           182:    1   Could not terminate stale processes
        !           183:    2   Cannot chroot()
        !           184:    3   Cannot chdir()
        !           185:    4   Cannot setgroups()
        !           186:    5   Cannot setgid()
        !           187:    6   Cannot setuid()
        !           188:    7   Caught HUP
        !           189:    8   Cannot run as root: Config file has shed_user = "root"
        !           190:    9   Cannot run as root: Config file has shed_user set to UID 0 user.
        !           191:   10   Could not setup player
        !           192:   11   Cannot run as root: Config file has shed_uid = 0
        !           193:   12   Config file has an unrecognized token
        !           194:   13   Config file: Negative value not accepted
        !           195:   15   dgamelaunch called with -c (login shell command); exited
        !           196:   20   No menu defined, or no banner found for menu
        !           197:   60   Cannot create a new terminal, or no termcap files.
        !           198:   61   Cannot openpty()
        !           199:   62   Cannot open /dev/ptmx
        !           200:   65   Cannot open master ptsname
        !           201:   68   Cannot fcntl inprogress-lock
        !           202:   70   Cannot write to inprogress-lock
        !           203:   71   ftok() error for shm_key, no "dgamelaunch" file found?
        !           204:   72   ftok() error for shm_sem_key, no "dgamelaunch" file found?
        !           205:   73   shmget() error, cannot connect to shared memory
        !           206:   74   smat() error, cannot attach to shared memory
        !           207:   75   Nothing in shared memory?
        !           208:   76   sem_init() error, could not initialize shared memory
        !           209:   77   sem_wait() error
        !           210:   78   sem_post() error
        !           211:   95   Cannot fnctl lockfile
        !           212:   96   sqlite3_open() failed when checking user existence: could not open login database
        !           213:   97   sqlite3_open() failed in writefile()
        !           214:   98   sqlite3_exec() failed in writefile()
        !           215:   99   Could not open password file
        !           216:  100   Username field too long in login file
        !           217:  101   Email field too long in login file
        !           218:  102   password field too long in login file
        !           219:  103   env field too long in login file
        !           220:  104   Cannot read config file
        !           221:  105   Cannot read default config file
        !           222:  106   Cannot open lockfile or password file
        !           223:  107   fcntl failed on login database in writefile()
        !           224:  108   sqlite3_exec() failed when checking user existence.
        !           225:  109   Too many registered users. (see maxusers setting in config file)
        !           226:  110   Login failed
        !           227:  111   Two users trying to register at the same time
        !           228:  112   Error changing password: cannot have ':' in password
        !           229:  113   Error parsing configuration file
        !           230:  114   exec-command fork failed
        !           231:  115   could not read lock file in writefile()
        !           232:  116   Too many registered users. (see maxusers setting in config file)
        !           233:  117   wall error: no message to send
        !           234:  118   wall error: no players
        !           235:  119   User has a retarded terminal
        !           236:  120   wall error: message too long
        !           237:  121   wall error: "from" username is too short
        !           238:  122   Error changing password: struct "me" does not exist
        !           239:  123   chdir() failed in dgl commands.
        !           240:  140   populate_games(): Cannot open inprogress-dir
        !           241:  145   populate_games(): Inprogress-filename does not have ':' in it
        !           242:  146   populate_games(): Inprogress-filename does not have ': in it (pt. 2)
        !           243:  200   purge_stale_locks(): could not open inprogress-dir
        !           244:  201   purge_stale_locks(): inprogress-file did not have ':' in it
        !           245:  202   purge_stale_locks(): could not read inprogress-file
        !           246:  203   purge_stale_locks(): could not get inprogress-file contents

CVSweb