]> arthur.barton.de Git - ngircd.git/log
ngircd.git
4 days agoDon't abort startup when setgid/setuid() fails with EINVAL master
Alexander Barton [Sat, 13 Apr 2024 17:43:54 +0000 (19:43 +0200)]
Don't abort startup when setgid/setuid() fails with EINVAL

Both setgid(2) as well as setuid(2) can fail with EINVAL in addition to
EPERM, their manual pages state "EINVAL: The user/group ID specified in
uid/gid is not valid in this user namespace ".

So not only treat EPERM as an "acceptable error" and continue with
logging the error, but do the same for EINVAL.

This was triggered by the Void Linux xbps-uunshare(1) tool used for
building "XBPS source packages" and reported by luca in #ngircd. Thanks!

4 days agoTest suite: Correctly test for LOGNAME and USER
Alexander Barton [Sat, 13 Apr 2024 14:04:29 +0000 (16:04 +0200)]
Test suite: Correctly test for LOGNAME and USER

4 days agoTest suite: Don't use "pgrep -u" when LOGNAME and USER are not set
Alexander Barton [Sat, 13 Apr 2024 13:52:33 +0000 (15:52 +0200)]
Test suite: Don't use "pgrep -u" when LOGNAME and USER are not set

Thanks for reporting this on IRC, luca!

4 days agongIRCd Release 27~rc1 rel-27-rc1
Alexander Barton [Sat, 13 Apr 2024 10:26:55 +0000 (12:26 +0200)]
ngIRCd Release 27~rc1

4 days agoTest suite: Use $USER in getpid.sh when $LOGNAME is not set
Alexander Barton [Sat, 13 Apr 2024 10:00:49 +0000 (12:00 +0200)]
Test suite: Use $USER in getpid.sh when $LOGNAME is not set

The LOGNAME environment variable is not set in GitHub "actions", for
example ...

6 days agoUpdate doc/Platforms.txt
Alexander Barton [Tue, 2 Apr 2024 20:33:50 +0000 (22:33 +0200)]
Update doc/Platforms.txt

6 days agongircd.service: Redirect stdout and stderr to the journal
Alexander Barton [Thu, 11 Apr 2024 19:57:51 +0000 (21:57 +0200)]
ngircd.service: Redirect stdout and stderr to the journal

12 days agoPrepare documentation for ngIRCd 27~rc1
Alexander Barton [Tue, 16 Jan 2024 22:09:05 +0000 (23:09 +0100)]
Prepare documentation for ngIRCd 27~rc1

12 days agoPing the service manager and set a status message
Alexander Barton [Fri, 5 Apr 2024 20:48:22 +0000 (22:48 +0200)]
Ping the service manager and set a status message

Periodically "ping" the service manager (every 3 seconds) and set a
status message showing connection statistics.

This enables using the systemd(8) watchdog functionality for the
"ngircd.service" unit.

12 days agoAdd support for the "sd_notify" protocol
Alexander Barton [Fri, 5 Apr 2024 20:38:22 +0000 (22:38 +0200)]
Add support for the "sd_notify" protocol

This allows the "ngircd.service" systemd(8) unit to use the "notify"
service type, which allows for better status tracking by the service
manager.

12 days agoAdd ".trunk" to .gitignore file
Alexander Barton [Fri, 5 Apr 2024 12:35:26 +0000 (14:35 +0200)]
Add ".trunk" to .gitignore file

12 days agoTest suite: wait for ERROR message on QUIT
Alexander Barton [Tue, 2 Apr 2024 20:01:00 +0000 (22:01 +0200)]
Test suite: wait for ERROR message on QUIT

Wait for the "ERROR :Closing connection" message sent by ngIRCd when
handling the QUIT command, do not wait for "Connection closed" which is
actually output by the telnet(1) command and is implementation
dependant! For example, on Haiku OS, this is not always(!) echoed (the
command seems to hang sometimes?) which results in unpredictable
failures in the test suite ...

12 days agoTest suite: simplify and enhance getpid.sh
Alexander Barton [Mon, 1 Apr 2024 19:38:21 +0000 (21:38 +0200)]
Test suite: simplify and enhance getpid.sh

- Try to only search for processes of the current user.
- Prefer using pgrep (in addition to pidof) when available.
- Streamline system overrides.
- Get rid of HEAD_FLAGS: all systems so far support "-1".
- Use "ps -o pid,comm" as the default, which is POSIX.1.
- Use "sort -r" to hopefully get the newest (=highest) PID, which is the
  case on older systems not using randomized PIDs at least.

