]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
3 years agoCorrectly use Config_Error() instead of Log() in Read_Config()
Alexander Barton [Sun, 3 May 2020 15:08:51 +0000 (17:08 +0200)]
Correctly use Config_Error() instead of Log() in Read_Config()

The name of the Config_Error() function is misleading: it is not only
used to show configuraton errors, but all messages shown during normal
operation as well as for "config testing": it takes care of the correct
formatting of the messages (syslog, forground logging, config testing).

This fixes commit bb1d014abad8.

3 years agocontrib/nglog.sh: Looks like GNU awk (gawk) is needed ...
Alexander Barton [Sun, 3 May 2020 15:07:51 +0000 (17:07 +0200)]
contrib/nglog.sh: Looks like GNU awk (gawk) is needed ...

3 years agoUpdate Travis-CI configuration, "sudo" is depreacted
Alexander Barton [Sun, 3 May 2020 01:11:25 +0000 (03:11 +0200)]
Update Travis-CI configuration, "sudo" is depreacted

3 years agoLog G-/K-Line changes only when not initiated by a server
Alexander Barton [Sun, 3 May 2020 01:08:41 +0000 (03:08 +0200)]
Log G-/K-Line changes only when not initiated by a server

This prevents the log from becomming spammed during "net bursts".

3 years agoSet the "last data" time to "last ping" time when updating the latter
Alexander Barton [Sun, 3 May 2020 01:04:29 +0000 (03:04 +0200)]
Set the "last data" time to "last ping" time when updating the latter

This is required because the PING can be received quite a bit earlier
than it is actually handled, for example during "server burst" or other
heavy operations:
So the times won't match and PING-PONG logic would become garbled,
because we test for "last ping > last data" to determine if a PING
already was sent or not.

3 years agoINSTALL.md: Add not about removed legacy options
Alexander Barton [Mon, 20 Apr 2020 17:31:57 +0000 (19:31 +0200)]
INSTALL.md: Add not about removed legacy options

