
Hi After satisfying the ssl dependency the .irc.entropy file also popped up. The new diff file: diff -rupN bahamut-1.8.6.orig/include/config.h bahamut-1.8.6/include/config.h --- bahamut-1.8.6.orig/include/config.h 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/include/config.h 2010-02-16 09:38:36.000000000 +0200 @@ -134,11 +134,13 @@ /* File names * the server will look for these files */ -#define MPATH "ircd.motd" -#define SMPATH "ircd.smotd" -#define LPATH "ircd.log" -#define PPATH "ircd.pid" -#define HPATH "opers.txt" +#define ETCDIR "/etc/ircd" +#define RUNDIR "/var/run/ircd" +#define MPATH ETCDIR "/ircd.motd" +#define SMPATH ETCDIR "ircd.smotd" +#define LPATH "/var/log/ircd/ircd.log" +#define PPATH RUNDIR "/ircd.pid" +#define HPATH ETCDIR "/opers.txt" /* Services Definitions */ diff -rupN bahamut-1.8.6.orig/src/dh.c bahamut-1.8.6/src/dh.c --- bahamut-1.8.6.orig/src/dh.c 2009-03-01 21:23:59.000000000 +0200 +++ bahamut-1.8.6/src/dh.c 2010-02-16 09:43:49.000000000 +0200 @@ -117,7 +117,7 @@ static inline void entropy_error(void) RAND_SRC, strerror(errno)); printf("ircd needs a %d byte random seed.\n", RAND_BYTES); printf("You can place a file containing random data called" - " .ircd.entropy\nin the directory with your ircd.conf." + " .ircd.entropy\nin the directory /var/lib/ircd." " This file must be at least %d bytes\n", RAND_BYTES); printf("long and should be suitably random.\n"); } @@ -171,10 +171,10 @@ static int make_entropy() printf("Done.\n"); fclose(fp); - fp = fopen(".ircd.entropy", "w"); + fp = fopen("/var/lib/ircd/.ircd.entropy", "w"); if(!fp) { - printf("Could not open .ircd.entropy for writing: %s\n", + printf("Could not open /var/lib/ircd/.ircd.entropy for writing: %s\n", strerror(errno)); return 0; } @@ -182,7 +182,7 @@ static int make_entropy() fwrite(randbuf, RAND_BYTES * 4, 1, fp); fclose(fp); - RAND_load_file(".ircd.entropy", -1); + RAND_load_file("/var/lib/ircd/.ircd.entropy", -1); return 1; } @@ -192,7 +192,7 @@ static int init_random() int ret; time_t now; - ret = RAND_load_file(".ircd.entropy", -1); + ret = RAND_load_file("/var/lib/ircd/.ircd.entropy", -1); if(ret <= 0) { if(!make_entropy()) @@ -206,7 +206,7 @@ static int init_random() /* this is probably not too good, but it saves just writing the whole state back to disk with no changes. */ RAND_seed(&now, 4); - RAND_write_file(".ircd.entropy"); + RAND_write_file("/var/lib/ircd/.ircd.entropy"); return 0; } diff -rupN bahamut-1.8.6.orig/src/ircd.c bahamut-1.8.6/src/ircd.c --- bahamut-1.8.6.orig/src/ircd.c 2009-03-04 04:11:01.000000000 +0200 +++ bahamut-1.8.6/src/ircd.c 2010-02-16 09:38:36.000000000 +0200 @@ -172,7 +172,7 @@ void s_die() #ifdef USE_SYSLOG (void) syslog(LOG_CRIT, "Server killed By SIGTERM"); #endif - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp=fopen(tmp, "w"); if(fp!=NULL) { @@ -769,7 +769,7 @@ main(int argc, char *argv[]) exit(0); } - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); mcsfp = fopen(tmp, "r"); if(mcsfp != NULL) { diff -rupN bahamut-1.8.6.orig/src/klines.c bahamut-1.8.6/src/klines.c --- bahamut-1.8.6.orig/src/klines.c 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/src/klines.c 2010-02-16 09:38:36.000000000 +0200 @@ -471,7 +471,7 @@ klinestore_compact(void) journalcount = 0; /* open a compaction file to dump all active klines to */ - ircsnprintf(buf1, sizeof(buf1), "%s/.klines_c", dpath); + ircsnprintf(buf1, sizeof(buf1), "/var/lib/ircd/.klines_c", dpath); newfile = open(buf1, O_WRONLY|O_CREAT|O_TRUNC, 0700); if (newfile < 0) { @@ -548,7 +548,7 @@ klinestore_init(int noreload) char buf1[1024]; FILE *jf; - ircsnprintf(journalfilename, sizeof(journalfilename), "%s/.klines", dpath); + ircsnprintf(journalfilename, sizeof(journalfilename), "/var/lib/ircd/.klines", dpath); if (journal >= 0) { diff -rupN bahamut-1.8.6.orig/src/s_serv.c bahamut-1.8.6/src/s_serv.c --- bahamut-1.8.6.orig/src/s_serv.c 2008-10-10 20:27:25.000000000 +0200 +++ bahamut-1.8.6/src/s_serv.c 2010-02-16 09:38:36.000000000 +0200 @@ -809,7 +809,7 @@ int send_lusers(aClient *cptr, aClient * char tmp[PATH_MAX]; last_stat_save = timeofday; - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp = fopen(tmp, "w"); if (fp != NULL) { Kind Regards, Bennie

