Browse Source

Import upstream version 20.1

Alexander Barton 11 years ago
parent
commit
07c9653510

+ 1 - 1
AUTHORS

@@ -2,7 +2,7 @@
                      ngIRCd - Next Generation IRC Server
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
                            http://ngircd.barton.de/
 
 
-               (c)2001-2012 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
                    terms of the GNU General Public License.
 
 

+ 15 - 1
ChangeLog

@@ -2,13 +2,27 @@
                      ngIRCd - Next Generation IRC Server
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
                            http://ngircd.barton.de/
 
 
-               (c)2001-2012 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
                    terms of the GNU General Public License.
 
 
                                -- ChangeLog --
                                -- ChangeLog --
 
 
 
 
+ngIRCd 20.1 (2013-01-02)
+
+  - Allow ERROR command on server and service links only, ignore them and
+    add a penalty time on all other link types.
+  - Enforced mode setting by IRC Operators: Only check the channel user
+    modes of the initiator if he is joined to the channel and not an IRC
+    operator enforcing modes (which requires the configuration option
+    "OperCanUseMode" to be enabled), because trying to check channel user
+    modes of a non-member results in an assertion when running with debug
+    code or could crash the daemon otherwise. This closes bug #147, thanks
+    to James Kirwill <james.kirwill@bk.ru> for tracking this down!
+  - Fix build system to cope with spaces in path names.
+  - Code cleanups, mostly to fix build warnings on Cygwin.
+
 ngIRCd 20 (2012-12-17)
 ngIRCd 20 (2012-12-17)
 
 
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not

+ 1 - 1
INSTALL

@@ -2,7 +2,7 @@
                      ngIRCd - Next Generation IRC Server
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
                            http://ngircd.barton.de/
 
 
-               (c)2001-2012 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
                    terms of the GNU General Public License.
 
 

+ 5 - 1
NEWS

@@ -2,13 +2,17 @@
                      ngIRCd - Next Generation IRC Server
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
                            http://ngircd.barton.de/
 
 
-               (c)2001-2012 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
                    terms of the GNU General Public License.
 
 
                                   -- NEWS --
                                   -- NEWS --
 
 
 
 
+ngIRCd 20.1 (2013-01-02)
+
+  - This release is a bugfix release only, without new features.
+
 ngIRCd 20 (2012-12-17)
 ngIRCd 20 (2012-12-17)
 
 
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not

+ 1 - 1
README

@@ -2,7 +2,7 @@
                      ngIRCd - Next Generation IRC Server
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
                            http://ngircd.barton.de/
 
 
-               (c)2001-2012 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
                    terms of the GNU General Public License.
 
 

+ 10 - 10
configure

@@ -1,6 +1,6 @@
 #! /bin/sh
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for ngIRCd 20.
+# Generated by GNU Autoconf 2.67 for ngIRCd 20.1.
 #
 #
 # Report bugs to <ngircd-ml@ngircd.barton.de>.
 # Report bugs to <ngircd-ml@ngircd.barton.de>.
 #
 #
@@ -552,8 +552,8 @@ MAKEFLAGS=
 # Identity of this package.
 # Identity of this package.
 PACKAGE_NAME='ngIRCd'
 PACKAGE_NAME='ngIRCd'
 PACKAGE_TARNAME='ngircd'
 PACKAGE_TARNAME='ngircd'
-PACKAGE_VERSION='20'
-PACKAGE_STRING='ngIRCd 20'
+PACKAGE_VERSION='20.1'
+PACKAGE_STRING='ngIRCd 20.1'
 PACKAGE_BUGREPORT='ngircd-ml@ngircd.barton.de'
 PACKAGE_BUGREPORT='ngircd-ml@ngircd.barton.de'
 PACKAGE_URL='http://ngircd.barton.de/'
 PACKAGE_URL='http://ngircd.barton.de/'
 
 