12 days agoTest suite: clean up scripts
Alexander Barton [Sun, 31 Mar 2024 17:53:16 +0000 (19:53 +0200)]
Test suite: clean up scripts

- Reformat code.
- Cleanup some glitches, streamline scripts ...
- Enable "set -u": Error on unset variables.
- Detect "$srcdir" in prep-server3 script, too.

2 weeks agoRevert "testsuite: Pass -nameopt to openssl s_client."
Alexander Barton [Mon, 1 Apr 2024 18:54:42 +0000 (20:54 +0200)]
Revert "testsuite: Pass -nameopt to openssl s_client."

Although this is a nice looking solution, it is not that portable: for
example, the "openssl s_client" command of LibreSSL 3.8.2 on OpenBSD 7.4
does not support it.

So let's revert back to the "uglier" but working variant ...

This reverts commit bdb55fb4b322b2c84530855a3b5148a0e387f5b4.

2 weeks agoFix quoting in code examples in doc/Container.md
Alexander Barton [Fri, 29 Mar 2024 11:34:50 +0000 (12:34 +0100)]
Fix quoting in code examples in doc/Container.md

2 weeks agoChange leftover GnuTLS "slot handling" messages to debug level
Alexander Barton [Fri, 29 Mar 2024 11:33:30 +0000 (12:33 +0100)]
Change leftover GnuTLS "slot handling" messages to debug level

This completes commit f96966a6.

2 weeks agoAdd feature info to Debian package description
Alexander Barton [Thu, 28 Mar 2024 11:59:56 +0000 (12:59 +0100)]
Add feature info to Debian package description

2 weeks agoTry to set file descriptor limit to its maximum and show info on startup
Alexander Barton [Thu, 28 Mar 2024 09:16:44 +0000 (10:16 +0100)]
Try to set file descriptor limit to its maximum and show info on startup

The number of possible parallel connections is limited by the process
file descriptor limit (among other things). Therefore try to upgrade the
current "soft" limit to its "hard" maximum (but limit it to 100000), and
show an information or even warning, wenn still less than the configured
"MaxConnections" setting.

Please note that ngIRCd and its linked libraries (like PAM) need file
descriptors not only for incoming and outgoing IRC connections, but for
reading files and inter-process communication, too! Therefore the actual
connection limit is _less_ than the file descriptor limit!

This introduces the new MAX_FD_LIMIT (100000) #define.

2 weeks agongircd.8: Update for the now always available debug-mode
Alexander Barton [Mon, 25 Mar 2024 22:38:08 +0000 (23:38 +0100)]
ngircd.8: Update for the now always available debug-mode

2 weeks agoUpdate and fix logcheck(8) rules
Alexander Barton [Mon, 8 Jan 2024 15:35:30 +0000 (16:35 +0100)]
Update and fix logcheck(8) rules

2 weeks agoS2S-SSL/GnuTLS: Enable CRL verification
Christoph Biedl [Sat, 30 Mar 2024 23:36:53 +0000 (00:36 +0100)]
S2S-SSL/GnuTLS: Enable CRL verification

3 weeks agoS2S-TLS: Fix "make check" in separate build directory
Alexander Barton [Fri, 9 Feb 2024 23:14:33 +0000 (00:14 +0100)]
S2S-TLS: Fix "make check" in separate build directory

3 weeks agoS2S-TLS: Add notice to INSTALL.md
Alexander Barton [Thu, 11 Jan 2024 13:24:22 +0000 (14:24 +0100)]
S2S-TLS: Add notice to INSTALL.md

3 weeks agoS2S-TLS: Convert SSL.txt to Markdown and update information given
Alexander Barton [Mon, 8 Jan 2024 17:31:30 +0000 (18:31 +0100)]
S2S-TLS: Convert SSL.txt to Markdown and update information given

No longer describe creating self-signed certificates or using "stunnel",
as both is not recommended.

3 weeks agoS2S-TLS/GnuTLS: Fix handling of connections without peer certificates
Alexander Barton [Sat, 6 Jan 2024 18:57:50 +0000 (19:57 +0100)]
S2S-TLS/GnuTLS: Fix handling of connections without peer certificates

3 weeks agoS2S-TLS: Verify the TLS certificates by default
Alexander Barton [Sat, 6 Jan 2024 14:55:54 +0000 (15:55 +0100)]
S2S-TLS: Verify the TLS certificates by default

This is already mentioned as the default in the manual page and the
sample configuration file, but was actually not enabled in the code!

3 weeks agoS2S-TLS/GnuTLS: Streamline logging
Alexander Barton [Fri, 5 Jan 2024 21:31:32 +0000 (22:31 +0100)]
S2S-TLS/GnuTLS: Streamline logging