Morning Bennie, The --prefix option to ./configure will allow you do alter most of the paths. The reason we don't use static paths as you suggest is that the majority of users keep their installation within a user home directory. This is recommended for a number of reasons - but, even if this isn't required, the correct method would be to use ./configure options to specify install paths. If you wanted to clarify or standardize anything, I would recommend taking a look at the ./configure script and install scripts. Those could be modified to support what you're suggesting. Specifically: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] Those options could be rewritten appropriately. -epiphani On Tue, Feb 16, 2010 at 8:09 AM, Bennie Joubert <bennie.joubert@jsdaav.com> wrote:
Hi
After satisfying the ssl dependency the .irc.entropy file also popped up.
The new diff file:
diff -rupN bahamut-1.8.6.orig/include/config.h bahamut-1.8.6/include/config.h --- bahamut-1.8.6.orig/include/config.h 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/include/config.h 2010-02-16 09:38:36.000000000 +0200 @@ -134,11 +134,13 @@ /* File names * the server will look for these files */ -#define MPATH "ircd.motd" -#define SMPATH "ircd.smotd" -#define LPATH "ircd.log" -#define PPATH "ircd.pid" -#define HPATH "opers.txt" +#define ETCDIR "/etc/ircd" +#define RUNDIR "/var/run/ircd" +#define MPATH ETCDIR "/ircd.motd" +#define SMPATH ETCDIR "ircd.smotd" +#define LPATH "/var/log/ircd/ircd.log" +#define PPATH RUNDIR "/ircd.pid" +#define HPATH ETCDIR "/opers.txt"
/* Services Definitions */ diff -rupN bahamut-1.8.6.orig/src/dh.c bahamut-1.8.6/src/dh.c --- bahamut-1.8.6.orig/src/dh.c 2009-03-01 21:23:59.000000000 +0200 +++ bahamut-1.8.6/src/dh.c 2010-02-16 09:43:49.000000000 +0200 @@ -117,7 +117,7 @@ static inline void entropy_error(void) RAND_SRC, strerror(errno)); printf("ircd needs a %d byte random seed.\n", RAND_BYTES); printf("You can place a file containing random data called" - " .ircd.entropy\nin the directory with your ircd.conf." + " .ircd.entropy\nin the directory /var/lib/ircd." " This file must be at least %d bytes\n", RAND_BYTES); printf("long and should be suitably random.\n"); } @@ -171,10 +171,10 @@ static int make_entropy() printf("Done.\n"); fclose(fp);
- fp = fopen(".ircd.entropy", "w"); + fp = fopen("/var/lib/ircd/.ircd.entropy", "w"); if(!fp) { - printf("Could not open .ircd.entropy for writing: %s\n", + printf("Could not open /var/lib/ircd/.ircd.entropy for writing: %s\n", strerror(errno)); return 0; } @@ -182,7 +182,7 @@ static int make_entropy() fwrite(randbuf, RAND_BYTES * 4, 1, fp); fclose(fp);
- RAND_load_file(".ircd.entropy", -1); + RAND_load_file("/var/lib/ircd/.ircd.entropy", -1);
return 1; } @@ -192,7 +192,7 @@ static int init_random() int ret; time_t now;
- ret = RAND_load_file(".ircd.entropy", -1); + ret = RAND_load_file("/var/lib/ircd/.ircd.entropy", -1); if(ret <= 0) { if(!make_entropy()) @@ -206,7 +206,7 @@ static int init_random() /* this is probably not too good, but it saves just writing the whole state back to disk with no changes. */ RAND_seed(&now, 4); - RAND_write_file(".ircd.entropy"); + RAND_write_file("/var/lib/ircd/.ircd.entropy");
return 0; } diff -rupN bahamut-1.8.6.orig/src/ircd.c bahamut-1.8.6/src/ircd.c --- bahamut-1.8.6.orig/src/ircd.c 2009-03-04 04:11:01.000000000 +0200 +++ bahamut-1.8.6/src/ircd.c 2010-02-16 09:38:36.000000000 +0200 @@ -172,7 +172,7 @@ void s_die() #ifdef USE_SYSLOG (void) syslog(LOG_CRIT, "Server killed By SIGTERM"); #endif - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp=fopen(tmp, "w"); if(fp!=NULL) { @@ -769,7 +769,7 @@ main(int argc, char *argv[]) exit(0); }
- ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); mcsfp = fopen(tmp, "r"); if(mcsfp != NULL) { diff -rupN bahamut-1.8.6.orig/src/klines.c bahamut-1.8.6/src/klines.c --- bahamut-1.8.6.orig/src/klines.c 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/src/klines.c 2010-02-16 09:38:36.000000000 +0200 @@ -471,7 +471,7 @@ klinestore_compact(void) journalcount = 0;
/* open a compaction file to dump all active klines to */ - ircsnprintf(buf1, sizeof(buf1), "%s/.klines_c", dpath); + ircsnprintf(buf1, sizeof(buf1), "/var/lib/ircd/.klines_c", dpath); newfile = open(buf1, O_WRONLY|O_CREAT|O_TRUNC, 0700); if (newfile < 0) { @@ -548,7 +548,7 @@ klinestore_init(int noreload) char buf1[1024]; FILE *jf;
- ircsnprintf(journalfilename, sizeof(journalfilename), "%s/.klines", dpath); + ircsnprintf(journalfilename, sizeof(journalfilename), "/var/lib/ircd/.klines", dpath);
if (journal >= 0) { diff -rupN bahamut-1.8.6.orig/src/s_serv.c bahamut-1.8.6/src/s_serv.c --- bahamut-1.8.6.orig/src/s_serv.c 2008-10-10 20:27:25.000000000 +0200 +++ bahamut-1.8.6/src/s_serv.c 2010-02-16 09:38:36.000000000 +0200 @@ -809,7 +809,7 @@ int send_lusers(aClient *cptr, aClient * char tmp[PATH_MAX];
last_stat_save = timeofday; - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp = fopen(tmp, "w"); if (fp != NULL) {
Kind Regards, Bennie
_______________________________________________ DALnet-src mailing list DALnet-src@lists.dal.net https://lists.dal.net/mailman/listinfo/dalnet-src

Hi Aaron Thanks for the reply. What I know about C/C++ and auto*tools is scary but I am trying to learn. The ./configure script was actually my first attempt. Here are my options: ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-openssl --with-maxconnections=1024 It did not work. I also use "make install INSTALL_DIR=%{buildroot}" (Yes I am trying to package it) Any help would greatly be appreciated. Kind Regards, Bennie On Tue, 2010-02-16 at 08:43 -0500, Aaron Wiebe wrote:
Morning Bennie,
The --prefix option to ./configure will allow you do alter most of the paths. The reason we don't use static paths as you suggest is that the majority of users keep their installation within a user home directory. This is recommended for a number of reasons - but, even if this isn't required, the correct method would be to use ./configure options to specify install paths.
If you wanted to clarify or standardize anything, I would recommend taking a look at the ./configure script and install scripts. Those could be modified to support what you're suggesting. Specifically:
--bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man]
Those options could be rewritten appropriately.
-epiphani
On Tue, Feb 16, 2010 at 8:09 AM, Bennie Joubert <bennie.joubert@jsdaav.com> wrote:
Hi
After satisfying the ssl dependency the .irc.entropy file also popped up.
The new diff file:
diff -rupN bahamut-1.8.6.orig/include/config.h bahamut-1.8.6/include/config.h --- bahamut-1.8.6.orig/include/config.h 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/include/config.h 2010-02-16 09:38:36.000000000 +0200 @@ -134,11 +134,13 @@ /* File names * the server will look for these files */ -#define MPATH "ircd.motd" -#define SMPATH "ircd.smotd" -#define LPATH "ircd.log" -#define PPATH "ircd.pid" -#define HPATH "opers.txt" +#define ETCDIR "/etc/ircd" +#define RUNDIR "/var/run/ircd" +#define MPATH ETCDIR "/ircd.motd" +#define SMPATH ETCDIR "ircd.smotd" +#define LPATH "/var/log/ircd/ircd.log" +#define PPATH RUNDIR "/ircd.pid" +#define HPATH ETCDIR "/opers.txt"
/* Services Definitions */ diff -rupN bahamut-1.8.6.orig/src/dh.c bahamut-1.8.6/src/dh.c --- bahamut-1.8.6.orig/src/dh.c 2009-03-01 21:23:59.000000000 +0200 +++ bahamut-1.8.6/src/dh.c 2010-02-16 09:43:49.000000000 +0200 @@ -117,7 +117,7 @@ static inline void entropy_error(void) RAND_SRC, strerror(errno)); printf("ircd needs a %d byte random seed.\n", RAND_BYTES); printf("You can place a file containing random data called" - " .ircd.entropy\nin the directory with your ircd.conf." + " .ircd.entropy\nin the directory /var/lib/ircd." " This file must be at least %d bytes\n", RAND_BYTES); printf("long and should be suitably random.\n"); } @@ -171,10 +171,10 @@ static int make_entropy() printf("Done.\n"); fclose(fp);
- fp = fopen(".ircd.entropy", "w"); + fp = fopen("/var/lib/ircd/.ircd.entropy", "w"); if(!fp) { - printf("Could not open .ircd.entropy for writing: %s\n", + printf("Could not open /var/lib/ircd/.ircd.entropy for writing: %s\n", strerror(errno)); return 0; } @@ -182,7 +182,7 @@ static int make_entropy() fwrite(randbuf, RAND_BYTES * 4, 1, fp); fclose(fp);
- RAND_load_file(".ircd.entropy", -1); + RAND_load_file("/var/lib/ircd/.ircd.entropy", -1);
return 1; } @@ -192,7 +192,7 @@ static int init_random() int ret; time_t now;
- ret = RAND_load_file(".ircd.entropy", -1); + ret = RAND_load_file("/var/lib/ircd/.ircd.entropy", -1); if(ret <= 0) { if(!make_entropy()) @@ -206,7 +206,7 @@ static int init_random() /* this is probably not too good, but it saves just writing the whole state back to disk with no changes. */ RAND_seed(&now, 4); - RAND_write_file(".ircd.entropy"); + RAND_write_file("/var/lib/ircd/.ircd.entropy");
return 0; } diff -rupN bahamut-1.8.6.orig/src/ircd.c bahamut-1.8.6/src/ircd.c --- bahamut-1.8.6.orig/src/ircd.c 2009-03-04 04:11:01.000000000 +0200 +++ bahamut-1.8.6/src/ircd.c 2010-02-16 09:38:36.000000000 +0200 @@ -172,7 +172,7 @@ void s_die() #ifdef USE_SYSLOG (void) syslog(LOG_CRIT, "Server killed By SIGTERM"); #endif - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp=fopen(tmp, "w"); if(fp!=NULL) { @@ -769,7 +769,7 @@ main(int argc, char *argv[]) exit(0); }
- ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); mcsfp = fopen(tmp, "r"); if(mcsfp != NULL) { diff -rupN bahamut-1.8.6.orig/src/klines.c bahamut-1.8.6/src/klines.c --- bahamut-1.8.6.orig/src/klines.c 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/src/klines.c 2010-02-16 09:38:36.000000000 +0200 @@ -471,7 +471,7 @@ klinestore_compact(void) journalcount = 0;
/* open a compaction file to dump all active klines to */ - ircsnprintf(buf1, sizeof(buf1), "%s/.klines_c", dpath); + ircsnprintf(buf1, sizeof(buf1), "/var/lib/ircd/.klines_c", dpath); newfile = open(buf1, O_WRONLY|O_CREAT|O_TRUNC, 0700); if (newfile < 0) { @@ -548,7 +548,7 @@ klinestore_init(int noreload) char buf1[1024]; FILE *jf;
- ircsnprintf(journalfilename, sizeof(journalfilename), "% s/.klines", dpath); + ircsnprintf(journalfilename, sizeof(journalfilename), "/var/lib/ircd/.klines", dpath);
if (journal >= 0) { diff -rupN bahamut-1.8.6.orig/src/s_serv.c bahamut-1.8.6/src/s_serv.c --- bahamut-1.8.6.orig/src/s_serv.c 2008-10-10 20:27:25.000000000 +0200 +++ bahamut-1.8.6/src/s_serv.c 2010-02-16 09:38:36.000000000 +0200 @@ -809,7 +809,7 @@ int send_lusers(aClient *cptr, aClient * char tmp[PATH_MAX];
last_stat_save = timeofday; - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp = fopen(tmp, "w"); if (fp != NULL) {
Kind Regards, Bennie
_______________________________________________ DALnet-src mailing list DALnet-src@lists.dal.net https://lists.dal.net/mailman/listinfo/dalnet-src

Hey Bennie - a lot of those install options haven't been properly tied into the install script. If you wanted to attack it from that perspective, that would be the route I'd recommend. -Aaron On Tue, Feb 16, 2010 at 9:31 AM, Bennie Joubert <bennie.joubert@jsdaav.com> wrote:
Hi Aaron
Thanks for the reply.
What I know about C/C++ and auto*tools is scary but I am trying to learn. The ./configure script was actually my first attempt. Here are my options:
./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-openssl --with-maxconnections=1024
It did not work. I also use "make install INSTALL_DIR=%{buildroot}" (Yes I am trying to package it)
Any help would greatly be appreciated.
Kind Regards, Bennie
On Tue, 2010-02-16 at 08:43 -0500, Aaron Wiebe wrote:
Morning Bennie,
The --prefix option to ./configure will allow you do alter most of the paths. The reason we don't use static paths as you suggest is that the majority of users keep their installation within a user home directory. This is recommended for a number of reasons - but, even if this isn't required, the correct method would be to use ./configure options to specify install paths.
If you wanted to clarify or standardize anything, I would recommend taking a look at the ./configure script and install scripts. Those could be modified to support what you're suggesting. Specifically:
--bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man]
Those options could be rewritten appropriately.
-epiphani
On Tue, Feb 16, 2010 at 8:09 AM, Bennie Joubert <bennie.joubert@jsdaav.com> wrote:
Hi
After satisfying the ssl dependency the .irc.entropy file also popped up.
The new diff file:
diff -rupN bahamut-1.8.6.orig/include/config.h bahamut-1.8.6/include/config.h --- bahamut-1.8.6.orig/include/config.h 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/include/config.h 2010-02-16 09:38:36.000000000 +0200 @@ -134,11 +134,13 @@ /* File names * the server will look for these files */ -#define MPATH "ircd.motd" -#define SMPATH "ircd.smotd" -#define LPATH "ircd.log" -#define PPATH "ircd.pid" -#define HPATH "opers.txt" +#define ETCDIR "/etc/ircd" +#define RUNDIR "/var/run/ircd" +#define MPATH ETCDIR "/ircd.motd" +#define SMPATH ETCDIR "ircd.smotd" +#define LPATH "/var/log/ircd/ircd.log" +#define PPATH RUNDIR "/ircd.pid" +#define HPATH ETCDIR "/opers.txt"
/* Services Definitions */ diff -rupN bahamut-1.8.6.orig/src/dh.c bahamut-1.8.6/src/dh.c --- bahamut-1.8.6.orig/src/dh.c 2009-03-01 21:23:59.000000000 +0200 +++ bahamut-1.8.6/src/dh.c 2010-02-16 09:43:49.000000000 +0200 @@ -117,7 +117,7 @@ static inline void entropy_error(void) RAND_SRC, strerror(errno)); printf("ircd needs a %d byte random seed.\n", RAND_BYTES); printf("You can place a file containing random data called" - " .ircd.entropy\nin the directory with your ircd.conf." + " .ircd.entropy\nin the directory /var/lib/ircd." " This file must be at least %d bytes\n", RAND_BYTES); printf("long and should be suitably random.\n"); } @@ -171,10 +171,10 @@ static int make_entropy() printf("Done.\n"); fclose(fp);
- fp = fopen(".ircd.entropy", "w"); + fp = fopen("/var/lib/ircd/.ircd.entropy", "w"); if(!fp) { - printf("Could not open .ircd.entropy for writing: %s\n", + printf("Could not open /var/lib/ircd/.ircd.entropy for writing: %s\n", strerror(errno)); return 0; } @@ -182,7 +182,7 @@ static int make_entropy() fwrite(randbuf, RAND_BYTES * 4, 1, fp); fclose(fp);
- RAND_load_file(".ircd.entropy", -1); + RAND_load_file("/var/lib/ircd/.ircd.entropy", -1);
return 1; } @@ -192,7 +192,7 @@ static int init_random() int ret; time_t now;
- ret = RAND_load_file(".ircd.entropy", -1); + ret = RAND_load_file("/var/lib/ircd/.ircd.entropy", -1); if(ret <= 0) { if(!make_entropy()) @@ -206,7 +206,7 @@ static int init_random() /* this is probably not too good, but it saves just writing the whole state back to disk with no changes. */ RAND_seed(&now, 4); - RAND_write_file(".ircd.entropy"); + RAND_write_file("/var/lib/ircd/.ircd.entropy");
return 0; } diff -rupN bahamut-1.8.6.orig/src/ircd.c bahamut-1.8.6/src/ircd.c --- bahamut-1.8.6.orig/src/ircd.c 2009-03-04 04:11:01.000000000 +0200 +++ bahamut-1.8.6/src/ircd.c 2010-02-16 09:38:36.000000000 +0200 @@ -172,7 +172,7 @@ void s_die() #ifdef USE_SYSLOG (void) syslog(LOG_CRIT, "Server killed By SIGTERM"); #endif - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp=fopen(tmp, "w"); if(fp!=NULL) { @@ -769,7 +769,7 @@ main(int argc, char *argv[]) exit(0); }
- ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); mcsfp = fopen(tmp, "r"); if(mcsfp != NULL) { diff -rupN bahamut-1.8.6.orig/src/klines.c bahamut-1.8.6/src/klines.c --- bahamut-1.8.6.orig/src/klines.c 2008-10-10 19:52:21.000000000 +0200 +++ bahamut-1.8.6/src/klines.c 2010-02-16 09:38:36.000000000 +0200 @@ -471,7 +471,7 @@ klinestore_compact(void) journalcount = 0;
/* open a compaction file to dump all active klines to */ - ircsnprintf(buf1, sizeof(buf1), "%s/.klines_c", dpath); + ircsnprintf(buf1, sizeof(buf1), "/var/lib/ircd/.klines_c", dpath); newfile = open(buf1, O_WRONLY|O_CREAT|O_TRUNC, 0700); if (newfile < 0) { @@ -548,7 +548,7 @@ klinestore_init(int noreload) char buf1[1024]; FILE *jf;
- ircsnprintf(journalfilename, sizeof(journalfilename), "% s/.klines", dpath); + ircsnprintf(journalfilename, sizeof(journalfilename), "/var/lib/ircd/.klines", dpath);
if (journal >= 0) { diff -rupN bahamut-1.8.6.orig/src/s_serv.c bahamut-1.8.6/src/s_serv.c --- bahamut-1.8.6.orig/src/s_serv.c 2008-10-10 20:27:25.000000000 +0200 +++ bahamut-1.8.6/src/s_serv.c 2010-02-16 09:38:36.000000000 +0200 @@ -809,7 +809,7 @@ int send_lusers(aClient *cptr, aClient * char tmp[PATH_MAX];
last_stat_save = timeofday; - ircsprintf(tmp, "%s/.maxclients", dpath); + ircsprintf(tmp, "/var/lib/ircd/.maxclients", dpath); fp = fopen(tmp, "w"); if (fp != NULL) {
Kind Regards, Bennie
_______________________________________________ DALnet-src mailing list DALnet-src@lists.dal.net https://lists.dal.net/mailman/listinfo/dalnet-src
_______________________________________________ DALnet-src mailing list DALnet-src@lists.dal.net https://lists.dal.net/mailman/listinfo/dalnet-src
participants (2)
-
Aaron Wiebe
-
Bennie Joubert