3 years agoMakefile.am: Replace make with ${MAKE} (#270)
sam_c [Mon, 20 Apr 2020 17:29:16 +0000 (18:29 +0100)]
Makefile.am: Replace make with ${MAKE} (#270)

Fixes warnings such as:
"warning: jobserver unavailable: using -j1. Add `+' to parent make rule."

Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
3 years agoUpdate AUTHORS file
Alexander Barton [Mon, 20 Apr 2020 17:25:28 +0000 (19:25 +0200)]
Update AUTHORS file

3 years agoChangeLog: Add missing patch attribution
Alexander Barton [Mon, 20 Apr 2020 17:25:02 +0000 (19:25 +0200)]
ChangeLog: Add missing patch attribution

3 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Mon, 20 Apr 2020 17:14:54 +0000 (19:14 +0200)]
Update NEWS and ChangeLog files

3 years agocontrib/nglog.sh: Use bash(1) as interpreter
Alexander Barton [Mon, 20 Apr 2020 08:01:01 +0000 (10:01 +0200)]
contrib/nglog.sh: Use bash(1) as interpreter

bash(1) is required to handle the forking and output redirection
connectly, sh(1) -- at least dash(1) on Debian -- fails ...

This fixes the last commit, 14777c18c.

3 years agocontrib/nglog.sh: Fork awk(1), deal better with signals (CTRL-C)
Alexander Barton [Sun, 19 Apr 2020 22:55:24 +0000 (00:55 +0200)]
contrib/nglog.sh: Fork awk(1), deal better with signals (CTRL-C)

3 years agoUpdate Xcode project for latest Xcode version (11.4.1)
Alexander Barton [Sun, 19 Apr 2020 22:54:06 +0000 (00:54 +0200)]
Update Xcode project for latest Xcode version (11.4.1)

3 years agoRemove legacy configuration options
michi [Thu, 16 Apr 2020 09:25:44 +0000 (11:25 +0200)]
Remove legacy configuration options

Remove legacy configuration options and related functions that have
been marked for removal for some time:

- PredefChannelsOnly (v22)
- NoticeAuth (v24)
- NoXXX (v19)
- Old '[GLOBAL]' section handling (v19)

3 years agoIncrease read buffer size for server connections
michi [Wed, 15 Apr 2020 08:32:08 +0000 (10:32 +0200)]
Increase read buffer size for server connections

This applies the same logic we have for write buffers to distinguish
between server and client connections and sets the maximum buffer size
accordingly. As a result peering with servers with many GLINE/KLINEs
does not kill the connecting server connection anymore.

3 years agoFix recursion bug on write error
michi [Tue, 14 Apr 2020 15:41:52 +0000 (17:41 +0200)]
Fix recursion bug on write error

Depending on the stack size, too many clients on the same channel
quitting at the same time would trigger a crash due to too many
recursive calls to Conn_Close().

3 years agoFix hostmask cloaking bug for IPv6 too
michi [Tue, 14 Apr 2020 14:58:04 +0000 (16:58 +0200)]
Fix hostmask cloaking bug for IPv6 too

3 years agoUnbreak GCC 10 (-fno-common) build
michi [Tue, 14 Apr 2020 14:53:02 +0000 (16:53 +0200)]
Unbreak GCC 10 (-fno-common) build

4 years agoUpdate documentation to reflect "[Channel]->Modes" changes
Alexander Barton [Sun, 29 Mar 2020 21:17:21 +0000 (23:17 +0200)]
Update documentation to reflect "[Channel]->Modes" changes

No longer mention "[Channel]->Key" and "[Channel]->MaxUsers".

4 years agoConvert INSTALL and README files to Markdown
Alexander Barton [Tue, 11 Feb 2020 20:00:18 +0000 (21:00 +0100)]
Convert INSTALL and README files to Markdown

This requires some changes to the build system, for example to comply
with the expectations of the GNU autoconf/automake tools ...

4 years agoAdd deprecation warnings for "Key" and "MaxUsers" in [Channel]
Alexander Barton [Sun, 29 Mar 2020 20:30:47 +0000 (22:30 +0200)]
Add deprecation warnings for "Key" and "MaxUsers" in [Channel]

4 years agoTest suite: Test multiple "Modes" lines in [Channel] sections
Alexander Barton [Sun, 29 Mar 2020 00:15:39 +0000 (01:15 +0100)]
Test suite: Test multiple "Modes" lines in [Channel] sections

4 years agoPredefined channles: Fix handling of legacy configuration options
Alexander Barton [Sat, 28 Mar 2020 22:37:47 +0000 (23:37 +0100)]
Predefined channles: Fix handling of legacy configuration options

Fix the handling of legacy "Key" and "MaxUsers" [Channel] settings:

- Activate them before evaluating the "Modes" parameter, to allow the
  latter to override those legacy options.
- Enforce setting the respective +k/+l mode(s) to support the legacy
  "Mode = kl" notation, which was valid but is an invalid MODE string:
  key and limit are missing! So set them manually when "k" or "l" are
  detected in the first MODE parameter.
- Sort modes +kl alphabetically, adjust test suite accordingly.

4 years agoEnhance logging while setting up predefined channels
Alexander Barton [Sat, 28 Mar 2020 22:33:03 +0000 (23:33 +0100)]
Enhance logging while setting up predefined channels

4 years agoAllow multiple "Modes =" lines per [Channel] section
michi [Sat, 29 Feb 2020 16:32:52 +0000 (16:32 +0000)]
Allow multiple "Modes =" lines per [Channel] section

4 years agoEvaluate initial channel modes
michi [Wed, 19 Feb 2020 09:26:21 +0000 (09:26 +0000)]
Evaluate initial channel modes

Allow setting arbitrary channel modes in the config file.

Closes #55.

4 years agoXcode: add missing files in src/testsuite, and sort them
Alexander Barton [Sat, 28 Mar 2020 22:46:16 +0000 (23:46 +0100)]
Xcode: add missing files in src/testsuite, and sort them

4 years agoAdd "FNC" (forced nick changes) to ISUPPORT(005) numeric
Alexander Barton [Sun, 22 Mar 2020 13:07:32 +0000 (14:07 +0100)]
Add "FNC" (forced nick changes) to ISUPPORT(005) numeric

Most probably this doesn't make any difference to any client, but it
seems correct. See <http://www.irc.org/tech_docs/005.html> for details.

4 years agoFix memory leak in portabtest Check_strtok_r()
Alexander Barton [Sat, 15 Feb 2020 13:56:07 +0000 (14:56 +0100)]
Fix memory leak in portabtest Check_strtok_r()

Fix the following Clang "LeakSanitizer" error (which isn't quite
relevant in this test program, but anyway):

  ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 7 byte(s) in 1 object(s) allocated from:
      #0 0x7f8c4d022810 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
      #1 0x5601a801491a in Check_strtok_r (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x291a)
      #2 0x5601a8014d77 in main (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x2d77)
      #3 0x7f8c4c69009a in __libc_start_main ../csu/libc-start.c:308

  SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
  FAIL: portabtest

4 years agoReuse old SSL key if loading a new one failed
michi [Fri, 14 Feb 2020 12:44:10 +0000 (12:44 +0000)]
Reuse old SSL key if loading a new one failed

4 years agoUpdate Xcode project for latest Xcode version (11.3.1)
Alexander Barton [Tue, 11 Feb 2020 19:33:44 +0000 (20:33 +0100)]
Update Xcode project for latest Xcode version (11.3.1)

4 years agoRemove outdated OpenBSD/NetBSD systrace.policy
Alexander Barton [Tue, 11 Feb 2020 19:20:45 +0000 (20:20 +0100)]
Remove outdated OpenBSD/NetBSD systrace.policy

Systrace was removed from OpenBSD and NetBSD, so remove this (old and
outdated?) configuration file from the ./contrib directory.

See <https://en.wikipedia.org/wiki/Systrace>.

Thanks to "michi" for pointing this out on #ngircd!

4 years ago2020!
Alexander Barton [Tue, 21 Jan 2020 21:02:40 +0000 (22:02 +0100)]
2020!

4 years agoEnhance handling of command line errors, and "--help" & "--version"
Alexander Barton [Tue, 31 Dec 2019 15:34:23 +0000 (16:34 +0100)]
Enhance handling of command line errors, and "--help" & "--version"

Return with exit code 0 ("no error") when "--help" or "--version" was
used (this resulted in exit code 1, "error" before).

And exit with code 2 ("command line error") for all invalid command
line options, and show the error message on stderr (message was printed
to stdout before, and exit code was 1, "generic error").

This new behaviour is more in line with the GNU "coding standards",
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.

4 years agoFix and update Xcode project
Alexander Barton [Mon, 16 Dec 2019 15:57:56 +0000 (16:57 +0100)]
Fix and update Xcode project

- Reference correct contrib/Makefile.am file
- Correctly sort contrib/nglog.sh
- Add "ORGANIZATIONNAME" setting

4 years agoUpdate ngindent.sh name in Makefile and Xcode project, too
Alexander Barton [Mon, 16 Dec 2019 15:54:13 +0000 (16:54 +0100)]
Update ngindent.sh name in Makefile and Xcode project, too

4 years agocontrib/README: Add nglog.sh script to the list
Alexander Barton [Sat, 7 Dec 2019 00:43:00 +0000 (01:43 +0100)]
contrib/README: Add nglog.sh script to the list

4 years agocontrib/nglog.sh: Use bright colors for warning & error messages
Alexander Barton [Sat, 7 Dec 2019 00:42:33 +0000 (01:42 +0100)]
contrib/nglog.sh: Use bright colors for warning & error messages

4 years agocontrib/ngindent.sh: Enhance and rename script
Alexander Barton [Sat, 7 Dec 2019 00:41:39 +0000 (01:41 +0100)]
contrib/ngindent.sh: Enhance and rename script

Add more GNU indent options for better results, and add the ".sh" suffix
to bring this script in line with the others in the contrib/ folder.

4 years agoUpdate install documentation: libgnutls-dev
Windree [Sun, 1 Dec 2019 23:45:09 +0000 (02:45 +0300)]
Update install documentation: libgnutls-dev

According https://packages.debian.org/search?keywords=libgnutls28-dev
in Ubuntu and Debian libgnutls-dev package name is libgnutls28-dev

Closes #264.

Thanks Windree!

4 years agoAdd simple log colorization script: ./contrib/nglog.sh
Alexander Barton [Sun, 10 Nov 2019 21:07:26 +0000 (22:07 +0100)]
Add simple log colorization script: ./contrib/nglog.sh

This script parses the log output of ngircd(8), and colorizes the
messages accoring to their log level. Example usage:

ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh

4 years agoLog received signals (using strsignal(3), when available)
Alexander Barton [Sun, 10 Nov 2019 20:12:39 +0000 (21:12 +0100)]
Log received signals (using strsignal(3), when available)

4 years agoMake test suite compatible with Haiku
Alexander Barton [Sun, 3 Nov 2019 14:15:59 +0000 (15:15 +0100)]
Make test suite compatible with Haiku

4 years agoAdd VIM "swap files" (*.swp) to .gitignore file
Alexander Barton [Sun, 3 Nov 2019 14:01:51 +0000 (15:01 +0100)]
Add VIM "swap files" (*.swp) to .gitignore file

4 years agoFix hostmask cloaking bug, don't cloak multiple times
JRMU [Wed, 4 Sep 2019 04:48:54 +0000 (06:48 +0200)]
Fix hostmask cloaking bug, don't cloak multiple times

Previously, each server would cloak every user's hostmask. The problem
is that if a network has more than one server, then a user's hostmask
would get cloaked twice. This patch ensures that a server only cloaks
the hostmask if it has not yet been cloaked (the period indicates it's
still an IP address).

Closes #228.

4 years agoFix some typos (documentation files, ngircd.conf manual page, ...)
Alexander Barton [Sun, 21 Jul 2019 14:23:07 +0000 (16:23 +0200)]
Fix some typos (documentation files, ngircd.conf manual page, ...)

Spotted by Étienne Mollier <etienne.mollier@mailoo.org> and Christoph
Biedl <debian.axhn@manchmal.in-ulm.de>, see Debian bug #932462
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932462). Thank you!

