]> arthur.barton.de Git - ngircd.git/log
ngircd.git
9 years agoNew "Debian release" 21.1-0ab2 branch-21.x
Alexander Barton [Mon, 14 Jul 2014 10:01:46 +0000 (12:01 +0200)]
New "Debian release" 21.1-0ab2

9 years agoDebian: Don't adjust path names that are correct by default
Alexander Barton [Mon, 14 Jul 2014 09:40:38 +0000 (11:40 +0200)]
Debian: Don't adjust path names that are correct by default

(cherry picked from commit f5944a17e44b1acd642aaeaf1ad551e3b0074fb5)

9 years agoDebian: Correctly set and use "docdir"
Alexander Barton [Mon, 14 Jul 2014 08:55:57 +0000 (10:55 +0200)]
Debian: Correctly set and use "docdir"

(cherry picked from commit 06920df4bb88260aba7d5bf1c2000d2e521bab3e)

10 years agongIRCd Release 21.1 rel-21.1
Alexander Barton [Tue, 25 Mar 2014 13:46:28 +0000 (14:46 +0100)]
ngIRCd Release 21.1

10 years agoUse server password when PAM is compiled in but disabled
Roy Sindre Norangshol [Wed, 26 Feb 2014 23:21:18 +0000 (00:21 +0100)]
Use server password when PAM is compiled in but disabled

(cherry picked from commit 485d0aec813db9966922f17aae044df2d82b0b67)

Conflicts:
src/ngircd/conf.c

10 years agodoc/Platforms.txt: Update from master branch
Alexander Barton [Wed, 19 Mar 2014 01:36:50 +0000 (02:36 +0100)]
doc/Platforms.txt: Update from master branch

10 years agoSpoofed prefixes: Really kill connection on non-server links
Alexander Barton [Tue, 18 Mar 2014 15:27:03 +0000 (16:27 +0100)]
Spoofed prefixes: Really kill connection on non-server links

This fixes commit 6cbe1308 which only killed the connection when the
spoofed prefix itself belonged to a non-server client.

(cherry picked from commit 5009ab3e8c5a6fe7db5c5ad1d3fdc8aecfc64b55)

10 years agoFix two K&R C portability issues
Alexander Barton [Sun, 16 Mar 2014 19:07:08 +0000 (20:07 +0100)]
Fix two K&R C portability issues

Fix the following two errors emitted by the Apple K&R C compiler
on Apple A/UX:

"./class.c", line 47: no automatic aggregate initialization
"./class.c", line 47: illegal lhs of assignment operator

"./conf.c", line 1052: syntax error

Tested on A/UX 3.1.1.

(cherry picked from commit a4ed90ba9af1dce4df3f57f6a7c84097000c7256)

10 years agoCHARCONV: Fix handling conversion errors
Alexander Barton [Sun, 23 Feb 2014 17:20:47 +0000 (18:20 +0100)]
CHARCONV: Fix handling conversion errors

Don't overwrite already converted text!

(cherry picked from commit abf280d5bd5648817135c487a19941b2ef4b0701)

10 years agoServices.txt: Update information for Anope 2.x
Alexander Barton [Sun, 2 Feb 2014 19:28:21 +0000 (20:28 +0100)]
Services.txt: Update information for Anope 2.x

(cherry picked from commit 755562d1477ed28e4e793fb42fa0cc0b295ea1b5)

10 years agoCorrectly use cloaked IRC masks on "INVITE nickname"
Alexander Barton [Mon, 27 Jan 2014 21:59:54 +0000 (22:59 +0100)]
Correctly use cloaked IRC masks on "INVITE nickname"

The cloaked IRC mask of a user is his visible mask, so the daemon has
to use it for generating the "one time" entries for the invite list of
the given channel.

Without this patch, ngIRCd records the real IRC mask which will never
match while the target client is "+x", and even worse, will disclose
the real mask on "MODE #channel +I" commands :-/

Bug reported by Cahata on #ngircd, thanks!

(cherry picked from commit 20b52fe33dc3387d50790ed6da8c47c34277527a)

