]> git.pld-linux.org Git - packages/bircd.git/commitdiff
- patch for bIRCd IRC server
authorhawk <hawk@pld-linux.org>
Mon, 2 Aug 2004 18:08:31 +0000 (18:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bircd-config.patch -> 1.1
    bircd-fix.patch -> 1.1
    bircd-makefile.patch -> 1.1

bircd-config.patch [new file with mode: 0644]
bircd-fix.patch [new file with mode: 0644]
bircd-makefile.patch [new file with mode: 0644]

diff --git a/bircd-config.patch b/bircd-config.patch
new file mode 100644 (file)
index 0000000..ffac2f1
--- /dev/null
@@ -0,0 +1,223 @@
+diff -ur bircd.orig/Config bircd/Config
+--- bircd.orig/Config  2004-05-30 11:30:52.000000000 +0200
++++ bircd/Config       2004-08-02 18:42:02.274674232 +0200
+@@ -46,19 +46,19 @@
+ DEFLIBS="none"
+ OSNAME="an unrecgonized operating system"
+ #
+-DPATH="/usr/local/etc/ircd"
+-SPATH="/usr/local/bin/ircd"
+-BPATH="/usr/local/bin"
+-SET_UID=1
+-SET_GID=1
+-HUB=""
++DPATH="/etc/ircd"
++SPATH="/usr/sbin/ircd"
++BPATH="/usr/sbin"
++SET_UID=75
++SET_GID=75
++HUB="Yes"
+ LISTEN_SIZE="5"
+ MAXSENDQLENGTH="3000000"
+ BUFFERPOOL="(10 * MAXSENDQLENGTH)"
+ NICKNAMEHISTORYLENGTH="2000"
+ UNIXPORT=""
+ USE_POLL=""
+-MAXCONNECTIONS="128"
++MAXCONNECTIONS="512"
+ FD_SETSIZE=""
+ #
+@@ -76,8 +76,6 @@
+   n='-n'
+ fi
+-clear
+-
+ if [ "$1" = "-m" ]; then
+   AUTO_CONFIG=""
+ fi
+@@ -895,16 +893,18 @@
+ echo "#endif" >> $SETUP_H
+ FOO=""
++runonce=""
+ while [ -z "$FOO" ] ; do
+-    if [ "$USER" = "root" ]; then
+-      FOO="$DPATH"
+-    else
+-      FOO="${HOME}/ircd"
+-    fi
++    FOO="$DPATH"
+     echo ""
+     echo "What directory are all the server configuration files in?"
+     echo $n "[$FOO] -> $c"
+-    read cc
++    if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
++      read cc
++    else
++      cc=""
++      runonce=Yes
++    fi
+     if [ -z "$cc" ] ; then
+       cc=$FOO
+     fi
+@@ -915,16 +915,18 @@
+ rm -f Makefile.tmp
+ FOO=""
++runonce=""
+ while [ -z "$FOO" ] ; do
+-    if [ "$USER" = "root" ]; then
+-      FOO="$BPATH"
+-    else
+-      FOO="${HOME}/ircd"
+-    fi
++    FOO="$BPATH"
+     echo ""
+     echo "What directory is the ircd binary file in?"
+     echo $n "[$FOO] -> $c"
+-    read cc
++    if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
++      read cc
++    else
++      cc=""
++      runonce=Yes
++    fi
+     if [ -z "$cc" ] ; then
+       cc=$FOO
+     fi
+@@ -973,7 +975,12 @@
+     echo ""
+     echo "Are you running as a HUB?"
+     echo $n "[$FOO] -> $c"
+-    read cc
++    if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
++      read cc
++    else
++      cc=""
++      runonce=Yes
++    fi
+     if [ -z "$cc" ] ; then
+       cc=$FOO
+     fi
+@@ -1166,7 +1173,12 @@
+     echo "If you aren't sure, answer NO. select() will be used instead."
+     echo "Use poll() for non-blocking I/O?"
+     echo $n "[$FOO] -> $c"
++    if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
+       read cc
++    else
++      cc=""
++      runonce=Yes
++    fi
+     if [ -z "$cc" ] ; then
+       cc=$FOO
+     fi
+@@ -1194,7 +1206,12 @@
+     echo "How many file descriptors (or sockets) can the irc server use?"
+     echo "(This value should be the multiply of 64)"
+     echo $n "[$FOO] -> $c"
+-    read cc
++    if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
++      read cc
++    else
++      cc=""
++      runonce=Yes
++    fi
+     if [ -z "$cc" ] ; then
+       cc=$FOO
+     fi
+@@ -1330,10 +1347,8 @@
+ #define NICKNAMEHISTORYLENGTH $NICKNAMEHISTORYLENGTH
+ __EOF__
+-if [ "$USER" = "root" ]; then
+-  echo "#define SET_UID $SET_UID" >> $OPTIONS_H
+-  echo "#define SET_GID $SET_GID" >> $OPTIONS_H
+-fi
++echo "#define SET_UID $SET_UID" >> $OPTIONS_H
++echo "#define SET_GID $SET_GID" >> $OPTIONS_H
+ if [ -n "$USE_POLL" ]; then
+   echo "#define USE_POLL" >> $OPTIONS_H
+diff -ur bircd.orig/doc/example.conf bircd/doc/example.conf
+--- bircd.orig/doc/example.conf        2004-02-21 17:45:02.000000000 +0100
++++ bircd/doc/example.conf     2004-08-02 18:35:44.241144064 +0200
+@@ -13,13 +13,16 @@
+ # I line says who is allowed to connect, this one allows everyone
+ I:*::::10
++# IPv6 addresses may be used in this file like in example below
++#I:[2001:1234::/48]::::10
++
+ # IRCop line type /oper <nick> <Pass> to get power
+-O:*@192.168.0.4:pass:admin:ao:8
++O:*@127.0.0.1:pass:admin:ao:8
+ # N/C/H Lines are what you use when you link.
+-N:192.168.0.1:pass:irc.hub::110
+-C:192.168.0.1:pass:irc.hub:7325:110
+-H:*::irc.hub
++#N:192.168.0.1:pass:irc.hub::110
++#C:192.168.0.1:pass:irc.hub:7325:110
++#H:*::irc.hub
+ # P lines are the port lines these say what ports can be used
+ P:*:::6667
+diff -ur bircd.orig/include/config.h bircd/include/config.h
+--- bircd.orig/include/config.h        2004-05-30 11:31:46.000000000 +0200
++++ bircd/include/config.h     2004-08-02 18:58:33.666959696 +0200
+@@ -37,7 +37,7 @@
+ **
+ ** Define this to enable IPv6 support.
+ */
+-//#define INET6
++#define INET6
+ /* NO_DEFAULT_INVISIBLE
+ **
+@@ -77,7 +77,7 @@
+ ** Define it to have extra logging to users.log, opers.log and rejects.log
+ ** Function is fuzzy and I dont recommend to use it. -- Borg
+ */
+-//#define LOGGING
++#define LOGGING
+ /* NO_DNS
+ **
+@@ -221,15 +221,15 @@
+  * You must define these to something, even if you don't really want them.
+  */
+ #ifndef DPATH
+-#define DPATH   "."             /* dir where all ircd stuff is */
++#define DPATH   "/var/lib/ircd"             /* dir where all ircd stuff is */
+ #endif
+ #ifndef SPATH
+-#define SPATH   "."             /* path to server executeable */
++#define SPATH   "/usr/sbin/ircd"             /* path to server executeable */
+ #endif
+-#define CPATH   "ircd.conf"     /* server configuration file */
+-#define MPATH   "ircd.motd"     /* server MOTD file */
+-#define LPATH   "debug.log"     /* Where the debug file lives, if DEBUGMODE */
+-#define PPATH   "ircd.pid"      /* file for server pid */
++#define CPATH   "/etc/ircd/ircd.conf"     /* server configuration file */
++#define MPATH   "/etc/ircd/ircd.motd"     /* server MOTD file */
++#define LPATH   "/var/log/ircd/debug.log"     /* Where the debug file lives, if DEBUGMODE */
++#define PPATH   "/var/lib/ircd/ircd.pid"      /* file for server pid */
+ /*
+  * Define this filename to maintain a list of persons who log
+@@ -239,9 +239,9 @@
+  * successful use of /oper. FNAME_CONNLOG logs all rejected connections.
+  * These are either full paths or files within DPATH.
+  */
+-#define FNAME_USERLOG "users.log"
+-#define FNAME_OPERLOG "opers.log"
+-#define FNAME_CONNLOG "rejects.log"
++#define FNAME_USERLOG "/var/log/ircd/users.log"
++#define FNAME_OPERLOG "/var/log/ircd/opers.log"
++#define FNAME_CONNLOG "/var/log/ircd/rejects.log"
+ /* CHROOTDIR
diff --git a/bircd-fix.patch b/bircd-fix.patch
new file mode 100644 (file)
index 0000000..bfe9ee9
--- /dev/null
@@ -0,0 +1,25 @@
+diff -ur bircd.orig/src/ircd.c bircd/src/ircd.c
+--- bircd.orig/src/ircd.c      2004-01-07 20:15:56.000000000 +0100
++++ bircd/src/ircd.c   2004-08-02 19:23:00.389983904 +0200
+@@ -975,8 +975,8 @@
+                (void)fprintf(stderr,"WARNING: running ircd with uid = %d\n",SET_UID);
+                (void)fprintf(stderr,"         changing to gid %d.\n",SET_GID);
+                #endif
+-               (void)setuid(SET_UID);
+                (void)setgid(SET_GID);
++               (void)setuid(SET_UID);
+ #else
+                /* check for setuid root as usual */
+                (void)fprintf(stderr,"ERROR: do not run ircd setuid root. Make it setuid a normal user.\n");
+diff -ur bircd.orig/src/s_bsd.c bircd/src/s_bsd.c
+--- bircd.orig/src/s_bsd.c     2004-01-11 09:42:08.000000000 +0100
++++ bircd/src/s_bsd.c  2004-08-02 19:54:40.710091336 +0200
+@@ -643,7 +643,7 @@
+ if(((bootopt&BOOT_CONSOLE) || isatty(0)) && !(bootopt & (BOOT_INETD|BOOT_OPER)))
+   {
+   if(fork())
+-    exit(-1);
++    exit(0);
+   #ifdef TIOCNOTTY
+   if((fd=open("/dev/tty",O_RDWR))>=0)
+     {
diff --git a/bircd-makefile.patch b/bircd-makefile.patch
new file mode 100644 (file)
index 0000000..01f0d06
--- /dev/null
@@ -0,0 +1,17 @@
+diff -ur bircd.orig/Makefile.dist bircd/Makefile.dist
+--- bircd.orig/Makefile.dist   2003-05-03 17:15:14.000000000 +0200
++++ bircd/Makefile.dist        2004-08-02 18:19:52.000000000 +0200
+@@ -77,6 +77,7 @@
+ #
+ DPATH=
+ BPATH=
++DESTDIR=
+ # [CHANGEME]
+ # Some SunOS versions want this.  Try it without first.
+@@ -153,4 +154,4 @@
+       @cd src; ${MAKE} ${MAKEARGS} depend
+ install:
+-      @./ircdinst $(BPATH) $(DPATH)
++      @./ircdinst $(DESTDIR)/$(BPATH) $(DESTDIR)/$(DPATH)
This page took 0.098277 seconds and 4 git commands to generate.