4 years agoMake sure HAVE_LIBSSL is defined, even when using pkg-config
Alexander Barton [Mon, 1 Jul 2019 19:56:36 +0000 (21:56 +0200)]
Make sure HAVE_LIBSSL is defined, even when using pkg-config

Without this, the configure script assumes and states that OpenSSL will
be used, but the code won't include support for it because there we use
the "HAVE_LIBSSL" define to test for it ("#ifdef HAVE_LIBSSL").

So define the latter when pkg-config(1) is used, too.

This fixes #257, a regression introduced by commit ad86a41ee :-/

4 years agoEnlage buffers of info texts to 128 bytes.
Alexander Barton [Sat, 29 Jun 2019 14:07:29 +0000 (16:07 +0200)]
Enlage buffers of info texts to 128 bytes.

This includes:
- "Real name" of a client (4th filed of the USER command).
- Server info text ("Info" configuration option).
- Admin info texts and email address ("AdminInfo1", "AdminInfo2" and
  "AdminEmail" configuration options).
- Network name ("Network" configuration option).

The limit was 64 bytes before ...

Closes #258.

4 years agoAdd ".vscode" to .gitignore file
Alexander Barton [Sat, 29 Jun 2019 14:04:59 +0000 (16:04 +0200)]
Add ".vscode" to .gitignore file