10 years agoconfigure: Only link "contrib/Debian" if it exists
Alexander Barton [Sun, 26 Jan 2014 22:40:58 +0000 (23:40 +0100)]
configure: Only link "contrib/Debian" if it exists

This isn't the case on "VPATH builds", for example.

(cherry picked from commit 14a84dfca57efeb744aa6219ca7776dc629871b7)

10 years agoUse $(MKDIR_P) instead of $(mkinstalldirs) in Makefile's
Alexander Barton [Fri, 17 Jan 2014 20:04:10 +0000 (21:04 +0100)]
Use $(MKDIR_P) instead of $(mkinstalldirs) in Makefile's

And test for "mkdir -p" using AC_PROG_MKDIR_P in "configure".

(cherry picked from commit 90062111f7fd3be5941d94781470b391bebfccaa)

10 years agoFix configure script and "make check" for TCP Wrappers
Alexander Barton [Fri, 17 Jan 2014 15:18:55 +0000 (16:18 +0100)]
Fix configure script and "make check" for TCP Wrappers

Add missing #include's and static variables.

Problem spotted on OpenBSD.

(cherry picked from commit e747fe92775f577a38f8dd681f7a58f751348f5e)

Conflicts:
configure.ng
src/portab/portabtest.c

10 years agoAdd libwrap at the end of the configure run
Alexander Barton [Fri, 17 Jan 2014 15:10:34 +0000 (16:10 +0100)]
Add libwrap at the end of the configure run

If libwrap becomes added earlier, other tests may fail because of not all
external variables required by libwrap are available when linking: for
example allow_severity and deny_severity.

This patch adds generic support for the LDFLAGS_END and LIBS_END variables
(CFLAGS_END has been implemented already).

Problem spotted on OpenBSD.

(cherry picked from commit 0f85c4c6a70a71c935af9c28e2c469ea4b66220a)

Conflicts:
configure.ng

10 years agoplatformtest.sh: don't use "test -e", it isn't portable
Alexander Barton [Sat, 4 Jan 2014 23:48:31 +0000 (00:48 +0100)]
platformtest.sh: don't use "test -e", it isn't portable

(cherry picked from commit e2b85ccde360ccc389afb0af12d5d75f0549f666)

10 years agoMakefile.am: don't use "test -e", it isn't portable
Alexander Barton [Sat, 4 Jan 2014 23:12:00 +0000 (00:12 +0100)]
Makefile.am: don't use "test -e", it isn't portable

(cherry picked from commit 7b358a57acfbb6e70f7c63d796b1e45e86431d1f)

10 years agoUpdate Copyright notices for 2014
Alexander Barton [Thu, 2 Jan 2014 14:27:07 +0000 (15:27 +0100)]
Update Copyright notices for 2014

(cherry picked from commit 788da901ee3fa525a38dc99016d2612f6b945352)

10 years agoFix permanent k/gline
Federico G. Schwindt [Sun, 8 Dec 2013 01:43:55 +0000 (01:43 +0000)]
Fix permanent k/gline

Reported by Toni Spets (hifi - at - jnz - dot - fi).

(cherry picked from commit 9230f2fff1d374ecef93dafeb14099f22c9ef787)

10 years agoWEBIRC: Don't respect hostname when DNS is disabled
Alexander Barton [Fri, 27 Dec 2013 21:34:47 +0000 (22:34 +0100)]
WEBIRC: Don't respect hostname when DNS is disabled

When DNS lookups are disabled, don't set the hostname received by the
WEBIRC command, but use the IP address instead.

Reported by Toni Spets <toni.spets@iki.fi>, thanks!

Closes bug #167.

(cherry picked from commit 1a628fff51fcfddde391e6c0f27686835e1b6d2e)

10 years agoOS X has a working getaddrinfo() implementation
Alexander Barton [Fri, 27 Dec 2013 20:35:53 +0000 (21:35 +0100)]
OS X has a working getaddrinfo() implementation

(cherry picked from commit bd33bd770decd470577487fa4bd399cb1d8426fc)

