debian/0000755000000000000000000000000011743117246007174 5ustar debian/control0000644000000000000000000000401211665526541010601 0ustar # $Id: control 267 2010-11-30 11:38:09Z kcd-guest $ Source: inspircd Section: net Priority: optional Maintainer: Debian IRC Team Uploaders: Darren Blaber , Mario Iseli , Matt Arnold , Giacomo Catenazzi , Bradley Smith , Guillaume Delacour Build-Depends: debhelper (>= 8.0.0), perl-modules, libgnutls-dev, pkg-config, libldap2-dev, libpcre3-dev, libmysqlclient-dev, libpq-dev, libsqlite3-dev, libssl-dev, zlib1g-dev, libgeoip-dev, libtre-dev, hardening-wrapper Standards-Version: 3.9.2 Homepage: http://www.inspircd.org/ Vcs-Svn: svn://svn.debian.org/pkg-irc/packages/inspircd2/trunk/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-irc/packages/inspircd2/trunk/ Package: inspircd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base Suggests: sqlite3, mysql-server, ldap-server, postgresql, gnutls-bin Provides: ircd Description: Modular IRCd written in C++ InspIRCd is a modular C++ IRC Daemon for several operating systems created to provide a stable, modern, lightweight irc server from scratch and provide a vast number of features in a modularised form using an advanced module API. By keeping the functionality of the main core to a minimum, the server is very stable, fast and customizable. . This package contains the daemon. Package: inspircd-dbg Architecture: any Section: debug Depends: ${misc:Depends}, inspircd (= ${binary:Version}) Priority: extra Description: Modular IRCd written in C++ - debugging symbols InspIRCd is a modular C++ IRC Daemon for several operating systems created to provide a stable, modern, lightweight irc server from scratch and provide a vast number of features in a modularised form using an advanced module API. By keeping the functionality of the main core to a minimum, the server is very stable, fast and customizable. . This package contains the debugging symbols. debian/README.source0000644000000000000000000000127411665465522011365 0ustar README.source for inspircd =========================== This package uses quilt to manage patches, use quilt push -a to get a patched sourcetree after dpkg-source -x and use quilt to generate new patches. Building from SVN: ----------------- #1 Fetch the source tarball from upstream and extract it. i.e. using 'uscan' and 'tar' #2 Change into the generated directory and pull the debian specific files from SVN: svn export svn://svn.debian.org/pkg-irc/packages/inspircd/trunk/debian debian #3 Run fakeroot debian/rules source to generate a new tarball containing only dfsg free content. #4 Build dpkg-buildpackage -uc -us -rfakeroot ---- Note: this documentation is copied from iceape package debian/inspircd.conf0000644000000000000000000000561111665465522011667 0ustar # This is just a more or less working example configuration file, please # customize it for your needs! # # Once more: Please see the examples in /usr/share/doc/inspircd/examples/ debian/inspircd.prerm0000644000000000000000000000153211665465522012065 0ustar #!/bin/sh # prerm script for inspircd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) if test -f /var/run/inspircd.pid; then invoke-rc.d inspircd stop fi ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # #DEBHELPER# exit 0 debian/README.Debian0000644000000000000000000000157111665465522011247 0ustar inspircd for Debian ------------------- Configuration: You will likely want to edit the configuration file, as many default settings will not be suitable for a production network. Please read http://inspircd.org/wiki/Configuration for an outline and overview of various configuration options. SSL: If you would like to use ssl with inspircd, please read http://www.inspircd.org/wiki/GnuTLS_SSL_Module. Install gnutls-bin for the utilities required to generate the certificate. You may also be interested in using CACert instead of a self-signed certificate, in which case, follow the instructions at the Wiki. More information: For the complete documentation of inspircd, please goto the inspircd wiki, http://inspircd.org/wiki/. -- Darren Blaber Fri, 15 Jun 2007 20:05:39 -0400 -- William Pitcock Tue, 18 Dec 2007 15:40:21 -0600 debian/inspircd.install0000644000000000000000000000015411665465522012405 0ustar debian/inspircd.rules etc/inspircd/ debian/inspircd.motd etc/inspircd/ debian/inspircd.conf etc/inspircd/ debian/inspircd.postinst0000644000000000000000000000040511665465522012621 0ustar #! /bin/sh set -e case "$1" in configure) chown -R irc:irc /etc/inspircd chmod 770 /etc/inspircd ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "ERROR: Postinst called with unknown argument!" exit 0 ;; esac #DEBHELPER# exit 0 debian/rules0000755000000000000000000000337311665465522010270 0ustar #!/usr/bin/make -f # -*- makefile -*- # hardening options at build time export DEB_BUILD_HARDENING=1 # use DEB_BUILD_OPTIONS="parallel=n" to parallelize the build ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif # modules selection LDAP_MODULES = m_ldapauth.cpp,m_ldapoper.cpp DATABASES_MODULES = $(LDAP_MODULES),m_mysql.cpp,m_pgsql.cpp,m_sqlite3.cpp REGEX_MODULES = m_regex_pcre.cpp,m_regex_posix.cpp,m_regex_tre.cpp OTHER_MODULES = $(REGEX_MODULES),m_geoip.cpp SSL_MODULE = m_ssl_gnutls.cpp INSPIRCD_MODULES = $(SSL_MODULE),$(DATABASES_MODULES),$(OTHER_MODULES) override_dh_auto_configure: # Enable extra modules ./configure --enable-extras=$(INSPIRCD_MODULES) # Really launch configure ./configure --disable-interactive \ --enable-gnutls \ --prefix=/usr/lib/inspircd \ --config-dir=/etc/inspircd \ --module-dir=/usr/lib/inspircd/modules \ --binary-dir=/usr/sbin # allow parallel build override_dh_auto_build: dh_auto_build --parallel # install override_dh_auto_install: dh_auto_install -- install DESTDIR=$(CURDIR)/debian/inspircd # Delete example files (already in /usr/share/doc/inspircd/examples) rm -f $(CURDIR)/debian/inspircd/etc/inspircd/*.example # delete empty data and log dir rmdir $(CURDIR)/debian/inspircd/usr/lib/inspircd/data \ $(CURDIR)/debian/inspircd/usr/lib/inspircd/logs # debugging symbols package override_dh_strip: dh_strip --dbg-package=inspircd-dbg override_dh_auto_clean: # call distclean instead of clean dh_auto_clean -- distclean # Delete symlinks to extra modules find $(CURDIR)/src/modules/ -type l -exec rm '{}' \; # Remove generated binary rm -f $(CURDIR)/inspircd %: dh $@ debian/inspircd.postrm0000644000000000000000000000144011665465522012262 0ustar #! /bin/sh set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|failed-upgrade|abort-install|abort-upgrade) ;; purge|disappear) rm -rf /var/log/inspircd.log* ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 esac #DEBHELPER# exit 0 debian/dirs0000644000000000000000000000004611665465522010066 0ustar etc/default usr/sbin usr/lib/inspircd debian/inspircd.motd0000644000000000000000000000003711665465522011702 0ustar Please edit /etc/inspircd/motd debian/source/0000755000000000000000000000000011742633476010503 5ustar debian/source/format0000644000000000000000000000001411665465522011710 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211665465522010400 0ustar 8 debian/inspircd.default0000644000000000000000000000036111665465522012363 0ustar # Please customize the configfiles for inspircd in /etc/inspircd/ first and then # set INSPIRCD_ENABLE to '1'. Please note that you can find some examples of # advanced configurations in /usr/share/doc/inspircd/examples/. INSPIRCD_ENABLED=0 debian/inspircd.preinst0000644000000000000000000000123311665465522012422 0ustar #!/bin/sh # preinst script for inspircd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install|upgrade) if test -f /var/run/inspircd.pid; then invoke-rc.d inspircd stop fi;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 debian/watch0000644000000000000000000000022011741104652010212 0ustar version=3 opts=dversionmangle=s/\+dfsg$// \ https://github.com/inspircd/inspircd/downloads /downloads/inspircd/inspircd/InspIRCd-(.+)\.tar\.bz2 debian/inspircd.10000644000000000000000000000666711665465522011116 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH INSPIRCD 1 "June 11, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME inspircd \- A modular C++ IRC Daemon .SH SYNOPSIS .B inspircd [\-\-version] [\-\-config ] [\-\-runasroot] [\-\-nofork] [\-\-nolog] [\-\-logfile ] [\-\-debug] [\-\-testsuite] .br .SH DESCRIPTION This manual page documents briefly the .B inspircd command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBinspircd\fP is a modular C++ IRC Daemon (ircd) for Linux, BSD and Windows systems created to provide a stable, modern, lightweight irc server from scratch and provide a vast number of features in a modularised form using an advanced module API. By keeping the functionality of the main core to a minimum we hope to increase the stability and speed of our project and make it customisable to the needs of many users. InspIRCd is designed primarily to be a custom irc server for the chatspike irc network (irc.chatspike.net) but we are releasing it into the public domain under GPL so that you may benefit yourself from our work. The project is written from scratch, avoiding the inherent instability under large loads which can be seen in many other irc server distributions which have the same featureset. .PP The \fBinspircd\fP command starts the ircd server, using /etc/inspircd/inspircd.conf as its configuration file unless used with \fB\-\-config\fP. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For the complete documentation for inspircd, please see http://inspircd.org/wiki/Main_Page. .TP .B \-\-help Show summary of options. .TP .B \-\-version Show the version and revision ID .TP .B \-\-config Change the file name used for the main configuration file .TP .B \-\-runasroot Allow InspIRCd to run as root, after a short pause and a nag banner to prevent this being done accidentally (NOT RECOMMENDED OR SUPPORTED!) .TP .B \-\-nofork Do not fork to the background on startup, useful for debugging modules .TP .B \-\-nolog Do not write to the logfile, used mostly in conjunction with \-\-debug .TP .B \-\-logfile Change the logfile used .TP .B \-\-debug Force debug logging, overriding the config setting. Usually used with \-\-nolog by the debug launcher .TP .B \-\-testsuite Test suite for debugging purpose .SH SEE ALSO InspIRCd is fully documented by the inspircd documentation team, which is viewable at http://wiki.inspircd.org/. .SH AUTHOR InspIRCd was written by Craig Edwards (Brain), Craig McLure (FrostyCoolSlug), Robin Burchell (w00t), and more (see http://www.inspircd.org/wiki/Credits). .PP This manual page was written by Darren Blaber , for the Debian project (but may be used by others). debian/inspircd.manpages0000644000000000000000000000002211665465522012524 0ustar debian/inspircd.1 debian/inspircd.examples0000644000000000000000000000020311665465522012550 0ustar docs/*.example docs/aliases docs/modules extras/m_sqloper.mysql.sql extras/m_sqloper.postgresql.sql extras/m_sqloper.sqlite3.sql debian/docs0000644000000000000000000000001411665465522010050 0ustar docs/README debian/inspircd.rules0000644000000000000000000000003711665465522012071 0ustar Please edit /etc/inspircd/motd debian/copyright0000644000000000000000000001143111665465522011135 0ustar This package was debianized by Darren Blaber on Fri, 15 Jun 2007 20:05:39 -0400. It was downloaded from . Upstream Authors: Craig Edwards (Brain) , Craig McLure (FrostyCoolSlug) , Robin Burchell (w00t) . (There are lesser contributors, see .) All files except those mentioned below are copyright: Copyright (c) 2002-2007 InspIRCd Development Team (see Upstream Authors) License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; under version 2 of the License. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The following files are licensed under a different license and belong to different copyright holders: "src/inspstring.cpp": Copyright: Copyright (c) 1998 Todd C. Miller License: Three-clause BSD license Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. "src/modules/m_sha256.cpp": Copyright: Copyright (C) 2005 Olivier Gay License: Three-clause BSD license Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. These files have been removed because they're not available with/under a free license: rfc1035.txt rfc1413.txt rfc1459.txt The Debian packaging is (C) 2007, Darren Blaber and is licensed under the GPL, see above. debian/inspircd.init0000644000000000000000000000472011665465522011705 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: inspircd # Required-Start: $remote_fs $network $syslog $time # Required-Stop: $remote_fs $syslog # Should-Start: $local_fs # Should-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start inspircd # Description: Starts the inspircd irc server ### END INIT INFO # GPL Licensed NAME="inspircd" IRCD="/usr/sbin/inspircd" IRCDPID="/var/run/inspircd.pid" IRCDLOG="/var/log/inspircd.log" IRCDCONF="/etc/inspircd/inspircd.conf" IRCDARGS="--logfile $IRCDLOG --config $IRCDCONF" USER="irc" PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin if [ -f "/etc/default/inspircd" ]; then . /etc/default/inspircd fi # Define LSB log_* functions (status_of_proc) . /lib/lsb/init-functions if [ ! -x "$IRCD" ]; then exit 0; fi if [ -f "$IRCDPID" ]; then IRCDPIDN=`cat "$IRCDPID" 2> /dev/null` fi start_ircd() { [ -f "$IRCDPID" ] || ( touch "$IRCDPID" ; chown "$USER" "$IRCDPID" ) [ -f "$IRCDLOG" ] || ( touch "$IRCDLOG" ; chown "$USER:adm" "$IRCDLOG" ; chmod 0640 "$IRCDLOG" ) export LD_LIBRARY_PATH=/usr/lib/inspircd start-stop-daemon --start --quiet --oknodo --chuid "$USER" --pidfile "$IRCDPID" --exec "$IRCD" -- $IRCDARGS start > /dev/null } stop_ircd() { start-stop-daemon --stop --quiet --pidfile "$IRCDPID" > /dev/null 2> /dev/null rm -f "$IRCDPID" return 0 } reload_ircd() { if [ ! -z "$IRCDPIDN" ] && kill -0 $IRCDPIDN 2> /dev/null; then kill -HUP $IRCDPIDN >/dev/null 2>&1 || return 1 return 0 else echo "Error: IRCD is not running." return 1 fi } case "$1" in start) if [ "$INSPIRCD_ENABLED" != "1" ]; then echo -n "Please configure inspircd first and edit /etc/default/inspircd, otherwise inspircd won't start" exit 0 fi echo -n "Starting Inspircd... " start_ircd && echo "done." ;; stop) echo -n "Stopping Inspircd... " stop_ircd && echo "done." ;; status) status_of_proc "$IRCD" "$NAME" && exit 0 || exit $? ;; force-reload|reload) echo -n "Reloading Inspircd... " reload_ircd && echo "done." ;; restart) $0 stop sleep 2s $0 start ;; cron) start_ircd || echo "Inspircd not running, starting it" ;; *) echo "Usage: $0 {start|stop|status|restart|reload|force-reload|cron}" exit 1 esac debian/patches/0000755000000000000000000000000011742633476010632 5ustar debian/patches/01_spelling_error.diff0000644000000000000000000000576611665465522015027 0ustar From: Guillaume Delacour Subject: Fix spelling errors in some modules. Forwarded: http://www.inspircd.org/bugtrack/view.php?id=183 Last-Update: 2011-11-14 --- a/src/commands/cmd_server.cpp +++ b/src/commands/cmd_server.cpp @@ -41,7 +41,7 @@ } else { - user->WriteNumeric(ERR_NOTREGISTERED, "%s :You may not register as a server (servers have seperate ports from clients, change your config)",name.c_str()); + user->WriteNumeric(ERR_NOTREGISTERED, "%s :You may not register as a server (servers have separate ports from clients, change your config)",name.c_str()); } return CMD_FAILURE; } --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -239,7 +239,7 @@ virtual Version GetVersion() { - return Version("Keeps a dynamic log of all XLines created, and stores them in a seperate conf file (xline.db).", VF_VENDOR); + return Version("Keeps a dynamic log of all XLines created, and stores them in a separate conf file (xline.db).", VF_VENDOR); } }; --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -121,7 +121,7 @@ Version GetVersion() { - return Version("Provides the SWHOIS command which allows setting of arbitary WHOIS lines", VF_OPTCOMMON | VF_VENDOR); + return Version("Provides the SWHOIS command which allows setting of arbitrary WHOIS lines", VF_OPTCOMMON | VF_VENDOR); } }; --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -156,7 +156,7 @@ Version GetVersion() { - return Version("Allow/Deny connections based upon an arbitary SQL table", VF_VENDOR); + return Version("Allow/Deny connections based upon an arbitrary SQL table", VF_VENDOR); } }; --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -71,14 +71,14 @@ if (created) { chan = new Channel(channel, TS); - ServerInstance->SNO->WriteToSnoMask('d', "Creation FJOIN recieved for %s, timestamp: %lu", chan->name.c_str(), (unsigned long)TS); + ServerInstance->SNO->WriteToSnoMask('d', "Creation FJOIN received for %s, timestamp: %lu", chan->name.c_str(), (unsigned long)TS); } else { time_t ourTS = chan->age; if (TS != ourTS) - ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN recieved for %s, ourTS: %lu, TS: %lu, difference: %lu", + ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN received for %s, ourTS: %lu, TS: %lu, difference: %lu", chan->name.c_str(), (unsigned long)ourTS, (unsigned long)TS, (unsigned long)(ourTS - TS)); /* If our TS is less than theirs, we dont accept their modes */ if (ourTS < TS) --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -79,7 +79,7 @@ Version ModuleDelayJoin::GetVersion() { - return Version("Allows for delay-join channels (+D) where users dont appear to join until they speak", VF_VENDOR); + return Version("Allows for delay-join channels (+D) where users don't appear to join until they speak", VF_VENDOR); } void ModuleDelayJoin::OnNamesListItem(User* issuer, Membership* memb, std::string &prefixes, std::string &nick) debian/patches/02_disable_rpath_for_extra_modules.diff0000644000000000000000000000356211665465522020374 0ustar From: Guillaume Delacour Subject: Disable rpath build option in modules Last-Update: 2011-11-14 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -28,7 +28,7 @@ /* $ModDesc: SQL Service Provider module for all other m_sql* modules */ /* $CompileFlags: exec("mysql_config --include") */ -/* $LinkerFlags: exec("mysql_config --libs_r") rpath("mysql_config --libs_r") */ +/* $LinkerFlags: exec("mysql_config --libs_r") */ /* THE NONBLOCKING MYSQL API! * --- a/src/modules/extra/m_regex_pcre.cpp +++ b/src/modules/extra/m_regex_pcre.cpp @@ -18,7 +18,7 @@ /* $ModDesc: Regex Provider Module for PCRE */ /* $ModDep: m_regex.h */ /* $CompileFlags: exec("pcre-config --cflags") */ -/* $LinkerFlags: exec("pcre-config --libs") rpath("pcre-config --libs") -lpcre */ +/* $LinkerFlags: exec("pcre-config --libs") -lpcre */ #ifdef WINDOWS # pragma comment(lib, "libpcre.lib") --- a/src/modules/extra/m_regex_tre.cpp +++ b/src/modules/extra/m_regex_tre.cpp @@ -18,7 +18,7 @@ /* $ModDesc: Regex Provider Module for TRE Regular Expressions */ /* $CompileFlags: pkgconfincludes("tre","tre/regex.h","") */ -/* $LinkerFlags: pkgconflibs("tre","/libtre.so","-ltre") rpath("pkg-config --libs tre") */ +/* $LinkerFlags: pkgconflibs("tre","/libtre.so","-ltre") */ /* $ModDep: m_regex.h */ class TRERegexException : public ModuleException --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -20,7 +20,7 @@ /* $ModDesc: Provides SSL support for clients */ /* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */ -/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */ +/* $LinkerFlags: pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */ enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED }; debian/patches/03_CVE-2012-1836.diff0000644000000000000000000000762411740574733013373 0ustar Subject: protect against buffer overflow attack in src/dns.cpp Author: William Pitcock Bug: https://github.com/inspircd/inspircd/pull/1 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667914 Forwarded: not-needed Last-Update: 2012-04-07 --- inspircd-2.0.5.orig/src/dns.cpp +++ inspircd-2.0.5/src/dns.cpp @@ -38,6 +38,8 @@ #include "configreader.h" #include "socket.h" +#define DN_COMP_BITMASK 0xC000 /* highest 6 bits in a DN label header */ + /** Masks to mask off the responses we get from the DNSRequest methods */ enum QueryInfo @@ -98,7 +100,7 @@ DNSRequest(DNS* dns, int id, const std::string &original); ~DNSRequest(); - DNSInfo ResultIsReady(DNSHeader &h, int length); + DNSInfo ResultIsReady(DNSHeader &h, unsigned length); int SendRequests(const DNSHeader *header, const int length, QueryType qt); }; @@ -161,7 +163,10 @@ /* Allocate the processing buffer */ DNSRequest::DNSRequest(DNS* dns, int rid, const std::string &original) : dnsobj(dns) { - res = new unsigned char[512]; + /* hardening against overflow here: make our work buffer twice the theoretical + * maximum size so that hostile input doesn't screw us over. + */ + res = new unsigned char[sizeof(DNSHeader) * 2]; *res = 0; orig = original; RequestTimeout* RT = new RequestTimeout(ServerInstance->Config->dns_timeout ? ServerInstance->Config->dns_timeout : 5, this, rid); @@ -688,11 +693,11 @@ } /** A result is ready, process it */ -DNSInfo DNSRequest::ResultIsReady(DNSHeader &header, int length) +DNSInfo DNSRequest::ResultIsReady(DNSHeader &header, unsigned length) { - int i = 0; + unsigned i = 0, o; int q = 0; - int curanswer, o; + int curanswer; ResourceRecord rr; unsigned short ptr; @@ -790,17 +795,31 @@ switch (rr.type) { + /* + * CNAME and PTR are compressed. We need to decompress them. + */ case DNS_QUERY_CNAME: - /* CNAME and PTR have the same processing code */ case DNS_QUERY_PTR: o = 0; q = 0; while (q == 0 && i < length && o + 256 < 1023) { + /* DN label found (byte over 63) */ if (header.payload[i] > 63) { memcpy(&ptr,&header.payload[i],2); - i = ntohs(ptr) - 0xC000 - 12; + + i = ntohs(ptr); + + /* check that highest two bits are set. if not, we've been had */ + if (!(i & DN_COMP_BITMASK)) + return std::make_pair((unsigned char *) NULL, "DN label decompression header is bogus"); + + /* mask away the two highest bits. */ + i &= ~DN_COMP_BITMASK; + + /* and decrease length by 12 bytes. */ + i =- 12; } else { @@ -813,7 +832,11 @@ res[o] = 0; if (o != 0) res[o++] = '.'; - memcpy(&res[o],&header.payload[i + 1],header.payload[i]); + + if (o + header.payload[i] > sizeof(DNSHeader)) + return std::make_pair((unsigned char *) NULL, "DN label decompression is impossible -- malformed/hostile packet?"); + + memcpy(&res[o], &header.payload[i + 1], header.payload[i]); o += header.payload[i]; i += header.payload[i] + 1; } @@ -822,16 +845,21 @@ res[o] = 0; break; case DNS_QUERY_AAAA: + if (rr.rdlength != sizeof(struct in6_addr)) + return std::make_pair((unsigned char *) NULL, "rr.rdlength is larger than 16 bytes for an ipv6 entry -- malformed/hostile packet?"); + memcpy(res,&header.payload[i],rr.rdlength); res[rr.rdlength] = 0; break; case DNS_QUERY_A: + if (rr.rdlength != sizeof(struct in_addr)) + return std::make_pair((unsigned char *) NULL, "rr.rdlength is larger than 4 bytes for an ipv4 entry -- malformed/hostile packet?"); + memcpy(res,&header.payload[i],rr.rdlength); res[rr.rdlength] = 0; break; default: - memcpy(res,&header.payload[i],rr.rdlength); - res[rr.rdlength] = 0; + return std::make_pair((unsigned char *) NULL, "don't know how to handle undefined type (" + ConvToStr(rr.type) + ") -- rejecting"); break; } return std::make_pair(res,"No error"); debian/patches/04_FTBFS_kfreebsd.diff0000644000000000000000000000073311742631576014502 0ustar Subject: FTBFS on kfreebsd-{amd64,i386} Author: Christoph Egger Bug-Debian: http://bugs.debian.org/668689 Last-Update: 2012-04-14 Forwarded: https://github.com/inspircd/inspircd/issues/64 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -38,6 +38,9 @@ @IFEQ $(SYSTEM) linux LDLIBS += -ldl -lrt @ENDIF +@IFEQ $(SYSTEM) gnukfreebsd + LDLIBS += -ldl -lrt +@ENDIF @IFEQ $(SYSTEM) solaris LDLIBS += -lsocket -lnsl -lrt -lresolv @ENDIF debian/patches/series0000644000000000000000000000020211742567606012042 0ustar 01_spelling_error.diff 02_disable_rpath_for_extra_modules.diff 03_CVE-2012-1836.diff 04_FTBFS_kfreebsd.diff 05_FTBFS_gcc-4.7.diff debian/patches/05_FTBFS_gcc-4.7.diff0000644000000000000000000000060311742632271013745 0ustar From: Guillaume Delacour Subject: FTBFS with gcc-4.7, include unistd.h Origin: http://gcc.gnu.org/gcc-4.7/porting_to.html Forwarded: https://github.com/inspircd/inspircd/issues/65 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include debian/changelog0000644000000000000000000001642011742571646011060 0ustar inspircd (2.0.5-1) unstable; urgency=low * debian/patches/04_FTBFS_kfreebsd.diff: Fix FTBFS on kfreebsd, thanks Christoph Egger (Closes: #668689) * debian/patches/05_FTBFS_gcc-4.7.diff: Fix FTBFS with gcc-4.7, include * debian/watch: Update to github since upstream has moved the project -- Guillaume Delacour Sun, 15 Apr 2012 17:35:01 +0200 inspircd (2.0.5-0.1) unstable; urgency=low [ Guillaume Delacour ] * Add myself to uploaders. * Remove Mario Iseli to uploaders (officially MIA) * New upstream release (Closes: #545233, #519910, #620960, #641299) * debian/rules: + Use hardening build options (DEB_BUILD_HARDENING) + Use debhelper 8 template + Delete unrecognized option "disable-rpath" on configure + Add support for all DFSG extra modules (mysql, sqlite, pgsql, ldap, pcre, geoip) (Closes: #539569) + Allow parallel build through DEB_BUILD_OPTIONS + Don't remove docs/rfc in upstream tarball as the files are not installed * debian/compat: Use debhelper version 8 * debian/control: + Bump to Standards-Version 3.9.2 (no changes needed) + Switch to dpkg-source 3.0 (quilt) format and drop dpatch Build-Depends + Build-Depend on extra modules libraries: libldap2-dev, libpcre3-dev, libmysqlclient-dev, libpq-dev, libsqlite3-dev, libssl-dev, zlib1g-dev, libgeoip-dev, libtre-dev and split to 80 columns + Build-Depends on hardening-wrapper + Build-Depends on debhelper >= 8.0.0 + Depends on lsb-base (debian/inspircd.init) + Suggests sqlite3, mysql-server, ldap-server, postgresql, gnutls-bin + Remove ${shlibs:Depends} and add (= ${binary:Version}) for debugging symbols package + Change Vcs-{Svn,Browser}, point to inspircd2 repository * debian/patches: - 01_fix_config_reload.dpatch: drop old upstream patch - 02_fix_gnutls_config.dpatch: drop old upstream patch - 03_use_pkg-config_gnutls.dpatch: drop old upstream patch - 04_gcc44_fixes.dpatch: drop old upstream patch + 01_spelling_error.diff: fix some spelling errors in modules + 02_disable_rpath_for_extra_modules.diff: disable rpath for modules * debian/inspircd.examples: + Upstream examples files are now in docs/ + Provide upstream databases schemas examples * debian/inspircd.init: + Source /lib/lsb/init-functions and add status parameter + Add dependency on $remote_fs in Required-St{art,op} + Modify IRCDARGS to load /etc/inspircd/inspircd.conf + Delete unnecessary spaces * debian/README.Debian: Delete unnecessary spaces * debian/inspircd.install: Copy configuration files to the right place * debian/inspircd.1: + Fix path of configuration file + Delete unnecessary spaces * debian/watch: update url to project website (SF not up2date) * debian/README.source: use quilt to patch * debian/inspircd.postrm: Don't remove /etc/inspircd as it may contains locally added files * debian/inspircd.conf: Update proposed default configuration due to upstream changes (tags security, performance and log), line break to 80 and load absolute path for /etc/inspircd/inspircd.{motd,rules} [ Jonathan Wiltshire ] * Non-maintainer upload. This is really sponsorship with an added patch, but technically still an NMU. * Patch 03_CVE-2012-1836: protect against buffer overflow vulnerability in src/dns.cpp (merge from upstream) Closes: #667914 CVE-2012-1836 -- Jonathan Wiltshire Sat, 07 Apr 2012 22:25:39 +0100 inspircd (1.1.22+dfsg-4) unstable; urgency=low [ Matt Arnold ] * 03_use_pkg-config_gnutls.dpatch fix gnutls ftbfs Closes: 529823. * Add pkg-config to build-depends * Bump standards version no change * 04_gcc44_fixes.dpatch fix ftbfs on GCC 4.4 Closes: #505368 -- Patch thanks Martin Michlmayr [ Bradley Smith ] * Change section of inspircd-dbg to debug. * Upgrade compat version to 7 and upgrade debhelper build-depends. * Move dh_clean -k to dh_prep. -- Bradley Smith Mon, 22 Jun 2009 19:00:02 +0100 inspircd (1.1.22+dfsg-3) unstable; urgency=low * 02_fix_gnutls_config.dpatch - Fix configure script so GnuTLS module is built. Closes: #510748. -- Bradley Smith Sun, 04 Jan 2009 19:00:13 +0000 inspircd (1.1.22+dfsg-2) unstable; urgency=low * 01_fix_config_reload.dpatch - Fix crash on config reload. -- Bradley Smith Mon, 15 Dec 2008 20:23:01 +0000 inspircd (1.1.22+dfsg-1) unstable; urgency=low [ Matt Arnold ] * New upstream release. * Remove nenolod from Uploaders as requested. * Merge with upstream discontinue our patch series 02, 03. * Upstream change to staticlly linked core. Closes: #506862. [ Bradley Smith ] * Add myself to uploaders. * Misc whitespace fixes. -- Bradley Smith Wed, 03 Dec 2008 17:05:27 +0000 inspircd (1.1.21+dfsg-1) unstable; urgency=low * New upstream release - Upstream reported buffer overrun -- Matt Arnold Sat, 13 Sep 2008 14:11:16 -0400 inspircd (1.1.20+dfsg-1) unstable; urgency=low * New upstream release * add debian/README.source and 'source' target in debian/rules * changed debian policy to 3.8.0 -- Giacomo Catenazzi Thu, 03 Jul 2008 09:02:48 +0200 inspircd (1.1.19+dfsg-1) unstable; urgency=medium * New upstream version -- Darren Blaber Mon, 21 Apr 2008 12:51:01 -0500 inspircd (1.1.18+dfsg-1) unstable; urgency=medium * New stable upstream version, solve CVE-2008-1925 -- Giacomo Catenazzi Tue, 01 Apr 2008 08:57:37 +0200 inspircd (1.1.17+dfsg-2) unstable; urgency=low [ Giacomo Catenazzi ] * init.d script: cleanup (remove bashism, add cron target, remove sleep, remove unused exit) * add debian/inspircd.logrotate, and remore logs on purge -- Giacomo Catenazzi Fri, 28 Mar 2008 08:02:56 +0100 inspircd (1.1.17+dfsg-1) unstable; urgency=low [ Darren Blaber ] * New upstream release, fix /etc/init.d/inspircd stop. * Fix the postrm script so there is no duplicate update-rc.d * Fix the manpage so there are no more errors in it [ Matt Arnold ] * Fix prerm so it works (Closes: #466924) [ Giacomo Catenazzi ] * Added me as uploader * Add again support of dpatch in debian/rules * Build sources only once! * Correct make clean target, not to include generated ./inspircd on sources * Don't change permission of configuration files, when starting inspircd (separation of policy and program). -- Giacomo Catenazzi Thu, 06 Mar 2008 07:56:47 +0100 inspircd (1.1.16+dfsg-1) unstable; urgency=low [ William Pitcock ] * New upstream release. - Upstream has new --disable-rpath feature, dropped patch series. - debian/rules: use --disable-rpath [ Matt Arnold ] * Add prerm script to stop ircd before removal -- Matt Arnold Thu, 17 Jan 2008 11:21:17 -0500 inspircd (1.1.15+dfsg-1) unstable; urgency=low [ Mario Iseli ] * Initial release (Closes: #429317) [ William Pitcock ] * Prepare for uploading to unstable since Mario is on vacation until 2008. [ Darren Blaber ] * Repackaged upstream tarball without non-free components (rfcs were removed) -- Darren Blaber Thu, 20 Dec 2007 00:11:48 -0500 debian/inspircd.logrotate0000644000000000000000000000044111665465522012736 0ustar /var/log/inspircd.log { weekly notifempty missingok create 0640 irc adm rotate 12 compress delaycompress postrotate [ -f '/var/run/inspircd.pid' ] && kill -HUP $(cat /var/run/inspircd.pid) || exit 0 endscript }