@@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   cat <<_ACEOF
-\`configure' configures ngIRCd 20 to adapt to many kinds of systems.
+\`configure' configures ngIRCd 20.1 to adapt to many kinds of systems.
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
@@ -1339,7 +1339,7 @@ fi
 
 
 if test -n "$ac_init_help"; then
 if test -n "$ac_init_help"; then
   case $ac_init_help in
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ngIRCd 20:";;
+     short | recursive ) echo "Configuration of ngIRCd 20.1:";;
    esac
    esac
   cat <<\_ACEOF
   cat <<\_ACEOF
 
 
@@ -1452,7 +1452,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
 if $ac_init_version; then
   cat <<\_ACEOF
   cat <<\_ACEOF
-ngIRCd configure 20
+ngIRCd configure 20.1
 generated by GNU Autoconf 2.67
 generated by GNU Autoconf 2.67
 
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1985,7 +1985,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 running configure, to aid debugging if configure makes a mistake.
 
 
-It was created by ngIRCd $as_me 20, which was
+It was created by ngIRCd $as_me 20.1, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
 
   $ $0 $@
   $ $0 $@
@@ -2897,7 +2897,7 @@ fi
 
 
 # Define the identity of the package.
 # Define the identity of the package.
  PACKAGE='ngircd'
  PACKAGE='ngircd'
- VERSION='20'
+ VERSION='20.1'
 
 
 
 
 cat >>confdefs.h <<_ACEOF
 cat >>confdefs.h <<_ACEOF
@@ -7763,7 +7763,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 # values after options handling.
 ac_log="
 ac_log="
-This file was extended by ngIRCd $as_me 20, which was
+This file was extended by ngIRCd $as_me 20.1, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_FILES    = $CONFIG_FILES
@@ -7830,7 +7830,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 ac_cs_version="\\
-ngIRCd config.status 20
+ngIRCd config.status 20.1
 configured by $0, generated by GNU Autoconf 2.67,
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
   with options \\"\$ac_cs_config\\"
 
 

+ 6 - 0
contrib/Debian/changelog

@@ -1,3 +1,9 @@
+ngircd (20.1-0ab1) unstable; urgency=low
+
+  * New "upstream" release: ngIRCd 20.1.
+
+ -- Alexander Barton <alex@barton.de>  Wed, 02 Jan 2013 22:37:26 +0100
+
 ngircd (20-0ab1) unstable; urgency=low
 ngircd (20-0ab1) unstable; urgency=low
 
 
   * New "upstream" release: ngIRCd 20.
   * New "upstream" release: ngIRCd 20.

+ 1 - 1
contrib/MacOSX/ngIRCd.pmdoc/index.xml

@@ -5,7 +5,7 @@
 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
 
 
 \f0\i\fs24 \cf0 ngIRCd -- The Next Generation IRC Daemon\
 \f0\i\fs24 \cf0 ngIRCd -- The Next Generation IRC Daemon\
-Copyright (c)2001-2011 Alexander Barton and Contributors.\
+Copyright (c)2001-2013 Alexander Barton and Contributors.\
 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
 
 
 \i0 \cf0 \
 \i0 \cf0 \

+ 1 - 1
contrib/ngircd.spec

@@ -1,5 +1,5 @@
 %define name    ngircd
 %define name    ngircd
-%define version 20
+%define version 20.1
 %define release 1
 %define release 1
 %define prefix  %{_prefix}
 %define prefix  %{_prefix}
 
 

+ 1 - 1
doc/Makefile.am

@@ -11,7 +11,7 @@
 
 
 .tmpl:
 .tmpl:
 	$(AM_V_GEN)sed \
 	$(AM_V_GEN)sed \
-	    -e s@:ETCDIR:@${sysconfdir}@ \
+	    -e "s@:ETCDIR:@${sysconfdir}@" \
 	    <$< >$@
 	    <$< >$@
 
 
 SUFFIXES = .tmpl
 SUFFIXES = .tmpl

+ 1 - 1
doc/Makefile.in

@@ -575,7 +575,7 @@ uninstall-am:
 
 
 .tmpl:
 .tmpl:
 	$(AM_V_GEN)sed \
 	$(AM_V_GEN)sed \
-	    -e s@:ETCDIR:@${sysconfdir}@ \
+	    -e "s@:ETCDIR:@${sysconfdir}@" \
 	    <$< >$@
 	    <$< >$@
 
 
 maintainer-clean-local:
 maintainer-clean-local:

+ 9 - 12
man/Makefile.am

@@ -1,15 +1,12 @@
 #
 #
 # ngIRCd -- The Next Generation IRC Daemon
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 #
-# Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
-# der GNU General Public License (GPL), wie von der Free Software Foundation
-# herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
-# der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
-# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
-# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
-#
-# $Id: Makefile.am,v 1.6 2006/12/25 16:13:26 alex Exp $
+# This program 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; either version 2 of the License, or
+# (at your option) any later version.
+# Please read the file COPYING, README and AUTHORS for more information.
 #
 #
 
 
 TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
 TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
@@ -18,9 +15,9 @@ SUFFIXES = .tmpl .
 
 
 .tmpl:
 .tmpl:
 	$(AM_V_GEN)sed \
 	$(AM_V_GEN)sed \
-	    -e s@:SBINDIR:@${sbindir}@ \
-	    -e s@:BINDIR:@${bindir}@ \
-	    -e s@:ETCDIR:@${sysconfdir}@ \
+	    -e "s@:SBINDIR:@${sbindir}@" \
+	    -e "s@:BINDIR:@${bindir}@" \
+	    -e "s@:ETCDIR:@${sysconfdir}@" \
 	    <$< >$@
 	    <$< >$@
 
 
 man_MANS = ngircd.conf.5 ngircd.8
 man_MANS = ngircd.conf.5 ngircd.8

+ 9 - 12
man/Makefile.in

@@ -17,16 +17,13 @@
 
 
 #
 #
 # ngIRCd -- The Next Generation IRC Daemon
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 #
-# Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
-# der GNU General Public License (GPL), wie von der Free Software Foundation
-# herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
-# der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
-# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
-# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
-#
-# $Id: Makefile.am,v 1.6 2006/12/25 16:13:26 alex Exp $
+# This program 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; either version 2 of the License, or
+# (at your option) any later version.
+# Please read the file COPYING, README and AUTHORS for more information.
 #
 #
 VPATH = @srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgdatadir = $(datadir)/@PACKAGE@
@@ -474,9 +471,9 @@ uninstall-man: uninstall-man5 uninstall-man8
 
 
 .tmpl:
 .tmpl:
 	$(AM_V_GEN)sed \
 	$(AM_V_GEN)sed \
-	    -e s@:SBINDIR:@${sbindir}@ \
-	    -e s@:BINDIR:@${bindir}@ \
-	    -e s@:ETCDIR:@${sysconfdir}@ \
+	    -e "s@:SBINDIR:@${sbindir}@" \
+	    -e "s@:BINDIR:@${bindir}@" \
+	    -e "s@:ETCDIR:@${sysconfdir}@" \
 	    <$< >$@
 	    <$< >$@
 
 
 maintainer-clean-local:
 maintainer-clean-local:

+ 2 - 2
src/ipaddr/ng_ipaddr.c

@@ -49,8 +49,8 @@ ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port)
 	if (ret != 0)
 	if (ret != 0)
 		return false;
 		return false;
 
 
-	assert(sizeof(*addr) >= res0->ai_addrlen);
-	if (sizeof(*addr) >= res0->ai_addrlen)
+	assert(sizeof(*addr) >= (size_t)res0->ai_addrlen);
+	if (sizeof(*addr) >= (size_t)res0->ai_addrlen)
 		memcpy(addr, res0->ai_addr, res0->ai_addrlen);
 		memcpy(addr, res0->ai_addr, res0->ai_addrlen);
 	else
 	else
 		ret = -1;
 		ret = -1;

+ 0 - 18
src/ngircd/conn-func.c

@@ -117,24 +117,6 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds)
 } /* Conn_SetPenalty */
 } /* Conn_SetPenalty */
 
 
 
 
-/**
- * Reset the "penalty time" for one connection.
- *
- * @param Idx Connection index.
- * @see Conn_SetPenalty
- */
-GLOBAL void
-Conn_ResetPenalty(CONN_ID Idx)
-{
-	assert(Idx > NONE);
-
-	My_Connections[Idx].delaytime = 0;
-#ifdef DEBUG
-	Log(LOG_DEBUG, "Penalty time on connection %d has been reset.");
-#endif
-} /* Conn_ResetPenalty */
-
-
 GLOBAL void
 GLOBAL void
 Conn_ClearFlags( void )
 Conn_ClearFlags( void )
 {
 {

+ 0 - 1
src/ngircd/conn-func.h

@@ -45,7 +45,6 @@ GLOBAL long Conn_RecvBytes PARAMS(( CONN_ID Idx ));
 GLOBAL const char *Conn_IPA PARAMS(( CONN_ID Idx ));
 GLOBAL const char *Conn_IPA PARAMS(( CONN_ID Idx ));
 
 
 GLOBAL void Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
 GLOBAL void Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
-GLOBAL void Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
 
 
 GLOBAL void Conn_ClearFlags PARAMS(( void ));
 GLOBAL void Conn_ClearFlags PARAMS(( void ));
 GLOBAL int Conn_Flag PARAMS(( CONN_ID Idx ));
 GLOBAL int Conn_Flag PARAMS(( CONN_ID Idx ));

+ 1 - 1
src/ngircd/irc-mode.c

@@ -550,7 +550,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 		if (arg_arg >= Req->argc)
 		if (arg_arg >= Req->argc)
 			arg_arg = -1;
 			arg_arg = -1;
 
 
-		if(!is_machine) {
+		if(!is_machine && !is_oper) {
 			o_mode_ptr = Channel_UserModes(Channel, Client);
 			o_mode_ptr = Channel_UserModes(Channel, Client);
 			while( *o_mode_ptr ) {
 			while( *o_mode_ptr ) {
 				if ( *o_mode_ptr == 'q')
 				if ( *o_mode_ptr == 'q')

+ 11 - 0
src/ngircd/irc.c

@@ -81,6 +81,17 @@ IRC_ERROR( CLIENT *Client, REQUEST *Req )
 	assert( Client != NULL );
 	assert( Client != NULL );
 	assert( Req != NULL );
 	assert( Req != NULL );
 
 
+	if (Client_Type(Client) != CLIENT_GOTPASS
+	    && Client_Type(Client) != CLIENT_GOTPASS_2813
+	    && Client_Type(Client) != CLIENT_UNKNOWNSERVER
+	    && Client_Type(Client) != CLIENT_SERVER
+	    && Client_Type(Client) != CLIENT_SERVICE) {
+		LogDebug("Ignored ERROR command from \"%s\" ...",
+			 Client_Mask(Client));
+		IRC_SetPenalty(Client, 2);
+		return CONNECTED;
+	}
+
 	if (Req->argc < 1)
 	if (Req->argc < 1)
 		Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
 		Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
 		    Client_Mask(Client));
 		    Client_Mask(Client));

+ 2 - 2
src/ngircd/ngircd.c

@@ -1,6 +1,6 @@
 /*
 /*
  * ngIRCd -- The Next Generation IRC Daemon
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
  *
  *
  * This program is free software; you can redistribute it and/or modify
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * it under the terms of the GNU General Public License as published by
@@ -460,7 +460,7 @@ static void
 Show_Version( void )
 Show_Version( void )
 {
 {
 	puts( NGIRCd_Version );
 	puts( NGIRCd_Version );
-	puts( "Copyright (c)2001-2012 Alexander Barton (<alex@barton.de>) and Contributors." );
+	puts( "Copyright (c)2001-2013 Alexander Barton (<alex@barton.de>) and Contributors." );
 	puts( "Homepage: <http://ngircd.barton.de/>\n" );
 	puts( "Homepage: <http://ngircd.barton.de/>\n" );
 	puts( "This is free software; see the source for copying conditions. There is NO" );
 	puts( "This is free software; see the source for copying conditions. There is NO" );
 	puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );
 	puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );

+ 2 - 2
src/ngircd/resolve.c

@@ -268,9 +268,9 @@ ForwardLookup(const char *hostname, array *IpAddr, int af)
 	}
 	}
 
 
 	for (a = ai_results; a != NULL; a = a->ai_next) {
 	for (a = ai_results; a != NULL; a = a->ai_next) {
-		assert(a->ai_addrlen <= sizeof(addr));
+		assert((size_t)a->ai_addrlen <= sizeof(addr));
 
 
-		if (a->ai_addrlen > sizeof(addr))
+		if ((size_t)a->ai_addrlen > sizeof(addr))
 			continue;
 			continue;
 
 
 		memcpy(&addr, a->ai_addr, a->ai_addrlen);
 		memcpy(&addr, a->ai_addr, a->ai_addrlen);