]> skyeroc.xyz Git - dgamelaunch/commitdiff
tweaked for some Debianisms that should be default anyway
authorJoshua Kwan <joshk@triplehelix.org>
Wed, 31 Dec 2003 02:39:10 +0000 (02:39 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Wed, 31 Dec 2003 02:39:10 +0000 (02:39 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@17 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Makefile
dgamelaunch.c
dgamelaunch.h
dgl-create-chroot

index ea32c6dd955dcdb2d8e119feb019ad0485ce3764..bef98b5bb39f99bd75879fa469a95883fc5db0a9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
+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
index 66394b0fa634d2111b243981fd13a29f2e9e0314..59b07d888eed47b0af2a33213bb35b328adf9fe3 100644 (file)
@@ -30,6 +30,8 @@
  * 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 
@@ -37,7 +39,7 @@
 
 #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"
@@ -53,7 +55,6 @@
 #define _XOPEN_SOURCE                                          /* grantpt, etc. */
 #define _BSD_SOURCE                                                    /* setenv */
 
-#include "dgamelaunch.h"
 #include <stdlib.h>
 #include <curses.h>
 #include <crypt.h>
index aa5bd7b9239526b3156b00450f19dedafbbdbcdc..199dd0a0b6a83bfaf4c20fa56284dfcdc766886d 100644 (file)
@@ -12,8 +12,8 @@ struct dg_user
        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/"
index b7400e94c4fdfd74e9c154c8ad5dc457327a711a..851730eee0b637d6b88a8b27b5b71da1cccb0864 100755 (executable)
@@ -18,8 +18,8 @@ cp -L /lib/libncurses.so.5 $CHROOT_PATH/lib
 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