3 weeks agoS2S-TLS/GnuTLS: Fix handling of certificate information for incoming connections
Alexander Barton [Fri, 5 Jan 2024 21:29:40 +0000 (22:29 +0100)]
S2S-TLS/GnuTLS: Fix handling of certificate information for incoming connections

Show proper certificate information for incoming connections, too, and
not "peer did not present a certificate", regardless if the client sent
a certificate or not.

This change is for GnuTLS and similar to what was implemented in commit
for OpenSSL in "S2S-TLS/OpenSSL: Fix handling of certificate information
for incoming connections".

3 weeks agoS2S-TLS/GnuTLS: Update SSL code for GnuTLS certificate reloading
Alexander Barton [Fri, 5 Jan 2024 21:23:53 +0000 (22:23 +0100)]
S2S-TLS/GnuTLS: Update SSL code for GnuTLS certificate reloading

Without this, the S2S-TLS-Patch not even compiles with GnuTLS because
of the "new" GnuTLS certificate reload support implemented in commit
eead4a63 ("x509_cred_slot").

3 weeks agoS2S-TLS: MAX_CERT_CHAIN_LENGTH is only used by OpenSSL
Alexander Barton [Fri, 5 Jan 2024 21:17:12 +0000 (22:17 +0100)]
S2S-TLS: MAX_CERT_CHAIN_LENGTH is only used by OpenSSL

3 weeks agoS2S-TLS: Fix formatting and sort new SSL options in ngircd.conf manual page
Alexander Barton [Wed, 3 Jan 2024 14:40:58 +0000 (15:40 +0100)]
S2S-TLS: Fix formatting and sort new SSL options in ngircd.conf manual page

3 weeks agoS2S-TLS/OpenSSL: Streamline logging
Alexander Barton [Tue, 2 Jan 2024 21:13:42 +0000 (22:13 +0100)]
S2S-TLS/OpenSSL: Streamline logging

This includes simplifying cb_connserver_login_ssl() a bit, we do not
have to code for invalid state which was ruled out by an assert() and
therefore can get rid of the goto altogether (and don't log the same
error twice with different messages).

3 weeks agoS2S-TLS/OpenSSL: Postpone verification of TLS session right before server handshake
Alexander Barton [Tue, 2 Jan 2024 21:02:46 +0000 (22:02 +0100)]
S2S-TLS/OpenSSL: Postpone verification of TLS session right before server handshake

The verify callback in OpenSSL is called pretty early, and at that time
it is not possible yet to check which connection it belongs to, and some
connections may have relaxed requirements.

So always return success in the Verify_openssl() callback, and postpone
validation of the TLS session until starting the server handshake in
cb_connserver_login_ssl(), when we know which server this connection
belongs to and which options (like "SSLVerify") are in effect.

The code doing this was already present in cb_connserver_login_ssl(),
but this patch adds a more prominent comment to the function.

3 weeks agoS2S-TLS/OpenSSL: Fix handling of certificate information for incoming connections
Alexander Barton [Tue, 2 Jan 2024 20:10:17 +0000 (21:10 +0100)]
S2S-TLS/OpenSSL: Fix handling of certificate information for incoming connections

Show proper certificate information for incoming connections, too, and
not "peer did not present a certificate", regardless if the client sent
a certificate or not.

And free the client certificate structure "peer_cert" on incoming
connections as well!

3 weeks agoS2S-TLS/OpenSSL: Set the verification flags only once
Alexander Barton [Tue, 2 Jan 2024 19:55:15 +0000 (20:55 +0100)]
S2S-TLS/OpenSSL: Set the verification flags only once

Set the verification flags in the ConnSSL_SetVerifyProperties_openssl
function only, don't override them in ConnSSL_InitLibrary() afterwards.

No functional changes, now ConnSSL_SetVerifyProperties_openssl() sets
exactly the parameters which ConnSSL_InitLibrary() always overwrote ...

3 weeks agoS2S-TLS/OpenSSL: Always setup host name verification
Alexander Barton [Mon, 1 Jan 2024 18:58:35 +0000 (19:58 +0100)]
S2S-TLS/OpenSSL: Always setup host name verification

Setup host name verification even when the "SSLVerify" option is
disabled, because even then the peer can present a valid certificate and
validation would always(!) fail because of the missing host name
verification setup.

3 weeks agoS2S-TLS: Remove leftover debug messages
Alexander Barton [Sat, 16 Dec 2023 15:30:06 +0000 (16:30 +0100)]
S2S-TLS: Remove leftover debug messages