4 years agoStreamline handling of invalid and unset server name
Alexander Barton [Sat, 29 Jun 2019 14:02:52 +0000 (16:02 +0200)]
Streamline handling of invalid and unset server name

Don't exit during runtime (REHASH command, HUP signal), because the
server name can't be changed in this case anyway and the new invalid
name will be ignored.

4 years agoFix and extend documentation a little bit
Alexander Barton [Sat, 29 Jun 2019 14:02:18 +0000 (16:02 +0200)]
Fix and extend documentation a little bit

- Fix syntax of LINKS amd LIST commands.
- Whitespace and spelling fixes.
- Add some more information about IRCv3 support.

4 years agoSlightly reoder startup steps, and enhance logging
Alexander Barton [Sat, 29 Jun 2019 13:57:44 +0000 (15:57 +0200)]
Slightly reoder startup steps, and enhance logging

- Show name of configuration file at the beginning of start up.
- Add a message when ngIRCd is ready, including its host name.
- Show name of configuration file on REHASH (SIGHUP), too.
- Change level of "done message" to NOTICE, like "starting" & "ready".
- Initialize IO functions before channels, connections, clients, ...

4 years agoUpdate autogen.sh & INSTALL for pkg-config requirements
Alexander Barton [Sat, 20 Apr 2019 16:51:39 +0000 (18:51 +0200)]
Update autogen.sh & INSTALL for pkg-config requirements

