From 9419e79454be1e3b8571c636fd704cde9cb596cf Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Mon, 5 Jan 2004 17:27:49 +0000 Subject: [PATCH] some fixes git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@92 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- Changelog | 2 ++ dgamelaunch.c | 2 +- dgamelaunch.h | 14 -------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Changelog b/Changelog index 72d4611..3eb4461 100644 --- a/Changelog +++ b/Changelog @@ -29,6 +29,8 @@ * Make sure only one session can be played at once at all and SIGHUP the rest, ensuring the death of "Destroy old game? [yn]" * Replace two colossal conditionals with calls to isalnum(3). + * Shift from static #defines to a configuration file system + powered by lex/yacc. 1.3.10 (2003/10/22) * Added a mode flag to the open call for inprogress lock files. diff --git a/dgamelaunch.c b/dgamelaunch.c index 1455190..c4c720c 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1040,7 +1040,7 @@ readfile (int nolock) f_num++; /* prevent a buffer overrun here */ - if (f_num >= MAXUSERS) + if (f_num >= myconfig->max) graceful_exit (109); } diff --git a/dgamelaunch.h b/dgamelaunch.h index 60a0b4b..73eb676 100644 --- a/dgamelaunch.h +++ b/dgamelaunch.h @@ -53,20 +53,6 @@ extern char* config; /* file path */ extern struct dg_config *myconfig; extern struct dg_config defconfig; -#define SHED_UID 5 /* the uid to shed privs to */ -#define SHED_GID 60 /* the gid to shed privs to */ -#define MAXUSERS 64000 /* solves some preallocation issues. */ - -#define LOC_CHROOT "/var/lib/dgamelaunch/" -#define LOC_NETHACK "/bin/nethack" -#define LOC_DGLROOT "/dgldir/" -#define LOC_DGLDIR LOC_DGLROOT "rcfiles/" -#define LOC_TTYRECDIR LOC_DGLROOT "ttyrec/" -#define LOC_INPROGRESSDIR LOC_DGLROOT "inprogress/" -#define LOC_SPOOLDIR "/var/mail" -#define LOC_CANNED "/dgl-default-rcfile" -#define LOC_BANNER "/dgl-banner" - /* dgamelaunch.c function prototypes */ extern void create_config (void); extern void ttyrec_getmaster (void);