+VERSION = 1.3.10.1
CC = gcc
LDFLAGS =
-CFLAGS = -g3 -O0 -Wall -W -Wno-unused-parameter
+CFLAGS = -g3 -O0 -Wall -W -Wno-unused-parameter $(DEFS)
+DEFS = -DVERSION=\"$(VERSION)\"
SRCS = virus.c ttyrec.c dgamelaunch.c io.c ttyplay.c stripgfx.c
OBJS = $(SRCS:.c=.o)
LIBS = -lncurses -lcrypt
* is very small.
*/
+#include "dgamelaunch.h"
+
/* a request from the author: please leave some remnance of
* 'based on dgamelaunch version xxx' in any derivative works, or
* even keep the line the same altogether. I'm probably happy
#define VERLINES 7 /* number of lines in this vanity text */
#define VER1 "## dgamelaunch - network console game launcher\n"
-#define VER2 "## version 1.3.10\n"
+#define VER2 "## version " VERSION "\n"
#define VER3 "## \n"
#define VER4 "## (c)2001-3 M. Drew Streib. This program's source is released under the GPL.\n"
#define VER5 "## Send mail to <dtype@dtype.org> for details or a copy of the source code.\n"
#define _XOPEN_SOURCE /* grantpt, etc. */
#define _BSD_SOURCE /* setenv */
-#include "dgamelaunch.h"
#include <stdlib.h>
#include <curses.h>
#include <crypt.h>
int flags;
};
-#define SHED_UID 1031 /* the uid to shed privs to */
-#define SHED_GID 1031 /* the gid to shed privs to */
+#define SHED_UID 5 /* the uid to shed privs to */
+#define SHED_GID 5 /* the gid to shed privs to */
#define MAXUSERS 64000 /* solves some preallocation issues. */
#define LOC_CHROOT "/var/lib/dgamelaunch/"
cp -L /lib/ld-linux.so.2 $CHROOT_PATH/lib
# Passwd file
-echo "nethack:!:1031:1031::/nonexistent:/bin/sh" > $CHROOT_PATH/etc/passwd
-echo "nethack:x:1031:" > $CHROOT_PATH/etc/group
+echo "games:!:5:60:games:/nonexistent:/bin/sh" > $CHROOT_PATH/etc/passwd
+echo "games:x:60:" > $CHROOT_PATH/etc/group
# Dungeon directory setup
mkdir -p $CHROOT_PATH/dgldir/inprogress