4 years agoconfigure.ng: use pkg-config to find PpenSSL dependencies
Fabrice Fontaine [Thu, 11 Apr 2019 21:24:36 +0000 (23:24 +0200)]
configure.ng: use pkg-config to find PpenSSL dependencies

OpenSSL can depends on lz or latomic so use pkg-config to find those
dependencies and fallback to existing mechanism.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Closes #256.

5 years agongircd.conf.5: Fix wording as suggested by lintian
Christoph Biedl [Mon, 28 Jan 2019 09:45:53 +0000 (10:45 +0100)]
ngircd.conf.5: Fix wording as suggested by lintian

5 years agongIRCd Release 25 rel-25
Alexander Barton [Wed, 23 Jan 2019 22:15:02 +0000 (23:15 +0100)]
ngIRCd Release 25

5 years agoPlatforms.txt: Add and update systems
Alexander Barton [Wed, 23 Jan 2019 21:45:07 +0000 (22:45 +0100)]
Platforms.txt: Add and update systems

- Update x86_64/apple/darwin16.5.0 (Apple clang 8.1)
- Add x86_64/apple/darwin17.7.0 (Apple clang 10.0)
- Add x86_64/apple/darwin18.2.0 (Apple clang 10.0)
- Add x86_64/unknown/haiku (gcc 7.3)
- Update x86_64/pc/linux-gnu (gcc 6.3.0)

