ChangeLog | 5 ++- NEWS | 2 +- configure.in | 2 +- contrib/Debian/changelog | 6 +++ contrib/ngircd.spec | 2 +- doc/Makefile.am | 5 ++- doc/Platforms.txt | 25 +++++++------ doc/SSL.txt | 79 +++++++++++++++++++++++++++-------------- doc/Services.txt | 70 ++++++++++++++++++++++++++++++++++++ doc/sample-ngircd.conf | 9 ++--- man/ngircd.8.tmpl | 4 +- man/ngircd.conf.5.tmpl | 4 +- src/ngircd/ngircd.c | 6 ++-- src/testsuite/getpid.sh | 4 ++- src/testsuite/start-server.sh | 2 +- 15 files changed, 166 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4abfca5..8d730bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,10 @@ -- ChangeLog -- -ngIRCd Release 13 +ngIRCd Release 13 (2008-12-25) + + - Updated documentation, especially doc/Services.txt and doc/SSL.txt. + - Make the test suite work on OpenSolaris. ngIRCd 13~rc1 (2008-11-21): - New version numer scheme :-) diff --git a/NEWS b/NEWS index bef4e7d..92a6b35 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ -- NEWS -- -ngIRCd Release 13 +ngIRCd Release 13 (2008-12-25) ngIRCd 13~rc1 (2008-11-21): - New version numer scheme :-) diff --git a/configure.in b/configure.in index 7cc8536..be03945 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ # -- Initialisation -- AC_PREREQ(2.50) -AC_INIT(ngircd, 13~rc1) +AC_INIT(ngircd, 13) AC_CONFIG_SRCDIR(src/ngircd/ngircd.c) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.6) diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog index 6daf595..1e1b0e0 100644 --- a/contrib/Debian/changelog +++ b/contrib/Debian/changelog @@ -1,3 +1,9 @@ +ngircd (13-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 13. + + -- Alexander Barton Thu, 25 Dec 2008 23:09:58 +0100 + ngircd (13~rc1-0ab1) unstable; urgency=low * New "upstream" release candidate 1 for ngIRCd Release 13. diff --git a/contrib/ngircd.spec b/contrib/ngircd.spec index 74992e4..be6a9c0 100644 --- a/contrib/ngircd.spec +++ b/contrib/ngircd.spec @@ -1,5 +1,5 @@ %define name ngircd -%define version 13~rc1 +%define version 13 %define release 1 %define prefix %{_prefix} diff --git a/doc/Makefile.am b/doc/Makefile.am index 394c89b..eba97d9 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2008 by Alexander Barton (alex@barton.de) +# Copyright (c)2001-2008 Alexander Barton (alex@barton.de) # # Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen # der GNU General Public License (GPL), wie von der Free Software Foundation @@ -13,7 +13,8 @@ SUBDIRS = src EXTRA_DIST = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \ - README-BeOS.txt RFC.txt SSL.txt Zeroconf.txt sample-ngircd.conf + README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \ + sample-ngircd.conf maintainer-clean-local: rm -f Makefile Makefile.in diff --git a/doc/Platforms.txt b/doc/Platforms.txt index cd4ba7c..a77cc88 100644 --- a/doc/Platforms.txt +++ b/doc/Platforms.txt @@ -29,28 +29,27 @@ Platform Compiler ngIRCd Date Tester C M T R See alpha/unknown/netbsd3.0 gcc 3.3.3 CVSHEAD 06-05-07 fw Y Y Y Y (3) hppa/unknown/openbsd3.5 gcc 2.95.3 CVSHEAD 04-05-25 alex Y Y Y Y hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y -hppa2.0/unknown/linux-gnu gcc 3.3.5 0.9.x-CVS 05-06-27 alex Y Y Y Y -i386/apple/darwin9.4.0 gcc 4.0.1 0.12.1 08-07-21 alex Y Y Y Y (3) +hppa2.0/unknown/linux-gnu gcc 3.3.5 13~rc1 08-12-02 alex Y Y Y Y +i386/apple/darwin9.5.1 gcc 4.0.1 13~rc1 08-12-02 alex Y Y Y Y (3) i386/pc/solaris2.9 gcc 3.2.2 CVSHEAD 04-02-24 alex Y Y Y Y -i386/pc/solaris2.11 gcc 3.4.3 CVSHEAD 06-08-04 alex Y Y Y Y -i386/pc/solaris2.11 gcc 3.4.3 0.12.1 08-07-21 alex Y Y Y Y (4) +i386/pc/solaris2.11 gcc 3.4.3 13~rc1 08-12-03 alex Y Y Y Y (4) i386/unknown/freebsd5.2.1 gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y i386/unknown/freebsd6.0 gcc 3.4.4 0.10.0-p1 06-08-04 alex Y Y Y Y (3) i386/unknown/freebsd6.1 gcc 3.4.4 CVSHEAD 06-05-07 fw Y Y Y Y (3) -i386/unknown/freebsd7.0 gcc 4.2.1 0.12.1 08-07-21 alex Y Y Y Y (3) +i386/unknown/freebsd6.2 gcc 3.4.6 13~rc1 08-12-04 alex Y Y Y Y (3) +i386/unknown/freebsd7.0 gcc 4.2.1 13~rc1 08-12-04 alex Y Y Y Y (3) i386/unknown/gnu0.3 gcc 3.3.3 0.8.0 04-05-30 alex Y Y n Y -i686/unknown/gnu0.3 gcc 4.3.1 0.12.1 08-08-10 alex Y Y Y Y +i686/unknown/gnu0.3 gcc 4.3.1 13~rc1 08-12-05 alex Y Y Y Y i386/unknown/netbsdelf1.6.1 gcc 2.95.3 CVSHEAD 04-02-24 alex Y Y Y Y i386/unknown/netbsdelf3.0.1 gcc 3.3.3 0.10.0-p1 06-08-30 alex Y Y Y Y (3) -i386/unknown/netbsdelf4.0 gcc 4.1.2 0.12.1 08-07-21 alex Y Y Y Y (3) +i386/unknown/netbsdelf4.0 gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y (3) i386/unknown/openbsd3.9 gcc 3.3.5 0.10.0-p1 06-08-30 alex Y Y Y Y (3) -i386/unknown/openbsd4.1 gcc 3.3.5 0.12.1 08-07-21 alex Y Y n Y (3) -i386/unknown/openbsd4.1 gcc 3.3.5 master 08-07-21 alex Y Y Y Y (3) +i386/unknown/openbsd4.1 gcc 3.3.5 13~rc1 08-12-05 alex Y Y Y Y (3) i686/pc/cygwin gcc 3.3.1 0.8.0 04-05-30 alex Y Y n Y i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y (1) -i686/pc/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y (1) -i386/pc/linux-gnu gcc 4.1.2 0.10.0-p1 06-08-30 alex Y Y Y Y (1) -i386/pc/linux-gnu gcc 4.3.1 0.12.1 08-07-21 alex Y Y Y Y (1) +i686/pc/linux-gnu gcc 3.3.5 13~rc1 08-12-05 alex Y Y Y Y (1) +i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y (1) +i386/pc/linux-gnu gcc 4.3.2 13~rc1 08-12-05 alex Y Y Y Y (1) m68k/apple/aux3.1.1 Orig. A/UX 0.7.x-CVS 03-04-22 alex Y Y Y Y (2) m68k/hp/hp-ux9.10 Orig. HPUX 0.7.x-CVS 03-04-30 goetz Y Y Y Y m88k/dg/dgux5.4R3.10 gcc 2.5.8 CVSHEAD 04-03-15 alex Y Y ? ? @@ -63,6 +62,7 @@ powerpc/unknown/openbsd3.6 gcc 2.95.3 0.10.0 06-10-08 alex Y Y n Y sparc/sun/solaris2.6 gcc 2.95.3 0.7.x-CVS 03-04-22 alex Y Y Y Y sparc/sun/solaris2.7 gcc 3.3 0.8.0 04-05-30 alex Y Y Y Y sparc/unkn./netbsdelf1.6.1 gcc 2.95.3 0.8.0 04-05-30 alex Y Y Y Y +x86_64/unknown/linux-gnu 4.3.2 13~rc1 08-12-05 alex Y Y Y Y (5) Notes @@ -83,3 +83,4 @@ Notes (4) Using the /dev/poll IO interface. +(5) Using the epoll() IO interface. diff --git a/doc/SSL.txt b/doc/SSL.txt index 6ea207e..6b590b8 100644 --- a/doc/SSL.txt +++ b/doc/SSL.txt @@ -1,7 +1,7 @@ ngIRCd - Next Generation IRC Server - (c)2001-2004 by Alexander Barton, + (c)2001-2008 Alexander Barton, alex@barton.de, http://www.barton.de/ ngIRCd is free software and published under the @@ -10,39 +10,70 @@ -- SSL.txt -- -ngIRCd supports SSL/TLSv1 encrypted connections using the -OpenSSL or gnutls library. -Both encryped server <-> client and server <-> server links should work. +ngIRCd supports SSL/TLSv1 encrypted connections using the OpenSSL or GnuTLS +libraries. Both encrypted server-server links as well as client-server links +are supported. -BEWARE! The Code is mostly untested, use at your own risk! +SSL is a compile-time option which is disabled by default. Use one of these +options of the ./configure script to enable it: -Example that creates a self-signed certificate and key (using OpenSSL): -openssl req -newkey rsa:2048 -x509 -keyout server-key.pem \ - -out server-cert.pem -days 1461 + --with-openssl enable SSL support using OpenSSL + --with-gnutls enable SSL support using GnuTLS -Example that creates DH parameters (optional): -openssl dhparam -2 -out dhparams.pem 2048 +You need a SSL certificate, see below for how to create a self-signed one. -Example that creates a self-signed certificate -and key (using gnutls): -certtool --generate-privkey --bits 2048 --outfile server-key.pem -certtool --generate-self-signed --load-privkey server-key.pem \ - --outfile server-cert.pem +Configuration +~~~~~~~~~~~~~ -Example that creates DH parameters (optional): -certtool --generate-dh-params --bits 2048 --outfile dhparams.pem +To enable SSL connections a separate port must be configured: it is NOT +possible to handle unencrypted and encrypted connections on the same port! +This is a limitation of the IRC protocol ... -Alternatively, you may use external programs/tools like stunnel to -make it work: +You have to set (at least) the following configuration variables in the +[GLOBAL] section of ngircd.conf(5): SSLPorts, SSLKeyFile, and SSLCertFile. + +Now IRC clients are able to connect using SSL on the configured port(s). +(Using port 6697 for encrypted connections is common.) + +To enable encrypted server-server links, you have to additionally set +SSLConnect to "yes" in the corresponding [SERVER] section. + + +Creating a self-signed certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +OpenSSL: + +Creating a self-signed certificate and key: + $ openssl req -newkey rsa:2048 -x509 -keyout server-key.pem \ + -out server-cert.pem -days 1461 +Create DH parameters (optional): + $ openssl dhparam -2 -out dhparams.pem 2048 + +GnuTLS: + +Creating a self-signed certificate and key: + $ certtool --generate-privkey --bits 2048 --outfile server-key.pem + $ certtool --generate-self-signed --load-privkey server-key.pem \ + --outfile server-cert.pem +Create DH parameters (optional): + $ certtool --generate-dh-params --bits 2048 --outfile dhparams.pem + + +Alternate approach using stunnel(1) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Alternatively (or if you are using ngIRCd without compiled without support +for GnuTLS/OpenSSL), you can use external programs/tools like stunnel(1) to +get SSL encrypted connections: -Stefan Sperling (stefan at binarchy dot net) mailed me the following text as a +Stefan Sperling (stefan at binarchy dot net) mailed the following text as a short "how-to", thanks Stefan! - === snip === ! This guide applies to stunnel 4.x ! @@ -71,9 +102,3 @@ short "how-to", thanks Stefan! That's it. Don't forget to activate ssl support in your irc client ;) === snip === - - - - --- -$Id: SSL.txt,v 1.2 2004/12/27 01:11:40 alex Exp $ diff --git a/doc/Services.txt b/doc/Services.txt new file mode 100644 index 0000000..67053b1 --- /dev/null +++ b/doc/Services.txt @@ -0,0 +1,70 @@ + + ngIRCd - Next Generation IRC Server + + (c)2001-2008 Alexander Barton, + alex@barton.de, http://www.barton.de/ + + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Services.txt -- + + +At the moment, ngIRCd doesn't implement a "special IRC services interface". +But services acting as a "regular server" are supported, either using the IRC +protocol defined in RFC 1459 or RFC 2812. + +Services have been tested using "IRC Services" version 5.x by Andrew Church, +homepage: . This document describes setting up +ngIRCd and these services. + + +Setting up ngIRCd +~~~~~~~~~~~~~~~~~ + +The "pseudo server" handling the IRC services is configured as a regular +remote server in the ngircd.conf(5). In addition the variable "ServiceMask" +should be set, enabling this ngIRCd to recognize the "pseudo users" as IRC +services instead of regular IRC users. + +Example: + + [SERVER] + Name = services.irc.net + MyPassword = 123abc + PeerPassword = 123abc + ServiceMask = *Serv + + +Setting up IRC Services 5.1.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +IRC Services 5.1.3 and above can be used with ngIRCd using the "rfc1459" +protocol module. + +Please note that versions up to and including 5.1.3 contain a bug that +sometimes causes IRC Services to hang on startup. There are two workarounds: + a) send the services process a HUP signal ("killall -HUP ircservices") + b) apply this patch to the IRC Services source tree: + + +At least the following settings have to be tweaked, in addition to all the +settings marked as required by IRC Services: + +In ircservices.conf: + + Variable Example value + + RemoteServer server.irc.net 6667 "123abc" + ServerName "services.irc.net" + LoadModule protocol/rfc1459 + +In modules.conf: + + Module protocol/rfc1459 + +The documentation of IRC Services can be found here: + + +Please let us know if you are successfully using other IRC service packages or +which problems you encounter, thanks! diff --git a/doc/sample-ngircd.conf b/doc/sample-ngircd.conf index ee60729..041542e 100644 --- a/doc/sample-ngircd.conf +++ b/doc/sample-ngircd.conf @@ -1,14 +1,13 @@ -# $Id: sample-ngircd.conf,v 1.44 2008/01/07 23:02:29 alex Exp $ - # -# This is a sample configuration file for the ngIRCd, which must be adepted -# to the local preferences and needs. +# This is a sample configuration file for the ngIRCd IRC daemon, which must +# be customized to the local preferences and needs. # # Comments are started with "#" or ";". # # A lot of configuration options in this file start with a ";". You have # to remove the ";" in front of each variable to actually set a value! -# The disabled variables are shown with example values for completeness. +# The disabled variables are shown with example values for completeness only +# and the daemon is using compiled-in default settings. # # Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the # server interprets the configuration file as expected! diff --git a/man/ngircd.8.tmpl b/man/ngircd.8.tmpl index 692c188..2fc7a9b 100644 --- a/man/ngircd.8.tmpl +++ b/man/ngircd.8.tmpl @@ -1,7 +1,7 @@ .\" -.\" $Id: ngircd.8.tmpl,v 1.2 2007/11/15 01:03:29 fw Exp $ +.\" ngircd(8) manual page template .\" -.TH ngircd 8 "May 2008" ngircd "ngIRCd Manual" +.TH ngircd 8 "Dec 2008" ngircd "ngIRCd Manual" .SH NAME ngIRCd \- the next generation IRC daemon .SH SYNOPSIS diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl index e4a5d4a..3c6c278 100644 --- a/man/ngircd.conf.5.tmpl +++ b/man/ngircd.conf.5.tmpl @@ -1,7 +1,7 @@ .\" -.\" $Id: ngircd.conf.5.tmpl,v 1.7 2007/11/23 16:26:03 fw Exp $ +.\" ngircd.conf(5) manual page template .\" -.TH ngircd.conf 5 "May 2008" ngircd "ngIRCd Manual" +.TH ngircd.conf 5 "Dec 2008" ngircd "ngIRCd Manual" .SH NAME ngircd.conf \- configuration file of ngIRCd .SH SYNOPSIS diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 1f7969d..b564295 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -828,9 +828,9 @@ NGIRCd_Init( bool NGIRCd_NoDaemon ) pwd = getpwuid( Conf_UID ); grp = getgrgid( Conf_GID ); - Log( LOG_INFO, "Running as user %s(%ld), group %s(%ld), with PID %ld.", - pwd ? pwd->pw_name : "unknown", Conf_UID, - grp ? grp->gr_name : "unknown", Conf_GID, pid); + Log(LOG_INFO, "Running as user %s(%ld), group %s(%ld), with PID %ld.", + pwd ? pwd->pw_name : "unknown", (long)Conf_UID, + grp ? grp->gr_name : "unknown", (long)Conf_GID, (long)pid); if (chrooted) { Log(LOG_INFO, "Running with root directory \"%s\".", diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh index 0d94519..5e16917 100755 --- a/src/testsuite/getpid.sh +++ b/src/testsuite/getpid.sh @@ -7,12 +7,14 @@ # detect flags for "ps" and "head" UNAME=`uname` -if [ $UNAME = "FreeBSD" -o $UNAME = "SunOS" ]; then +if [ $UNAME = "FreeBSD" ]; then PS_FLAGS="-a"; PS_PIDCOL="1"; HEAD_FLAGS="-n 1" elif [ $UNAME = "A/UX" ]; then PS_FLAGS="-ae"; PS_PIDCOL="1"; HEAD_FLAGS="-1" elif [ $UNAME = "GNU" ]; then PS_FLAGS="-ax"; PS_PIDCOL="2"; HEAD_FLAGS="-n 1" +elif [ $UNAME = "SunOS" ]; then + PS_FLAGS="-af"; PS_PIDCOL=2; HEAD_FLAGS="-n 1" else PS_FLAGS="-f"; PS_PIDCOL="2"; HEAD_FLAGS="-n 1" ps $PS_FLAGS > /dev/null 2>&1 diff --git a/src/testsuite/start-server.sh b/src/testsuite/start-server.sh index 15fa3f0..90832a3 100755 --- a/src/testsuite/start-server.sh +++ b/src/testsuite/start-server.sh @@ -45,6 +45,6 @@ pid=`./getpid.sh T-ngircd${id}` [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1; r=$? [ $r -eq 0 ] && echo " ok." || echo " failure!" -exit +exit $r # -eof-