10 years agoCheck for working getaddrinfo() function
Alexander Barton [Mon, 11 Nov 2013 23:28:50 +0000 (00:28 +0100)]
Check for working getaddrinfo() function

At least AIX 4.3.3 and 5.1 have a broken implementation of getaddrinfo()
which doesn't handle "0" as numeric service correctly. This patch adds
a configure check for this case and changes all calling functions to only
use getaddrinfo() if it "works".

See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html>

(cherry picked from commit b8433e9261c516d7b8743b33681050b6666192e5)

Conflicts:
configure.ng

10 years agoOnly use unsetenv() when it is available
Alexander Barton [Sun, 10 Nov 2013 16:08:41 +0000 (17:08 +0100)]
Only use unsetenv() when it is available

AIX 4.3 dosn't support it, for example.

(cherry picked from commit ae00c100acdb4d2d3f99524d30258d07eefcfb6d)

10 years agoconf-ssl.h: make code compatible with pre-ANSI C compilers
Alexander Barton [Sat, 9 Nov 2013 22:42:56 +0000 (23:42 +0100)]
conf-ssl.h: make code compatible with pre-ANSI C compilers

(cherry picked from commit 61d1c864c55291c1f5f81f284e984b044fe2722f)

10 years agovsnprintf.c: make code compatible with ansi2knr tool
Alexander Barton [Sat, 9 Nov 2013 22:41:20 +0000 (23:41 +0100)]
vsnprintf.c: make code compatible with ansi2knr tool

(cherry picked from commit 8d25044ce515e25f453d22426c484a11d00af0f1)

10 years agoRemove wrong #ifdef in Option_String()
Alexander Barton [Fri, 1 Nov 2013 18:12:35 +0000 (19:12 +0100)]
Remove wrong #ifdef in Option_String()

This fixes the following error when compiling without zlib support:

  irc.c: In function ‘Option_String’:
  irc.c:487: error: ‘options’ undeclared (first use in this function)

Reported by "der_baer" on #ngircd.

(cherry picked from commit 4ab688c5e82281c4d9ad2a4498523b1722c1f738)

10 years agongIRCd Release 21 rel-21
Alexander Barton [Wed, 30 Oct 2013 21:20:36 +0000 (22:20 +0100)]
ngIRCd Release 21

10 years agodoc/Platforms.txt: add Mac OS X 10.6.8
Alexander Barton [Wed, 30 Oct 2013 21:13:21 +0000 (22:13 +0100)]
doc/Platforms.txt: add Mac OS X 10.6.8

10 years agoUpdate doc/Platforms.txt
Alexander Barton [Sun, 27 Oct 2013 23:00:06 +0000 (00:00 +0100)]
Update doc/Platforms.txt

10 years agongircd.init: Make sure no stale PID file is left over
Alexander Barton [Sat, 26 Oct 2013 19:34:56 +0000 (21:34 +0200)]
ngircd.init: Make sure no stale PID file is left over

10 years agoplatformtest.sh/Platforms.txt: allow user names up to 8 characters
Alexander Barton [Tue, 22 Oct 2013 12:15:34 +0000 (14:15 +0200)]
platformtest.sh/Platforms.txt: allow user names up to 8 characters

10 years agoCheck and call arc4random_stir() if present
Federico G. Schwindt [Wed, 23 Oct 2013 15:00:26 +0000 (16:00 +0100)]
Check and call arc4random_stir() if present

FreeBSD prior to 10.0 does not automatically stir on fork(). Same with
current NetBSD. If arc4random_stir() is present assume is needed and
call it instead of srand().

10 years agoDebian: Fix sed(1) rules adjusting "ngircd-full" package
Alexander Barton [Sun, 20 Oct 2013 16:32:50 +0000 (18:32 +0200)]
Debian: Fix sed(1) rules adjusting "ngircd-full" package

Error introduced by last commit :-/

10 years agoDebian: Fix default "HelpFile" file name in ngircd.conf
Alexander Barton [Sun, 20 Oct 2013 16:06:21 +0000 (18:06 +0200)]
Debian: Fix default "HelpFile" file name in ngircd.conf