5 years agoFix documentation of MotdPhrase length (#254)
shankari [Thu, 3 Jan 2019 12:44:28 +0000 (04:44 -0800)]
Fix documentation of MotdPhrase length (#254)

The max length is actually 126 (< 127), since the check errors out if
length >= 127. See
<https://github.com/ngircd/ngircd/blob/master/src/ngircd/conf.c#L1487>.

I didn't look through the history to see when the change happened. I
just happened to find during a migration that my 140 character MOTD
didn't work.

Update sample configuration file as well as the man page.

5 years ago2019!
Alexander Barton [Tue, 1 Jan 2019 23:10:06 +0000 (00:10 +0100)]
2019!

5 years agoImplement new configuration option "MaxPenaltyTime" (#251)
Alexander Barton [Wed, 28 Nov 2018 13:13:09 +0000 (14:13 +0100)]
Implement new configuration option "MaxPenaltyTime" (#251)

This option configures the maximum penalty time increase in seconds, per
penalty event. Set to -1 for no limit (the default), 0 to disable
penalties altogether. ngIRCd doesn't use penalty increases higher than 2
seconds during normal operation, so values higher than 1 rarely make
sense.

Disabling (or reducing) penalties can greatly speed up "make check" runs
for example, see below, but are mostly a debugging feature and normally
not meant to be used on production systems!

Some example timings running "make check" from my macOS workstation:

- MaxPenaltyTime not set: 4:41,79s
- "MaxPenaltyTime = 1":   3:14,71s
- "MaxPenaltyTime = 0":     25,46s

Closes #249.

5 years agoFix compilation without deprecated OpenSSL APIs (#252)
Rosen Penev [Wed, 28 Nov 2018 13:10:46 +0000 (05:10 -0800)]
Fix compilation without deprecated OpenSSL APIs (#252)

5 years agoUpdate Xcode project for latest Xcode version (10.0)
Alexander Barton [Tue, 30 Oct 2018 00:56:13 +0000 (01:56 +0100)]
Update Xcode project for latest Xcode version (10.0)

5 years agoFix some compiler warnings of Apple Xcode/Clang
Alexander Barton [Tue, 30 Oct 2018 00:53:24 +0000 (01:53 +0100)]
Fix some compiler warnings of Apple Xcode/Clang

For example:

* src/ngircd/irc-login.c:102:21: Implicit conversion loses integer
  precision: 'int' to 'char'

* src/ngircd/conn.c:1084:9: Implicit conversion turns floating-point
  number into integer: 'double' to 'bool'

* src/tool/tool.c:85:10: Implicit conversion loses integer precision:
  'int' to 'char'

5 years agoFix typos/errors/... in file comments
Alexander Barton [Tue, 30 Oct 2018 00:48:31 +0000 (01:48 +0100)]
Fix typos/errors/... in file comments

Found by Xcode/Clang code analyzer. No functional changes.

5 years agoUpdate doc/Protocol.txt for IRCv3 WEBIRC extension
Alexander Barton [Sun, 7 Oct 2018 21:54:13 +0000 (23:54 +0200)]
Update doc/Protocol.txt for IRCv3 WEBIRC extension

See commit d0f9d3d92.

5 years agoAllow a 5th parameter in WEBIRC
ItsOnlyBinary [Sun, 7 Oct 2018 21:33:27 +0000 (22:33 +0100)]
Allow a 5th parameter in WEBIRC

According to an IRCv3 extension, the 5th parameter can be used for extra
flags that are fine to ignore for now, but limiting WEBIRC params to 4
causes a syntax error.

See https://github.com/ircv3/ircv3-ideas/issues/12 for more information.

This closes #247.

5 years agoUpdate HowToRelease.txt: Include the website
Alexander Barton [Fri, 31 Aug 2018 23:48:17 +0000 (01:48 +0200)]
Update HowToRelease.txt: Include the website

5 years agoPlatforms.txt: Add and update systems
Alexander Barton [Wed, 29 Aug 2018 21:05:45 +0000 (23:05 +0200)]
Platforms.txt: Add and update systems

- Update x86_64/unknown/freebsd10.0 (FreeBSD clang 3.3)
- Add x86_64/unknown/freebsd10.3 (FreeBSD clang 3.4)
- Update i386/pc/solaris2.11 (gcc 4.8.2)
- Add mipsel/openwrt/linux-uclibc (gcc 4.8) [cross-compiler]
- Add x86_64/pc/linux-gnu (gcc 5.4.0) [Win10/WSL]
- Platforms.txt: Update "pre-ANSI compiler" foot note.

Thanks to Götz Hoffart <goetz@hoffart.de>!

5 years agongIRCd Release 25~rc1 rel-25-rc1
Alexander Barton [Sat, 11 Aug 2018 19:37:42 +0000 (21:37 +0200)]
ngIRCd Release 25~rc1

5 years agoUpdate and fix logcheck(8) rules
Alexander Barton [Sun, 20 May 2018 19:52:56 +0000 (21:52 +0200)]
Update and fix logcheck(8) rules

6 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sun, 1 Apr 2018 00:32:24 +0000 (02:32 +0200)]
Update config.guess and config.sub to recent versions

- config.guess: 2018-03-08
- config.sub: 2018-03-08

6 years agoInitialize listening socket: Streamline error message
Alexander Barton [Sun, 1 Apr 2018 00:18:36 +0000 (02:18 +0200)]
Initialize listening socket: Streamline error message

6 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 25 Mar 2018 21:00:45 +0000 (23:00 +0200)]
Update NEWS and ChangeLog files

6 years agoCorrectly retry outgoing conenctions when forking a resolver failed
Alexander Barton [Sun, 25 Mar 2018 19:55:34 +0000 (21:55 +0200)]
Correctly retry outgoing conenctions when forking a resolver failed

When ngIRCd failed to spawn a new resolver subprocess, the connection
structure was still marked as "SERVER_WAIT", and no new attempt to
connect to this server was made.

Thanks to Robert Obermeier for reporting this bug!

Closes #243.

6 years agoFix use-after-free while handling ERROR during client login
Alexander Barton [Sun, 11 Mar 2018 20:06:03 +0000 (21:06 +0100)]
Fix use-after-free while handling ERROR during client login

This patch fixes a "use after free" bug which is hit while processing
ERROR commands while a new client is logging into the server, which
leads to only the CLIENT structure becoming freed, but not the
CONNECTION structure, too. And this leads to the daemon accessing the
already freed CLIENT structure later on ...

So now IRC_ERROR() uses the correct function Conn_Close() to correctly
free both structures.

The CONNECTION structure is cleaned up later on, and the freed CLIENT
structure can't be overwritten during normal operations, therefore this
bug normally can't crash (DoS) the service -- but you can easily hit it
when using the GCC option "-fsanitize=address", or run ngIRCd with
Valgrind.

Thanks a lot to Joseph Bisch <joseph.bisch@gmail.com> for discovering
and reporting this issue!

6 years agoOnly send TOPIC updates to a channel when the topic actually changed
Alexander Barton [Sun, 11 Mar 2018 19:57:19 +0000 (20:57 +0100)]
Only send TOPIC updates to a channel when the topic actually changed

This prevents the channel from becoming flooded by unecessary TOPIC
update messages, that can happen when IRC services try to enforce a
certain topic but which is already set (at least on the local server),
for example. Therefore still forward it to all servers, but don't inform
local clients (still update setter and timestamp information, though!)

6 years agoUpdate Xcode project for latest Xcode version (9.2)
Alexander Barton [Sun, 11 Mar 2018 19:55:03 +0000 (20:55 +0100)]
Update Xcode project for latest Xcode version (9.2)

This includes adding missing and deleting obsolete file references.

6 years agoUse .mailmap to fix spelling of Götz Hoffart
Alexander Barton [Sun, 25 Feb 2018 20:44:14 +0000 (21:44 +0100)]
Use .mailmap to fix spelling of Götz Hoffart

6 years agoLittle code cleanups, better comments
Alexander Barton [Sun, 25 Feb 2018 20:43:39 +0000 (21:43 +0100)]
Little code cleanups, better comments

6 years agoUser mode "C": Allow messages from servers, services, and IRC Ops RelaxUserModeC
Alexander Barton [Fri, 27 Mar 2015 23:05:39 +0000 (00:05 +0100)]
User mode "C": Allow messages from servers, services, and IRC Ops

Update user mode "C" handling ("Only users that share a channel are
allowed to send messages") to behave like user mode "b" ("block private
messages and notices") and therefore allow messages from servers, services,
and IRC Operators, too.

Change proposed by "wowaname" in #ngircd, thanks!

6 years agoportab/Makefile: Split list into separate lines
Alexander Barton [Sun, 29 Jan 2017 20:55:50 +0000 (21:55 +0100)]
portab/Makefile: Split list into separate lines

6 years agoconfigure.ng: Split list into separate lines
Alexander Barton [Sun, 29 Jan 2017 20:42:11 +0000 (21:42 +0100)]
configure.ng: Split list into separate lines

6 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 11 Feb 2018 09:22:41 +0000 (10:22 +0100)]
Update NEWS and ChangeLog files

6 years ago2018!
Alexander Barton [Fri, 9 Feb 2018 21:02:21 +0000 (22:02 +0100)]
2018!

6 years agoFix compiler warning in ForwardLookup()
Alexander Barton [Mon, 29 Jan 2018 22:34:40 +0000 (23:34 +0100)]
Fix compiler warning in ForwardLookup()

When compiling without "working getaddrinfo()", the "af" parameter of
ForwardLookup() is unused by that function. Mark it as such!

This prevents the following compiler warning:

  resolve.c:235:56: warning: unused parameter ‘af’
    [-Wunused-parameter]

6 years agoFix compiler warning in Option_String()
Alexander Barton [Mon, 29 Jan 2018 22:32:06 +0000 (23:32 +0100)]
Fix compiler warning in Option_String()

When compiling ngIRCd without support for SSL and without support for
ZLIB, gcc outputs the following warning:

  irc.c:493:9: warning: variable ‘options’ set but not used
    [-Wunused-but-set-variable]

Fix it by providing a dummy function in this case.

6 years agoFix Get_Error() usage, take II
Alexander Barton [Mon, 29 Jan 2018 22:30:53 +0000 (23:30 +0100)]
Fix Get_Error() usage, take II

This should fix the following compiler warning:

  resolve.c:113:1: warning: ‘Get_Error’ defined but not used
    [-Wunused-function]

Which can happen, because the logic of commit 543f44bf isn't sufficient:
Get_Error() is only used when neither HAVE_WORKING_GETADDRINFO nor
HAVE_GETNAMEINFO are set ...

Enhances 543f44bf.
Closes #241.

6 years agocontrib/ngircd.logcheck: Add sample logcheck(8) rules
Alexander Barton [Thu, 28 Dec 2017 17:03:12 +0000 (18:03 +0100)]
contrib/ngircd.logcheck: Add sample logcheck(8) rules

6 years agoAllow IRC Ops and remote servers to KILL service clients (#242)
Alexander Barton [Sat, 30 Sep 2017 14:48:28 +0000 (16:48 +0200)]
Allow IRC Ops and remote servers to KILL service clients (#242)

In the end, service clients behave like regular users, therefore IRC
operators and servers should be able to KILL them: for example to
resolve nick collisions.

This is related to #238.

6 years agoDon't forward KILLs to other servers if they've been blocked locally
James Lu [Tue, 26 Sep 2017 20:50:20 +0000 (13:50 -0700)]
Don't forward KILLs to other servers if they've been blocked locally

This prevents clients from killing IRC services, for example.

Closes #238.
Closes #239.

6 years agoUpdate AUTHORS file
Alexander Barton [Sat, 23 Sep 2017 11:54:39 +0000 (13:54 +0200)]
Update AUTHORS file

6 years agoMerge pull request #240 from bkuhls/fix_Get_Error
Alexander Barton [Sun, 17 Sep 2017 21:27:48 +0000 (23:27 +0200)]
Merge pull request #240 from bkuhls/fix_Get_Error

Fix Get_Error usage

6 years agoFix Get_error usage
Bernd Kuhls [Wed, 13 Sep 2017 12:07:11 +0000 (14:07 +0200)]
Fix Get_error usage

The usage of Get_Error is guarded by "ifdef h_errno" in this file, the
definition of this function should follow the same rules.

Fixes a build error when cross-compiling:
https://github.com/ngircd/ngircd/issues/223

7 years agoUpdate HowToRelease.txt
Alexander Barton [Sun, 12 Mar 2017 21:25:08 +0000 (22:25 +0100)]
Update HowToRelease.txt

- Freshmeat is no more, and
- GitHub issues doesn't allow us to configure "releases".

7 years agoServices.txt: Show Atheme "name" in example configuration
Alexander Barton [Mon, 20 Feb 2017 22:29:40 +0000 (23:29 +0100)]
Services.txt: Show Atheme "name" in example configuration

7 years agoServices.txt: Show ngIRCd "Name" in example configuration
Alexander Barton [Mon, 20 Feb 2017 22:06:47 +0000 (23:06 +0100)]
Services.txt: Show ngIRCd "Name" in example configuration

7 years agongIRCd Release 24 rel-24
Alexander Barton [Fri, 20 Jan 2017 18:13:49 +0000 (19:13 +0100)]
ngIRCd Release 24

7 years agoPlatforms.txt: Add and update systems
Alexander Barton [Fri, 20 Jan 2017 18:12:05 +0000 (19:12 +0100)]
Platforms.txt: Add and update systems

- Update i386/unknown/freebsd7.3 (gcc 4.2.1)
- Update i386/unknown/netbsdelf4.0 (gcc 4.1.2)
- Update x86_64/apple/darwin16.3.0 (Apple clang 8.0)
- Update x86_64/unknown/freebsd8.4 (gcc 4.2.1)
- Update x86_64/pc/linux-gnu (gcc 4.4.5)
- Update x86_64/pc/linux-gnu (gcc 4.8.4)
- Update x86_64/pc/linux-gnu (gcc 4.9.2)
- Update x86_64/pc/linux-gnu (gcc 6.2.1)
- Add x86_64/pc/linux-gnu (gcc 6.3.1)

7 years agoMake sure that platformtest.sh aborts when autogen.sh fails
Alexander Barton [Fri, 20 Jan 2017 16:24:22 +0000 (17:24 +0100)]
Make sure that platformtest.sh aborts when autogen.sh fails

7 years agoSpecify Debian "source format"
Alexander Barton [Fri, 20 Jan 2017 15:08:46 +0000 (16:08 +0100)]
Specify Debian "source format"