3 weeks agoS2S-TLS: Add missing CAFile and CRLFile options to "configtest" output
Alexander Barton [Sat, 16 Dec 2023 15:29:05 +0000 (16:29 +0100)]
S2S-TLS: Add missing CAFile and CRLFile options to "configtest" output

3 weeks agoSupport for server certificate validation on server links [S2S-TLS]
Christoph Biedl [Sun, 2 Nov 2014 13:48:34 +0000 (14:48 +0100)]
Support for server certificate validation on server links [S2S-TLS]

This patch provides code to validate the server certificate in
server links, defeating nasty man-in-the-middle attacks on server
links.

Features:

- Check whether the certificate is signed by a trusted certificate
  authority (CA).
- Check the host name, including wildcard certificates and Subject
  Alternative Names.
- Optionally check against a certificate revocation list (CRL).
- Implementation for both OpenSSL and GnuTLS linkage.

Left for another day:

- Parameterize the TLS parameter of an outbound connection. Currently,
  it's hardcoded to disable all versions before TLSv1.1.
- Using certificate as CA-certificate. They work for GnuTLS only but
  perhaps this should rather raise an error there, too.
- Optional OCSP checking.
- Checking client certificates. Code is there but this first needs some
  consideration about the use cases. This could replace all other
  authentication methods, for both client-server and server-server
  connections.

This patch is based on a patch by Florian Westphal from 2009, which
implemented this for OpenSSL only:

  From: Florian Westphal <fw@strlen.de>
  Date: Mon, 18 May 2009 00:29:02 +0200
  Subject: SSL/TLS: Add initial certificate support to OpenSSL backend

Commit message modified by Alex Barton.

Closes #120, "Server links using TLS/SSL need certificate validation".
Supersedes PR #8, "Options for verifying and requiring SSL client
certificates", which had (incomplete?) code for OpenSSL, no GnuTLS.

3 weeks agoStreamline README.md & INSTALL.md files
Alexander Barton [Sat, 23 Mar 2024 19:15:16 +0000 (20:15 +0100)]
Streamline README.md & INSTALL.md files

- Tweak some paragraphs and bring others more in line with texts on the
  homepage ...
- Try to not duplicate information:
  - Configuration is explained in doc/QuickStart.md;
  - command line parameters are already better described in the
    ngircd(8) manual page.
- Move all pointers to documentation to the README.md file, which is
  directly shown in GitHub when browsing the repository, for example.

3 weeks agoBring manual page more in line with README.md and homepage
Alexander Barton [Sat, 23 Mar 2024 18:58:23 +0000 (19:58 +0100)]
Bring manual page more in line with README.md and homepage

4 weeks agoQuickStart.md: Tweak the text a bit ...
Alexander Barton [Sun, 17 Mar 2024 19:36:20 +0000 (20:36 +0100)]
QuickStart.md: Tweak the text a bit ...

4 weeks agoINSTALL.md: Add info for macOS systems
Alexander Barton [Sun, 17 Mar 2024 18:51:43 +0000 (19:51 +0100)]
INSTALL.md: Add info for macOS systems

4 weeks agoMETATADA: Fix unsetting "cloakhost"
Alexander Barton [Sun, 17 Mar 2024 14:55:39 +0000 (15:55 +0100)]
METATADA: Fix unsetting "cloakhost"

Correctly re-generate the "cloaked hostname" when removing the
"cloakhost" using an empty string by passing down NULL instead of the
empty string, which results in protocol violations (for example on
WHOIS).

4 weeks agoUpdate the "rpm" make target to use rpmbuild(8)
Alexander Barton [Sat, 10 Feb 2024 00:13:43 +0000 (01:13 +0100)]
Update the "rpm" make target to use rpmbuild(8)

4 weeks agoAdd a Dockerfile and documentation to the project
Alexander Barton [Fri, 9 Feb 2024 21:58:44 +0000 (22:58 +0100)]
Add a Dockerfile and documentation to the project

2 months agoStreamline the "testsuite" and "srcdoc" make targets
Alexander Barton [Fri, 9 Feb 2024 23:03:13 +0000 (00:03 +0100)]
Streamline the "testsuite" and "srcdoc" make targets

2 months agoRemove outdated, unsupported and broken support for splint(1)
Alexander Barton [Fri, 9 Feb 2024 23:00:19 +0000 (00:00 +0100)]
Remove outdated, unsupported and broken support for splint(1)

2 months agoGit: Streamline and simplify .gitignore file
Alexander Barton [Fri, 9 Feb 2024 21:54:17 +0000 (22:54 +0100)]
Git: Streamline and simplify .gitignore file