The "full" package variants must use "/usr/share/doc/ngircd-full/Commands.txt"
and "/usr/share/doc/ngircd-full-dbg/Commands.txt" respectively.

10 years agongIRCd Release 21~rc2 rel-21-rc2
Alexander Barton [Sun, 20 Oct 2013 13:51:03 +0000 (15:51 +0200)]
ngIRCd Release 21~rc2

10 years agoplatformtest.sh: Detect clang compilers
Alexander Barton [Sun, 20 Oct 2013 13:25:19 +0000 (15:25 +0200)]
platformtest.sh: Detect clang compilers

10 years agoAdd support for longer config lines
Federico G. Schwindt [Thu, 17 Oct 2013 21:10:53 +0000 (22:10 +0100)]
Add support for longer config lines

With the introduction of CipherList we could have longer config lines.
Handle up to 1024 bytes and warn if the line will be truncated.

10 years agoReport the correct file on error
Federico G. Schwindt [Thu, 17 Oct 2013 20:52:15 +0000 (21:52 +0100)]
Report the correct file on error

10 years agodoc/Platforms.txt: Add Open64 and tcc C compilers on Linux
Alexander Barton [Wed, 16 Oct 2013 20:27:38 +0000 (22:27 +0200)]
doc/Platforms.txt: Add Open64 and tcc C compilers on Linux

Thanks to Götz Hoffart!

10 years agoplatformtest.sh: Detect tcc compiler
Alexander Barton [Wed, 16 Oct 2013 19:59:23 +0000 (21:59 +0200)]
platformtest.sh: Detect tcc compiler

10 years agoAdd support for arc4random
Federico G. Schwindt [Wed, 16 Oct 2013 10:15:27 +0000 (11:15 +0100)]
Add support for arc4random

If arc4random is present it will be used over the srand/rand interface.
This fixes some warnings in OpenBSD-current.

10 years agoFix another strcat warning missed in commit 4c5b43
Federico G. Schwindt [Wed, 16 Oct 2013 09:40:14 +0000 (10:40 +0100)]
Fix another strcat warning missed in commit 4c5b43

10 years agoplatformtest.sh: Clean up GIT source tree, when possible
Alexander Barton [Mon, 14 Oct 2013 21:47:07 +0000 (23:47 +0200)]
platformtest.sh: Clean up GIT source tree, when possible

10 years agoplatformtest.sh: Detect Apple LLVM (clang) compiler
Alexander Barton [Mon, 14 Oct 2013 21:45:59 +0000 (23:45 +0200)]
platformtest.sh: Detect Apple LLVM (clang) compiler

10 years agoUpdate (date of) manual pages
Alexander Barton [Mon, 7 Oct 2013 21:02:27 +0000 (23:02 +0200)]
Update (date of) manual pages

10 years agoChnageLog file: even more spelling fixes ...
Alexander Barton [Mon, 7 Oct 2013 20:17:49 +0000 (22:17 +0200)]
ChnageLog file: even more spelling fixes ...

10 years agoINSTALL file: Update "Upgrade Information"
Alexander Barton [Mon, 7 Oct 2013 20:15:22 +0000 (22:15 +0200)]
INSTALL file: Update "Upgrade Information"

10 years agoFix spelling in NEWS and ChangeLog files
Alexander Barton [Mon, 7 Oct 2013 19:59:02 +0000 (21:59 +0200)]
Fix spelling in NEWS and ChangeLog files

10 years agongircd.c, main(): use strlcat() instead of strcat()
Alexander Barton [Mon, 7 Oct 2013 19:56:09 +0000 (21:56 +0200)]
ngircd.c, main(): use strlcat() instead of strcat()

