summaryrefslogtreecommitdiff
path: root/chat/ircd-hybrid/patches
diff options
context:
space:
mode:
authorseb <seb>2001-10-21 21:26:51 +0000
committerseb <seb>2001-10-21 21:26:51 +0000
commitb0e036a0367825146ef9b897f4a1fa8a86093b83 (patch)
treef41c98ee9a3290611b1423f1e76165e79211a604 /chat/ircd-hybrid/patches
parent3e05afc0659d09a5ad12d876b13870ff2969f618 (diff)
downloadpkgsrc-b0e036a0367825146ef9b897f4a1fa8a86093b83.tar.gz
Added ircd-hybrid version 6.2, an IRC daemon.
Diffstat (limited to 'chat/ircd-hybrid/patches')
-rw-r--r--chat/ircd-hybrid/patches/patch-aa44
-rw-r--r--chat/ircd-hybrid/patches/patch-ab171
-rw-r--r--chat/ircd-hybrid/patches/patch-ac27
-rw-r--r--chat/ircd-hybrid/patches/patch-ad14
-rw-r--r--chat/ircd-hybrid/patches/patch-ae89
-rw-r--r--chat/ircd-hybrid/patches/patch-af24
-rw-r--r--chat/ircd-hybrid/patches/patch-ag36
7 files changed, 405 insertions, 0 deletions
diff --git a/chat/ircd-hybrid/patches/patch-aa b/chat/ircd-hybrid/patches/patch-aa
new file mode 100644
index 00000000000..c3740d818b5
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-aa
@@ -0,0 +1,44 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- Makefile.in.orig Wed Jul 4 22:07:28 2001
++++ Makefile.in
+@@ -76,10 +76,17 @@
+ #IRCDLIBS=-lsocket -lnsl -lucb
+ #IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
+
+-
++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
++INSTALL_PROGRAM_DIR = $(BSD_INSTALL_PROGRAM_DIR)
++INSTALL_DATA = $(BSD_INSTALL_DATA)
++INSTALL_DATA_DIR = $(BSD_INSTALL_DATA_DIR)
++INSTALL_MAN_DIR = $(BSD_INSTALL_MAN_DIR)
++INSTALL_MAN = $(BSD_INSTALL_MAN)
++INSTALL_SCRIPT_DIR = $(BSD_INSTALL_SCRIPT_DIR)
++INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT)
+
+ SHELL=/bin/sh
+-SUBDIRS=zlib src tools
++SUBDIRS=src tools
+ # ZSUBDIRS=zlib $(SUBDIRS)
+
+ MAKE = make ${MFLAGS} 'CFLAGS=${CFLAGS}' 'INSTALL=${INSTALL}' 'LDFLAGS=${LDFLAGS}'
+@@ -137,5 +144,17 @@
+ done
+
+ install: all
+- @./tools/install_ircd
+-
++ $(INSTALL_PROGRAM_DIR) $(DESTDIR)$(SDIR)
++ $(INSTALL_PROGRAM) src/ircd $(DESTDIR)$(SPATH)
++ $(INSTALL_PROGRAM) tools/mkpasswd $(DESTDIR)$(SDIR)/ircd-hybrid-mkpasswd
++ $(INSTALL_PROGRAM) tools/viconf $(DESTDIR)$(SDIR)/ircd-hybrid-viconf
++ ln $(DESTDIR)$(SDIR)/ircd-hybrid-viconf $(DESTDIR)$(SDIR)/ircd-hybrid-viklines
++ ln $(DESTDIR)$(SDIR)/ircd-hybrid-viconf $(DESTDIR)$(SDIR)/ircd-hybrid-vimotd
++ $(INSTALL_PROGRAM) tools/fixklines $(DESTDIR)$(SDIR)/ircd-hybrid-fixklines
++ $(INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid
++ $(INSTALL_DATA) doc/example.conf $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid/ircd.conf
++ $(INSTALL_MAN_DIR) $(DESTDIR)$(PREFIX)/man/man8
++ $(INSTALL_MAN) doc/ircd.8 $(DESTDIR)$(PREFIX)/man/man8/ircd-hybrid.8
++ $(INSTALL_DATA) opers.txt $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid/opers.txt
++ $(INSTALL_SCRIPT_DIR) $(DESTDIR)$(PREFIX)/sbin
++ $(INSTALL_SCRIPT) tools/mkconf $(DESTDIR)$(PREFIX)/sbin/ircd-hybrid-mkconf
diff --git a/chat/ircd-hybrid/patches/patch-ab b/chat/ircd-hybrid/patches/patch-ab
new file mode 100644
index 00000000000..d946d98b664
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ab
@@ -0,0 +1,171 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- include/config.h.orig Wed Sep 26 05:04:02 2001
++++ include/config.h
+@@ -51,8 +51,12 @@
+ * system limits. If you know what you are doing, increase them now
+ */
+
++#ifndef HARD_FDLIMIT_
+ #define HARD_FDLIMIT_ 256
++#endif
++#ifndef INIT_MAXCLIENTS
+ #define INIT_MAXCLIENTS 180
++#endif
+
+ /*
+ * This is how many 'buffer connections' we allow...
+@@ -77,7 +81,9 @@
+ * will be preallocated for the entire whowas array when ircd is started.
+ * You will want to crank this down if you are on a small net.
+ */
++#ifndef NICKNAMEHISTORYLENGTH
+ #define NICKNAMEHISTORYLENGTH 15000
++#endif
+
+ /* Don't change this... */
+ #define HARD_FDLIMIT (HARD_FDLIMIT_ - 10)
+@@ -109,14 +115,22 @@
+ *
+ */
+
++#ifndef DPATH
+ #define DPATH "/usr/local/ircd/"
++#endif
++#ifndef SPATH
+ #define SPATH "/usr/local/ircd/ircd"
++#endif
+ #define CPATH "ircd.conf"
+ #define KPATH "kline.conf"
+ #define DLPATH "kline.conf"
+ #define MPATH "ircd.motd"
++#ifndef LPATH
+ #define LPATH "ircd.log"
++#endif
++#ifndef PPATH
+ #define PPATH "ircd.pid"
++#endif
+ #define HPATH "opers.txt"
+ #define OPATH "opers.motd"
+
+@@ -151,12 +165,16 @@
+ /* NETWORK_NAME
+ * Displayed in place of the servername when SERVERHIDE is enabled
+ */
++#ifndef NETWORK_NAME
+ #define NETWORK_NAME "EFnet"
++#endif
+
+ /* NETWORK_DESC
+ * Displayed in place of the server info when SERVERHIDE is enabled
+ */
++#ifndef NETWORK_DESC
+ #define NETWORK_DESC "Eris Free Network"
++#endif
+
+
+ /* TS_MAX_DELTA and TS_WARN_DELTA - allowed delta for TS when another
+@@ -208,8 +226,12 @@
+ *
+ * These need to be defined if you want to use SYSLOG logging, too.
+ */
++#ifndef FNAME_USERLOG
+ #define FNAME_USERLOG "/usr/local/ircd/users"
++#endif
++#ifndef FNAME_OPERLOG
+ #define FNAME_OPERLOG "/usr/local/ircd/opers"
++#endif
+
+ /* RFC1035_ANAL
+ * Defining this causes ircd to reject hostnames with non-compliant chars.
+@@ -487,13 +509,15 @@
+ * options are:
+ * L_CRIT, L_ERROR, L_WARN, L_NOTICE, L_TRACE, L_INFO, L_DEBUG
+ */
++#ifndef INIT_LOG_LEVEL
+ #define INIT_LOG_LEVEL L_NOTICE
++#endif
+
+ /* USE_LOGFILE - log errors and such to LPATH
+ * If you wish to have the server send 'vital' messages about server
+ * to a logfile, define USE_LOGFILE.
+ */
+-#define USE_LOGFILE
++/* #define USE_LOGFILE */
+
+ /* USE_SYSLOG - log errors and such to syslog()
+ * If you wish to have the server send 'vital' messages about server
+@@ -503,25 +527,27 @@
+ * this option is used unless you tell the system administrator beforehand
+ * and obtain their permission to send messages to the system log files.
+ */
+-#undef USE_SYSLOG
++/* #undef USE_SYSLOG */
+
+ #ifdef USE_SYSLOG
+ /* SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER
+ * If you use syslog above, you may want to turn some (none) of the
+ * spurious log messages for KILL,SQUIT,etc off.
+ */
+-#undef SYSLOG_KILL /* log all operator kills to syslog */
+-#undef SYSLOG_SQUIT /* log all remote squits for all servers to syslog */
+-#undef SYSLOG_CONNECT /* log remote connect messages for other all servs */
+-#undef SYSLOG_USERS /* send userlog stuff to syslog */
+-#undef SYSLOG_OPER /* log all users who successfully become an Op */
++#define SYSLOG_KILL /* log all operator kills to syslog */
++#define SYSLOG_SQUIT /* log all remote squits for all servers to syslog */
++#define SYSLOG_CONNECT /* log remote connect messages for other all servs */
++#define SYSLOG_USERS /* send userlog stuff to syslog */
++#define SYSLOG_OPER /* log all users who successfully become an Op */
+ #undef SYSLOG_BLOCK_ALLOCATOR /* debug block allocator */
+
+ /* LOG_FACILITY - facility to use for syslog()
+ * Define the facility you want to use for syslog(). Ask your
+ * sysadmin which one you should use.
+ */
++#ifndef LOG_FACILITY
+ #define LOG_FACILITY LOG_LOCAL4
++#endif
+
+ #endif /* USE_SYSLOG */
+
+@@ -549,7 +575,9 @@
+ /* MAXSENDQLENGTH - Max amount of internal send buffering
+ * Max amount of internal send buffering when socket is stuck (bytes)
+ */
++#ifndef MAXSENDQLENGTH
+ #define MAXSENDQLENGTH 9000000 /* Recommended value: 9000000 for EFnet */
++#endif
+
+ /* BUFFERPOOL - the maximum size of the total of all sendq's.
+ * Recommended value is 4 times MAXSENDQLENGTH.
+@@ -561,8 +589,8 @@
+ * define IRC_UID to that UID. This should only be defined if you are running
+ * as root and even then perhaps not.
+ */
+-#define IRC_UID 1001
+-#define IRC_GID 31
++#undef IRC_UID
++#undef IRC_GID
+
+ /* CLIENT_FLOOD - client excess flood threshold
+ * this controls the number of bytes the server will allow a client to
+@@ -589,7 +617,7 @@
+ * if there are no servers presently connected to this server
+ * opers are not affected.
+ */
+-#undef NO_CHANOPS_ON_SPLIT
++#undef NO_CHANOPS_ON_SPLIT
+
+ /* NO_JOIN_ON_SPLIT
+ *
+@@ -776,7 +804,9 @@
+
+ /* INITIAL_DBUFS - how many dbufs to preallocate
+ */
++#ifndef INITIAL_DBUFS
+ #define INITIAL_DBUFS 4000 /* preallocate 16 megs of dbufs */
++#endif
+
+ /* MAXBUFFERS - increase socket buffers
+ *
diff --git a/chat/ircd-hybrid/patches/patch-ac b/chat/ircd-hybrid/patches/patch-ac
new file mode 100644
index 00000000000..ade678e0a3f
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/Makefile.in.orig Thu Aug 30 03:54:46 2001
++++ src/Makefile.in
+@@ -6,10 +6,11 @@
+ RM = @RM@
+ MKDEP = ${CC} -MM
+
+-IRCDLIBS = @LIBS@ ../zlib/libz.a
++IRCDLIBS = @LIBS@ -lz
+
+-INCLUDES = -I../include -I../zlib
+-CPPFLAGS = ${INCLUDES} @CPPFLAGS@
++INCLUDES = -I../include
++CPPFLAGS = ${INCLUDES} @CPPFLAGS@ $(DEFS)
++LDFLAGS= @LDFLAGS@
+
+ # For developers
+ # CFLAGS= -g -O2 -Wall
+@@ -187,7 +188,6 @@
+
+ ircd: ${OBJS} version.o
+ ${CC} ${LDFLAGS} -o $@ ${OBJS} version.o ${IRCDLIBS}
+- mv version.c version.c.last
+
+ install: build
+ @echo "Please do a make install from the top level directory"
diff --git a/chat/ircd-hybrid/patches/patch-ad b/chat/ircd-hybrid/patches/patch-ad
new file mode 100644
index 00000000000..a325b858a35
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/client.c.orig Fri Aug 3 17:12:56 2001
++++ src/client.c
+@@ -64,7 +64,9 @@
+ * This means you call MyMalloc 30 some odd times,
+ * rather than 30k times -Dianora
+ */
++#ifndef CLIENTS_PREALLOCATE
+ #define CLIENTS_PREALLOCATE 1024
++#endif
+
+ /*
+ * for Wohali's block allocator
diff --git a/chat/ircd-hybrid/patches/patch-ae b/chat/ircd-hybrid/patches/patch-ae
new file mode 100644
index 00000000000..3a7c1f990c3
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ae
@@ -0,0 +1,89 @@
+$NetBSD: patch-ae,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/ircd.c.orig Wed Jul 18 04:15:26 2001
++++ src/ircd.c
+@@ -58,6 +58,7 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <pwd.h>
++#include <grp.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/file.h>
+@@ -656,15 +657,16 @@
+ int fd;
+ char buff[20];
+ pid_t pidfromfile;
++ ssize_t n;
+
+ if ((fd = open(PPATH, O_RDONLY)) >= 0 )
+ {
+- if (read(fd, buff, sizeof(buff)) == -1)
++ n = read(fd, buff, sizeof(buff));
++ if (n == -1)
+ {
+ /* printf("NOTICE: problem reading from %s (%s)\n", PPATH,
+ strerror(errno)); */
+- }
+- else
++ } else if ( n != 0 )
+ {
+ pidfromfile = atoi(buff);
+ if (pidfromfile != (int)getpid() && !kill(pidfromfile, 0))
+@@ -675,10 +677,6 @@
+ }
+ close(fd);
+ }
+- else
+- {
+- printf("WARNING: problem opening %s: %s\n", PPATH, strerror(errno));
+- }
+ }
+
+ /*
+@@ -835,7 +833,7 @@
+ }
+ #endif
+
+-#if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID))
++#if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID)) || (defined(IRC_USER) && defined(IRC_GROUP))
+
+ setuid(euid);
+
+@@ -862,6 +860,36 @@
+ exit(-1);
+ }
+
++#elif defined(IRC_USER) && defined(IRC_GROUP)
++ {
++ struct passwd *pe;
++ struct group *ge;
++
++ /* run as a specified user and group */
++ fprintf(stderr,"WARNING: running ircd as user %s\n", IRC_USER);
++ fprintf(stderr," and as group %s.\n",IRC_GROUP);
++
++ if ((pe = getpwnam(IRC_USER)) == NULL) {
++ fprintf(stderr,"could not get definition of user " IRC_USER "\n");
++ exit(1);
++ }
++ if ((ge = getgrnam(IRC_GROUP)) == NULL) {
++ fprintf(stderr,"could not get definition of group " IRC_GROUP "\n");
++ exit(1);
++ }
++
++ if (setgid(ge->gr_gid) < 0)
++ {
++ fprintf(stderr,"ERROR: can't setgid(%d)\n", ge->gr_gid);
++ exit(-1);
++ }
++
++ if(setuid(pe->pw_uid) < 0)
++ {
++ fprintf(stderr,"ERROR: can't setuid(%d)\n", pe->pw_uid);
++ exit(-1);
++ }
++ }
+ #else
+ /* check for setuid root as usual */
+ fprintf(stderr,
diff --git a/chat/ircd-hybrid/patches/patch-af b/chat/ircd-hybrid/patches/patch-af
new file mode 100644
index 00000000000..d9012f78b77
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/list.c.orig Wed Jul 18 04:15:27 2001
++++ src/list.c
+@@ -53,7 +53,9 @@
+ for smaller nets who knows? -Dianora
+ */
+
++#ifndef LINK_PREALLOCATE
+ #define LINK_PREALLOCATE 1024
++#endif
+
+ /* Number of aClient structures to preallocate at a time
+ for Efnet 1024 is reasonable
+@@ -64,7 +66,9 @@
+ rather than 30k times -Dianora
+ */
+
++#ifndef USERS_PREALLOCATE
+ #define USERS_PREALLOCATE 1024
++#endif
+
+ void outofmemory(void);
+
diff --git a/chat/ircd-hybrid/patches/patch-ag b/chat/ircd-hybrid/patches/patch-ag
new file mode 100644
index 00000000000..e1ea63296d9
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ag
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- tools/Makefile.in.orig Tue Jul 10 14:40:38 2001
++++ tools/Makefile.in
+@@ -3,8 +3,9 @@
+ CC=@CC@
+ RM=@RM@
+
+-IRCDLIBS = @LIBS@
+-INCLUDEDIR = -I../include -I../zlib
++IRCDLIBS = @LIBS@ -lz
++CPPFLAGS = -I../include @CPPFLAGS@ $(DEFS)
++LDFLAGS = @LDFLAGS@
+
+ mkpasswd_SOURCES = mkpasswd.c
+ mkpasswd_OBJECTS = mkpasswd.o
+@@ -36,7 +37,7 @@
+ $(RM) -f Makefile
+
+ .c.o:
+- $(CC) $(CFLAGS) $(INCLUDEDIR) -c $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+
+ install: build
+ @echo "Please do a make install from the top level directory"
+@@ -46,10 +47,3 @@
+ lint:
+ lint -aacgprxhH $(INCLUDEDIR) $(mkpasswd_SOURCES) $(viconf_SOURCES) $(fixklines_SOURCES) >>../lint.out
+ @echo done
+-
+-# DO NOT DELETE
+-
+-mkpasswd.o: ../include/setup.h ../zlib/zlib.h
+-mkpasswd.o: ../zlib/zconf.h
+-viconf.o: ../include/config.h ../include/setup.h
+-viconf.o: ../zlib/zlib.h ../zlib/zconf.h