2 months agoConvert contrib/README to Markdown
Alexander Barton [Fri, 9 Feb 2024 21:47:05 +0000 (22:47 +0100)]
Convert contrib/README to Markdown

2 months agoDoxygen: Update the footer links
Alexander Barton [Wed, 31 Jan 2024 20:03:44 +0000 (21:03 +0100)]
Doxygen: Update the footer links

2 months agotestsuite: Pass -nameopt to openssl s_client.
Sebastian Andrzej Siewior [Tue, 30 Jan 2024 20:26:16 +0000 (21:26 +0100)]
testsuite: Pass -nameopt to openssl s_client.

The default value for the -nameopt option changed in OpenSSL 3.2 from
`oneline' to `utf8'. The `oneline' option also included a space around
the fields which is not the case for `utf8'. This means that
CN = my.first.domain.tld

changed to

CN=my.first.domain.tld

and is now longer recognized, leading to test failure.
This can be fixed by either going back to `oneline' or keeping `utf8'
and adding additionally `space_eq'. Anoter way would be to teach the
expect that the space is optional.

Add explicit -nameopt option with `utf8,space_eq' which is understood by
by OpenSSL 3.2 and earlier to make explicit. Remove the wildcard.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2 months agoDebian package: Enable the [SSL] section
Alexander Barton [Tue, 23 Jan 2024 21:25:28 +0000 (22:25 +0100)]
Debian package: Enable the [SSL] section

This makes sense because the package is build with SSL support enabled,
and we set and enable "CAFile" in commit ae9cfade -- which results in an
error when this is not in an enabled(!) [SSL] section ...

2 months ago2nd attempt to always show the correct config file name ...
Alexander Barton [Tue, 23 Jan 2024 21:20:21 +0000 (22:20 +0100)]
2nd attempt to always show the correct config file name ...

But we are getting there!

2 months agoTestsuite: Test for the openssl command before using it
Alexander Barton [Tue, 23 Jan 2024 13:41:48 +0000 (14:41 +0100)]
Testsuite: Test for the openssl command before using it

And skip the tests calling it instead of failing!

2 months agoCorrectly show the configuration file used
Alexander Barton [Tue, 23 Jan 2024 13:41:21 +0000 (14:41 +0100)]
Correctly show the configuration file used

2 months agoINSTALL.md: Add info for current Red Hat/Fedora systems
Alexander Barton [Sun, 21 Jan 2024 19:14:42 +0000 (20:14 +0100)]
INSTALL.md: Add info for current Red Hat/Fedora systems

2 months agoMigrate info from INSTALL.md into doc/QuickStart.md
Alexander Barton [Sun, 21 Jan 2024 19:10:42 +0000 (20:10 +0100)]
Migrate info from INSTALL.md into doc/QuickStart.md

Move most information regarding configuring ngIRCd into the
doc/QuickStart.md document, only describe building and installing ngIRCd
in the INSTALL.md file. Don't duplicate content!

Add references where this makes sense.

2 months agoDon't show the default config file name on config errors
Alexander Barton [Sun, 21 Jan 2024 18:58:01 +0000 (19:58 +0100)]
Don't show the default config file name on config errors

The configuration can be set in drop-in files in the include directory,
too, so it is not clear in which file it is actually missing.

2 months agoUse a default "IncludeDir" only when no config file was specified
Alexander Barton [Sun, 21 Jan 2024 18:41:39 +0000 (19:41 +0100)]
Use a default "IncludeDir" only when no config file was specified

No longer use a default built-in value for the "IncludeDir" directive
when a configuration file was explicitly specified on the command line
using "--config"/"-f": This way no default include directory is scanned
when a possibly non-default configuration file is used which
(intentionally) did not specify an "IncludeDir" directive.

With this patch you now can use "-f /dev/null" for checking all built-in
defaults, regardless of any local configuration files in the default
drop-in directory (which would have been read in until this change).

2 months agoAdd an introduction and generic info to doc/QuickStart.md
Alexander Barton [Sun, 21 Jan 2024 01:56:23 +0000 (02:56 +0100)]
Add an introduction and generic info to doc/QuickStart.md

2 months agoDebian package: Configure the system CA certificates store
Alexander Barton [Sun, 21 Jan 2024 13:13:33 +0000 (14:13 +0100)]
Debian package: Configure the system CA certificates store

2 months agoDo not log channel keys ("passwords") for predefined channels
Alexander Barton [Sun, 21 Jan 2024 13:12:19 +0000 (14:12 +0100)]
Do not log channel keys ("passwords") for predefined channels