This fixes the following warning on OpenBSD 5.3:

 ngircd.o(.text+0xeb4): In function `main':
  src/ngircd/ngircd.c:300: warning: strcat() is almost always misused,
                                    please use strlcat()

Thanks to Götz Hoffart for reporting this!

10 years agongIRCd Release 21~rc1 rel-21-rc1
Alexander Barton [Sat, 5 Oct 2013 21:40:29 +0000 (23:40 +0200)]
ngIRCd Release 21~rc1

10 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Wed, 2 Oct 2013 00:10:48 +0000 (02:10 +0200)]
Update NEWS and ChangeLog files

10 years agoActually KILL clients on GLINE/KLINE
Alexander Barton [Tue, 1 Oct 2013 10:09:59 +0000 (12:09 +0200)]
Actually KILL clients on GLINE/KLINE

Kill all clients that match a new GLINE/KLINE mask and genrate apropriate
KILL commands. These KILL commands can be superfluous, but are required
when the IRC Operator isn't allowd to set remote G-Lines or if there are
older servers in the network that don't kill clients on GLINE/KLINE.

Closes bug #156.

10 years agoDon't forward KILL commands for unknown clients
Alexander Barton [Thu, 26 Sep 2013 00:58:01 +0000 (02:58 +0200)]
Don't forward KILL commands for unknown clients

10 years agoNew function IRC_KillClient() to kill clients
Alexander Barton [Tue, 1 Oct 2013 10:13:17 +0000 (12:13 +0200)]
New function IRC_KillClient() to kill clients

The old local function Kill_Nick() in irc.c has been an ugly hack. This
patch implements a generic function for killing clients.

Adjust all callers of Kill_Nick() and respect the return code!

10 years agoAdjust log messages for invalid and spoofed prefixes
Alexander Barton [Thu, 26 Sep 2013 00:26:24 +0000 (02:26 +0200)]
Adjust log messages for invalid and spoofed prefixes

Now invalid prefixes aren't logged no more when originating from an other
server (besides in debug mode), and spoofed prefixes are correctly logged
using LOG_WARNING (from an other server) or LOG_ERR (from a client) levels.

In addition, the log message texts have been adjusted to better reflect
what will happen: commands with invalid prefixes are ignored and logged,
commands with spoofed prefixes will result in the client being disconncted
(regular users) or the command being ignored (other servers).

This cleans up logging of commands related to already KILL'ed clients.

10 years agoRemove CLIENT.oper_by_my, Client_SetOperByMe() and Client_OperByMe()
Alexander Barton [Tue, 24 Sep 2013 23:29:23 +0000 (01:29 +0200)]
Remove CLIENT.oper_by_my, Client_SetOperByMe() and Client_OperByMe()

All places where Client_OperByMe() is used can either be converted to
Client_HasMode(Client, 'o') or Op_Check().

And Op_Check() itself can use the connection handle for deciding whether
the IRC Operator is a local user or not.

10 years agoAdd support to show user links using "STATS L"
Federico G. Schwindt [Wed, 18 Sep 2013 22:51:44 +0000 (23:51 +0100)]
Add support to show user links using "STATS L"

Change "stats L" to show servers and user links and restrict it to
IRC Operators.

10 years agoLog an error (not info) when working directory can't be changed
Alexander Barton [Mon, 23 Sep 2013 22:04:54 +0000 (00:04 +0200)]
Log an error (not info) when working directory can't be changed

10 years agodoc/PAM.txt: add a slightly more useful example
Alexander Barton [Wed, 18 Sep 2013 22:17:36 +0000 (00:17 +0200)]
doc/PAM.txt: add a slightly more useful example

10 years agoChange the certificate fingerprint digest to sha256
Federico G. Schwindt [Tue, 17 Sep 2013 16:33:12 +0000 (17:33 +0100)]
Change the certificate fingerprint digest to sha256

While here correct some indentation.

10 years agoChange cipher defaults
Federico G. Schwindt [Tue, 17 Sep 2013 15:16:51 +0000 (16:16 +0100)]
Change cipher defaults

Switch cipher defaults to HIGH:!aNULL:@STRENGTH (OpenSSL) or
SECURE128 (GnuTLS).

10 years agoMerge remote-tracking branch 'alex/bug162-SSLCipherList'
Alexander Barton [Mon, 16 Sep 2013 15:32:25 +0000 (17:32 +0200)]
Merge remote-tracking branch 'alex/bug162-SSLCipherList'

* alex/bug162-SSLCipherList:
  Cipher list selection for GnuTLS
  ConnSSL_Init_SSL(): correctly set CONN_SSL flag
  Cipher list selection for OpenSSL
  ConnSSL_InitLibrary(): Code cleanup

10 years agoFix server reconnection
Federico G. Schwindt [Mon, 16 Sep 2013 01:15:49 +0000 (02:15 +0100)]
Fix server reconnection

In some error cases conn_id will be left as SERVER_WAIT and
subsequently ignored in Check_Servers(). Ensure conn_id is set to
NONE before returning from New_Server() if we couldn't establish
the connection.

Prompted by a report from gabrielgi-at-gmail-dot-com.

10 years agoDon't ignore SSL-related errors during startup
Alexander Barton [Sun, 15 Sep 2013 22:31:03 +0000 (00:31 +0200)]
Don't ignore SSL-related errors during startup

Without this patch, ngIRCd ignores SSL-related messages and continues
to start up but only listens on plain text communication ports -- and
this most probably isn't what the administrator wanted ...

Closes bug #163.

10 years agoCipher list selection for GnuTLS
Alexander Barton [Sun, 15 Sep 2013 15:57:41 +0000 (17:57 +0200)]
Cipher list selection for GnuTLS

This patch implements the missing functionality for cipher list selection
using GnuTLS (our OpenSSL code has this already).

10 years agoConnSSL_Init_SSL(): correctly set CONN_SSL flag
Alexander Barton [Sun, 15 Sep 2013 15:35:52 +0000 (17:35 +0200)]
ConnSSL_Init_SSL(): correctly set CONN_SSL flag

The CONN_SSL flag must be set before any calls to ConnSSL_Free()!

10 years agoCipher list selection for OpenSSL
Alexander Barton [Sun, 15 Sep 2013 13:09:36 +0000 (15:09 +0200)]
Cipher list selection for OpenSSL

This patch introduces the possibility to arbitrarily select ciphers which
should be promoted resp. declined when establishing a SSL connection
with a client by implementing the new configuration option "CipherList".

By default, OpenSSL would accept low and medium strength and RC-4 ciphers,
which nowadays are known to be broken.

This patch only implements the feature for OpenSSL. A GnuTLS counterpart
has to be implemented in another patch ...

Original patch by Bastian <bastian-ngircd@t6l.de>.

Closes bug #162.

10 years agoConnSSL_InitLibrary(): Code cleanup
Alexander Barton [Sun, 15 Sep 2013 12:09:31 +0000 (14:09 +0200)]
ConnSSL_InitLibrary(): Code cleanup

10 years agoTRACE: fix error message when there are too many parameters
Alexander Barton [Fri, 6 Sep 2013 22:18:00 +0000 (00:18 +0200)]
TRACE: fix error message when there are too many parameters

ircd 2.11 ignores additional parameters silently, but I don't think
that this is the correct behaviour either ...

10 years agoIRC_SetPenalty(): Code cleanup
Alexander Barton [Fri, 6 Sep 2013 22:05:49 +0000 (00:05 +0200)]
IRC_SetPenalty(): Code cleanup

10 years agoAdd more penalty times
Federico G. Schwindt [Thu, 5 Sep 2013 16:11:38 +0000 (17:11 +0100)]
Add more penalty times

Ensure before every numeric 461 there is a call to IRC_SetPenalty().

10 years agoRework check for number of parameters
Federico G. Schwindt [Thu, 5 Sep 2013 16:01:49 +0000 (17:01 +0100)]
Rework check for number of parameters

Move most of the checks that return numeric 461 into Handle_Request().

10 years agoReorder checks
Federico G. Schwindt [Thu, 5 Sep 2013 12:45:14 +0000 (13:45 +0100)]
Reorder checks

Move oper and Conf_MorePrivacy checks after checking the number of
parameters.

10 years agoMove the IRC_SetPenalty() call after the asserts
Federico G. Schwindt [Thu, 5 Sep 2013 12:07:19 +0000 (13:07 +0100)]
Move the IRC_SetPenalty() call after the asserts

10 years agoCorrect numeric returned by whois
Federico G. Schwindt [Thu, 5 Sep 2013 09:46:13 +0000 (10:46 +0100)]
Correct numeric returned by whois

As per RFC whois should return 431 if no nick is provided.  While
here convert upper check to use irc-macros. As a bonus we get to set
the penalty for free.

10 years agoMinor cosmetic change
Federico G. Schwindt [Thu, 5 Sep 2013 09:40:39 +0000 (10:40 +0100)]
Minor cosmetic change

Add a define to indicate any client.  While I'm here use hex values
instead of decimal, it's somewhat clearer that they could be OR'ed
together.

10 years agoCommands.txt: Document proprietary DIE <message> parameter
Alexander Barton [Wed, 4 Sep 2013 22:18:49 +0000 (00:18 +0200)]
Commands.txt: Document proprietary DIE <message> parameter

10 years agogetpid.sh: use /bin/pidof when available
Alexander Barton [Tue, 3 Sep 2013 19:33:22 +0000 (21:33 +0200)]
getpid.sh: use /bin/pidof when available

10 years agoDon't enforce channel types for other servers
Alexander Barton [Tue, 3 Sep 2013 15:13:46 +0000 (17:13 +0200)]
Don't enforce channel types for other servers

The configuration option "AllowedChannelTypes" must only be enforced for
regular clients and not for remote servers. Channels created by other
servres are always allowed, because they already exist and the daemon
must stay in sync with the network.

10 years agoOnly log "IDENT ... no result" when IDENT was looked up
Alexander Barton [Mon, 2 Sep 2013 14:37:50 +0000 (16:37 +0200)]
Only log "IDENT ... no result" when IDENT was looked up

Without this patch, ngIRCd logged the "IDENT lookup for connection X:
no result"-message even when IDENT lookups have been disabled using the
"Ident = no" configuration option, which is a little bit misleading.

Reported by "btwe" in #ngircd.

10 years agongircd: use setgid/setuid errno value in error path
Florian Westphal [Sat, 31 Aug 2013 20:42:56 +0000 (22:42 +0200)]
ngircd: use setgid/setuid errno value in error path

Need to use saved errno value as strerror argument, else you
get bogus output ('success') in the log message.

10 years agoShow connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER}
Alexander Barton [Sat, 31 Aug 2013 12:15:09 +0000 (14:15 +0200)]
Show connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER}

Now you can check if a server-to-server link is SSL-encrypted or not
using the IRC "TRACE" command.

Idea by Götz Hoffart, thanks!

10 years agoChange away to be allocated dynamically
Federico G. Schwindt [Mon, 26 Aug 2013 21:52:23 +0000 (22:52 +0100)]
Change away to be allocated dynamically

10 years agoIgnore "operation not permitted" while dropping groups
Alexander Barton [Mon, 26 Aug 2013 22:39:59 +0000 (00:39 +0200)]
Ignore "operation not permitted" while dropping groups

Without this exception, you can't start ngIRCd as user any more,
it is analog to setting the user and group ID.

10 years agongircd: discard supplementary group ids on startup
Florian Westphal [Mon, 26 Aug 2013 22:19:31 +0000 (00:19 +0200)]
ngircd: discard supplementary group ids on startup

The intention was to switch to JUST uid:gid, but setgid is not
sufficient.

Reported-by: Michael Scherer <misc@zarb.org>
10 years agoXcode: update project settings for Xcode 5
Alexander Barton [Mon, 26 Aug 2013 21:23:12 +0000 (23:23 +0200)]
Xcode: update project settings for Xcode 5

10 years agoMerge branch 'bug159-WebircIPA'
Alexander Barton [Mon, 26 Aug 2013 21:22:20 +0000 (23:22 +0200)]
Merge branch 'bug159-WebircIPA'

* bug159-WebircIPA:
  Introduce Free_Client() function to free CLIENT structure
  Save client IP address text for "WebIRC" users

10 years agoIntroduce Free_Client() function to free CLIENT structure
Alexander Barton [Mon, 26 Aug 2013 20:55:00 +0000 (22:55 +0200)]
Introduce Free_Client() function to free CLIENT structure

10 years agoSave client IP address text for "WebIRC" users
Alexander Barton [Mon, 26 Aug 2013 20:54:00 +0000 (22:54 +0200)]
Save client IP address text for "WebIRC" users

This patch introduces a new field in the CLIENT structure, "ipa_text",
which points to an optional textual representation of the client IP
address (or NULL) which can be used to store the "real" IP address
information of a client using the "WEBIRC" protocol.

Without this patch, ngIRCd ignored the <ip-address> paramater ...

In addition, the functions Client_SetIPAText() and Client_IPAText()
have been introduced to set and get the textual representation of the
client IP address.

Client_IPAText() can be used even when no "IP address text" has been
set before, it then returns the real IP address of the connection.

Closes bug #159.

10 years agoImplement new configuration option "DefaultUserModes"
Alexander Barton [Mon, 26 Aug 2013 19:17:10 +0000 (21:17 +0200)]
Implement new configuration option "DefaultUserModes"

The new configuration option "DefaultUserModes" lists user modes that
become automatically set on new local clients right after login.

Please note that only modes can be set that the client could set on
itself, you can't set "a" (away) or "o" (IRC Op), for example! User
modes "i" (invisible) or "x" (cloaked) etc. are "interesting", though.

Default: set no modes (like without this patch).

Closes bug #160.

10 years agoChange strdup() to strndup()
Federico G. Schwindt [Mon, 26 Aug 2013 11:18:46 +0000 (12:18 +0100)]
Change strdup() to strndup()

10 years agoprivate strndup() implementation in case libc does not provide it
Federico G. Schwindt [Mon, 26 Aug 2013 09:47:04 +0000 (10:47 +0100)]
private strndup() implementation in case libc does not provide it

10 years agoCosmetic changes to METADATA
Federico G. Schwindt [Sun, 25 Aug 2013 04:26:08 +0000 (05:26 +0100)]
Cosmetic changes to METADATA

Update certfp and sort entries.

10 years agoSilence warning
Federico G. Schwindt [Sat, 24 Aug 2013 23:07:06 +0000 (00:07 +0100)]
Silence warning

Cast the result of the operation to long, not the time(NULL) call.
On systems where sizeof(time_t) is other than long this will produce
a warning.

10 years agoPlug memory leak
Federico G. Schwindt [Fri, 23 Aug 2013 10:43:28 +0000 (11:43 +0100)]
Plug memory leak

10 years agoImplement account login support
Federico G. Schwindt [Thu, 22 Aug 2013 13:40:30 +0000 (14:40 +0100)]
Implement account login support

This is done via the `accountname' METADATA command and used to
automatically identify users after netsplits or across service
restarts.

10 years agoFix spelling
Federico G. Schwindt [Thu, 22 Aug 2013 09:58:36 +0000 (10:58 +0100)]
Fix spelling

10 years agongIRCd Release 20.3
Alexander Barton [Fri, 23 Aug 2013 19:54:40 +0000 (21:54 +0200)]
ngIRCd Release 20.3

(cherry picked from commit bb6e2779636aa6d74bbff474880829f0183a3c94)

Conflicts:
ChangeLog
NEWS

10 years agoCorrectly handle return code of Handle_Write()
Alexander Barton [Tue, 20 Aug 2013 23:28:49 +0000 (01:28 +0200)]
Correctly handle return code of Handle_Write()

There have been code paths that ignored the return code of Handle_Write()
when sending "notice auth" messages to new clients connecting to the
server. But because Handle_Write() would have closed the client connection
again if an error occurred, this would have resulted in new errors and
assert()'s later on that could have crashed the server (denial of service).

Only setups having the configuration option "NoticeAuth" enabled are
affected, which is not the default.

CVE-2013-5580.

10 years agoEnhance log messages on "recursive" connection errors
Alexander Barton [Tue, 20 Aug 2013 23:15:19 +0000 (01:15 +0200)]
Enhance log messages on "recursive" connection errors