2 months agoCI: Fix YAML, there shouldn't have been tabs in the file!
Alexander Barton [Sun, 21 Jan 2024 00:48:15 +0000 (01:48 +0100)]
CI: Fix YAML, there shouldn't have been tabs in the file!

2 months agoCI: Looks like "cache-apt-pkgs-action" needs exact package names
Alexander Barton [Sun, 21 Jan 2024 00:36:05 +0000 (01:36 +0100)]
CI: Looks like "cache-apt-pkgs-action" needs exact package names

And list only one package per line; way easier to read and maintain :-)

2 months ago"ngIRCd CI" GitHub Action: Update and use cache-apt-pkgs-action
Alexander Barton [Sun, 21 Jan 2024 00:20:14 +0000 (01:20 +0100)]
"ngIRCd CI" GitHub Action: Update and use cache-apt-pkgs-action

2 months agoMake the description of the "Info" option more precise
Alexander Barton [Sat, 20 Jan 2024 22:07:25 +0000 (23:07 +0100)]
Make the description of the "Info" option more precise

The "Info" option in the "[Global]" section is optional (so comment it
out in the sample configuration file) and set to the server software
name and its version when not set (so add this information to the sample
configuration file and the ngircd.conf(5) manual page).

2 months agoDeduce a server name when not set in the configuration
Alexander Barton [Sat, 20 Jan 2024 22:04:32 +0000 (23:04 +0100)]
Deduce a server name when not set in the configuration

The server "Name" in the "[Global]" section of the configuration file is
optional now: When not set (or empty), ngIRCd now tries to deduce a
valid IRC server name from the local host name ("node name"), possibly
adding a ".host" extension when the host name does not contain a dot
(".") which is required in an IRC server name ("ID").

This new behaviour, with all configuration parameters now being
optional, allows running ngIRCd without any configuration file at all.

2 months agoExplicitly test for the empty string in Channel_UserHasMode()
Alexander Barton [Sat, 20 Jan 2024 15:14:01 +0000 (16:14 +0100)]
Explicitly test for the empty string in Channel_UserHasMode()

Basically this is unnecessary, as Channel_UserModes() always returns a
valid pointer and strchr() can deal with an empty (NULL-terminated)
string perfectly fine, bit it makes the code a bit more obvious and
silences the following warning:

  In function ‘Channel_UserHasMode’,
      inlined from ‘Channel_Kick’ at channel.c:384:7:
  channel.c:784:16: warning: ‘strchr’ reading 1 or more bytes from a region
                    of size 0 [-Wstringop-overread]
    784 |         return strchr(Channel_UserModes(Chan, Client), Mode) != NULL;
        |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This was seen with "gcc (Debian 12.2.0-14) 12.2.0" at least.

2 months agoUpdate the AUTHORS.md file
Alexander Barton [Sat, 20 Jan 2024 14:56:56 +0000 (15:56 +0100)]
Update the AUTHORS.md file

2 months agoUpdate the mailing list address to ngircd@lists.barton.de
Alexander Barton [Sat, 20 Jan 2024 14:37:50 +0000 (15:37 +0100)]
Update the mailing list address to ngircd@lists.barton.de

2 months agoConvert the AUTHORS file to Markdown
Alexander Barton [Sat, 20 Jan 2024 13:03:17 +0000 (14:03 +0100)]
Convert the AUTHORS file to Markdown

2 months agoUpdate included Debian package configuration
Alexander Barton [Fri, 19 Jan 2024 21:07:38 +0000 (22:07 +0100)]
Update included Debian package configuration

- Rewrite using current dh_make.
- Standards-Version: 4.6.2.
- No longer build 3 different packages; only build "ngircd" which now
  includes support for IDENT, PAM (disabled in the ngircd.conf installed
  by the package), SSL (OpenSSL), ZLib and IPv6.
- Update package description accordingly.
- No longer install a SysV init file, only install ngircd.service unit.

2 months agoRemove outdated and obsolete targets from the toplevel Makefile
Alexander Barton [Fri, 19 Jan 2024 21:14:47 +0000 (22:14 +0100)]
Remove outdated and obsolete targets from the toplevel Makefile

This affects targets for Apple Xcode and Package Maker, which both are
no longer supported/included in the ngIRCd distribution.

See commits 0652c99b and 07219281, this is a leftover ...

2 months agoUse -Werror when testing for -Wno-format-truncation
Alexander Barton [Fri, 19 Jan 2024 15:55:23 +0000 (16:55 +0100)]
Use -Werror when testing for -Wno-format-truncation

Clang does not know the -Wno-format-truncation option of (current) GCC,
but accepts unknown -W... options (exit core 0) but issues a warning
message on every invocation. So for example on macOS, where Clang is
used as "gcc", a new warning message was shown for every file to
compile, since we enabled -Wno-format-truncation in commit 1d527eaf:

  warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]

Clang no longer acceps unknown -W... options by enabling -Werror, which
this patch adds to the CFLAGS while testing for -Wno-format-truncation,
which fixes this issue.

This fixes commit 1d527eaf.

2 months agoAnnotate "fall through" cases to silence warnings
Alexander Barton [Thu, 18 Jan 2024 21:41:39 +0000 (22:41 +0100)]
Annotate "fall through" cases to silence warnings

Add a "/* fall through */" annotation to "case" statements which
actually should "fall through" to silences GCC warning like this:

  hash.c: In function ‘jenkins_hash’:
  hash.c:110:27: warning: this statement may fall through
                 [-Wimplicit-fallthrough=]
    110 |                 case 12: c+=((UINT32)k[11])<<24;
        |                          ~^~~~~~~~~~~~~~~~~~~~~

2 months agoDisable GCC -Wformat-truncation when suported
Alexander Barton [Thu, 18 Jan 2024 21:39:10 +0000 (22:39 +0100)]
Disable GCC -Wformat-truncation when suported

Pass -Wno-format-truncation when this is supported by GCC so silence
warnings like this:

  conf.c: In function ‘Read_Config’:
  conf.c:985:60: warning: ‘snprintf’ output may be truncated before
                 the last format character [-Wformat-truncation=]
    985 |                         snprintf(file, sizeof(file), "%s/%s",
        |                                                            ^
  conf.c:985:25: note: ‘snprintf’ output 2 or more bytes (assuming 257)
                 into a destination of size 256
    985 |                         snprintf(file, sizeof(file), "%s/%s",
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    986 |                                  Conf_IncludeDir, entry->d_name);
        |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The warning is correct, but this is basically why we use snprintf() in
the first place.

3 months agoSpelling fixes, mostly in file comments
Alexander Barton [Fri, 30 Dec 2022 14:37:35 +0000 (15:37 +0100)]
Spelling fixes, mostly in file comments

3 months agoautogen.sh: Prefere automake 1.11 over other releases
Alexander Barton [Tue, 16 Jan 2024 16:33:54 +0000 (17:33 +0100)]
autogen.sh: Prefere automake 1.11 over other releases

GNU automake 1.11 is the last release supporting "de-ANSI-fication"
using the included ansi2knr tool. And becuase we _want_ to support old
K&R platforms, we try hard to use this release of automake when
available to generate our build system.

3 months agoAutodetect support for IPv6 by default
Alexander Barton [Mon, 15 Jan 2024 21:14:15 +0000 (22:14 +0100)]
Autodetect support for IPv6 by default

Until now, IPv6 support was disabled by default, which seems a bit
outdated in 2024. Note: You still can pass "--enable-ipv6" or
"--disable-ipv6" to the ./configure script to forcefully activate or
deactivate IPv6 support.

3 months agoDo IDENT requests even when DNS lookups are disabled
Alexander Barton [Mon, 15 Jan 2024 20:12:10 +0000 (21:12 +0100)]
Do IDENT requests even when DNS lookups are disabled

Without this patch, disabling DNS in the configuration disabled IDENT
lookups as well (for no good reason).

This patch allows enabling/disabling DNS lookups and IDENT requests
completely separately and enhances the messages sent to the client when
"NoticeBeforeRegistration" is enabled, too.

Thanks for reporting this, Miniontoby!

Closes #291.

3 months agoStart preparing the ChangeLog for the next release ...
Alexander Barton [Thu, 11 Jan 2024 13:56:03 +0000 (14:56 +0100)]
Start preparing the ChangeLog for the next release ...

3 months agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Thu, 11 Jan 2024 13:51:27 +0000 (14:51 +0100)]
Update config.guess and config.sub to recent versions

- config.guess: 2023-08-22
- config.sub: 2023-09-19

3 months agoChannel Admins are not allowed to set Channel Owner status!
Alexander Barton [Tue, 9 Jan 2024 15:36:10 +0000 (16:36 +0100)]
Channel Admins are not allowed to set Channel Owner status!

This was reported back in April 2021, thanks Sarah!

    Subject: NGIRCD bug report
    Date: April 28 2021, 14:30:08 MESZ
    To: alex@barton.de

    Hello,

    I am writing to you to report a bug in ngircd.
    In any give channel, if an user is with mode +a (admin), he/she can
    sets mode +/-q(owner) to any other user. This is not inline with the
    documentation.

    I've looked into the code irc-mode.c, apparently an if block is
    missing. Below are the code snippets that I believe fixes the bug.

This patch is what Sarah sent in. Thanks a lot!

3 months agoConvert the FAQ to Markdown and enhance it!
Alexander Barton [Tue, 9 Jan 2024 14:52:34 +0000 (15:52 +0100)]
Convert the FAQ to Markdown and enhance it!

3 months agoTest suite: Update for OpenSSL 3.x
Alexander Barton [Mon, 8 Jan 2024 22:11:33 +0000 (23:11 +0100)]
Test suite: Update for OpenSSL 3.x

3 months agoAllow SSL client-only configurations without keys/certificates
Alexander Barton [Sat, 6 Jan 2024 18:53:33 +0000 (19:53 +0100)]
Allow SSL client-only configurations without keys/certificates

You don't need to configure certificates/keys as long as you don't
configure SSL-enabled listening ports.

This can make sense when you want to only link your local daemon to an
uplink server using SSL and only have clients on your local host or in
you fully trusted network, where SSL is not required.

3 months agoRemove unmaintained contrib/MacOSX/ folder
Alexander Barton [Mon, 8 Jan 2024 21:16:52 +0000 (22:16 +0100)]
Remove unmaintained contrib/MacOSX/ folder

This includes removing the Xcode project.

The sample launchd(8) configuration properties list file was moved to
"contrib/de.barton.ngircd.plist" and kept.

3 months agoQuickStart.md: Update title and fix Markdown syntax
Alexander Barton [Mon, 8 Jan 2024 20:08:18 +0000 (21:08 +0100)]
QuickStart.md: Update title and fix Markdown syntax

3 months agoUpdate the project description, enhance & fix the README.md
Alexander Barton [Mon, 8 Jan 2024 20:07:33 +0000 (21:07 +0100)]
Update the project description, enhance & fix the README.md

3 months ago2024 =:)
Alexander Barton [Mon, 8 Jan 2024 15:38:45 +0000 (16:38 +0100)]
2024 =:)

3 months agoFix showing the "Ident" option in --configtest output
Alexander Barton [Sat, 6 Jan 2024 14:50:33 +0000 (15:50 +0100)]
Fix showing the "Ident" option in --configtest output

We tested for the wrong #define ... ooops!

3 months agoChange GnuTLS "slot handling" messages to debug level
Alexander Barton [Fri, 5 Jan 2024 21:22:20 +0000 (22:22 +0100)]
Change GnuTLS "slot handling" messages to debug level

Those messages are about an internal implementation detail, not relevant
for an administrator of ngIRCd.

3 months agoEnlarge buffer for log messages
Alexander Barton [Fri, 5 Jan 2024 21:18:17 +0000 (22:18 +0100)]
Enlarge buffer for log messages

For example, SSL/TLS certificate information can easily get longer than
256 characters. So enlarge the log buffer to 1 KB.

3 months agoRespect "SSLConnect" option for incoming connections
Alexander Barton [Mon, 1 Jan 2024 17:20:26 +0000 (18:20 +0100)]
Respect "SSLConnect" option for incoming connections

Don't accept incoming plain-text ("non SSL") server connections for
servers configured with "SSLConnect" enabled.

If "SSLConnect" is not set for an incoming connection the server still
accepts both plain-text and encrypted connections.

This change prevents an authenticated client-server being able to force
the server-server to send its password on a plain-text connection when
SSL/TLS was intended.

3 months agoAlways initiate closing a connection on errors.
Alexander Barton [Fri, 24 Nov 2023 17:16:36 +0000 (18:16 +0100)]
Always initiate closing a connection on errors.

Always try to close a connection with errors immediately, but try hard
to avoid too much recursion.

Without this patch, an outgoing server connection could get stuck in an
"endless" state trying to write out data over and over again.

This tries to fix 04de1423eb26.

6 months agoAdd "hopm.service" to "Wants" and "Before" dependencies in systemd unit file
Alexander Barton [Tue, 17 Oct 2023 14:15:38 +0000 (16:15 +0200)]
Add "hopm.service" to "Wants" and "Before" dependencies in systemd unit file

7 months agoUpdate Debian package configuration
Alexander Barton [Sun, 17 Sep 2023 21:42:08 +0000 (23:42 +0200)]
Update Debian package configuration

This not only bumps the "compat" version, but updates the package
dependencies and build rules accordingly.

Closes #299.

7 months agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sun, 17 Sep 2023 21:39:05 +0000 (23:39 +0200)]
Update config.guess and config.sub to recent versions

- config.guess: 2022-01-09
- config.sub: 2022-01-03