]> jfr.im git - solanum.git/log
solanum.git
4 weeks agocheck bans and quiets for cmode -n/nonmember PRIVMSG main
John Runyon [Mon, 27 May 2024 02:43:34 +0000 (20:43 -0600)] 
check bans and quiets for cmode -n/nonmember PRIVMSG

2 months agoFix small typo
Firepup650 [Tue, 9 Apr 2024 02:28:37 +0000 (21:28 -0500)] 
Fix small typo

authdd -> authd

3 months agom_starttls: advertise tls cap only if SSL is possible
Doug Freed [Tue, 21 Feb 2023 20:47:11 +0000 (20:47 +0000)] 
m_starttls: advertise tls cap only if SSL is possible

5 months agodoc/reference.conf: document the auth::umodes configuration option
Aaron Jones [Mon, 15 Jan 2024 22:59:40 +0000 (22:59 +0000)] 
doc/reference.conf: document the auth::umodes configuration option

Fixes: 4d8088c386c23049fcfe ("Allow auth{} to apply extra umodes")
7 months agoMODRESTART/MODRELOAD: Defer reloading more quickly
Aaron Jones [Sun, 19 Nov 2023 11:47:24 +0000 (11:47 +0000)] 
MODRESTART/MODRELOAD: Defer reloading more quickly

Commit 41390bfe5fa3895b8dee fixed a bug whereby the processing
of a MODRESTART command could result in a crash. The approach
taken in this fix was to defer the reloading of all modules
so that the call stack does not contain functions located in
modules that are being reloaded. It did this by scheduling a
one-shot timer event for 1 second in the future, in the absense
of any better deferral mechanism at the time. Timers are
processed by the event loop, which is core to IRCd and cannot
be reloaded.

Commit 59ea3c6753e80d051b20 introduced a mechanism to defer the
execution of a function until all events have been processed by
the event loop, in order to fix a REHASH bug that could result
in a crash due to closing and reopening listener sockets with a
pending socket connection event to process after the REHASH was
completed.

Rework commit 41390bfe5fa3895b8dee to use the new deferral
mechanism introduced by commit 59ea3c6753e80d051b20 and do the
same for module reloads.

7 months agodoc/reference.conf: document connect::flags sctp
Aaron Jones [Sun, 19 Nov 2023 17:51:29 +0000 (17:51 +0000)] 
doc/reference.conf: document connect::flags sctp

7 months agoextensions/invite_notify: make the NOTICE optional, configurable
Aaron Jones [Wed, 11 Jan 2023 21:16:58 +0000 (21:16 +0000)] 
extensions/invite_notify: make the NOTICE optional, configurable

This adds a configuration option that determines whether the NOTICE is
sent to clients that do not support the IRCv3 invite-notify capability.

Requested by LiberaChat MGM.

7 months agoircd/listener: return a fatal TLS alert for early rejected TLS clients
Aaron Jones [Thu, 15 Jun 2023 22:32:12 +0000 (22:32 +0000)] 
ircd/listener: return a fatal TLS alert for early rejected TLS clients

This is in furtherance of commit 3fdf26aa19628d5e12a3 which added
functionality to reply with a TLS record layer alert for D-Lined TLS
clients. It turns out that there are other plaintext error messages
in this same function that should receive the same treatment.

Also move another error string to a variable and use a compile-time
optimised-out strlen for it too, to use the same approach as an
existing error string.

Finally, use a different alert (internal_error) for the case where
IRCd is simply unable to accept more connections.

7 months agoclient: refactor del_all_accepts to allow skipping own accept list
Doug Freed [Sun, 3 Sep 2023 23:19:00 +0000 (23:19 +0000)] 
client: refactor del_all_accepts to allow skipping own accept list

This allows reusing this function for other uses that just need to
remove this client from others' accept lists on nick change and not have
duplicates of this code everywhere

7 months agomodules/m_oper.c: give a better error message for failure to find o:line
Aaron Jones [Wed, 4 Oct 2023 18:54:05 +0000 (18:54 +0000)] 
modules/m_oper.c: give a better error message for failure to find o:line

The snotice sent to other opers can be misleading. For example, it will say
host mismatch even if the host is correct but the username is wrong, or if
the oper name given does not exist in the configuration.

7 months agomodules/m_challenge.c: give a better error message for failure to find o:line
Aaron Jones [Wed, 4 Oct 2023 18:52:47 +0000 (18:52 +0000)] 
modules/m_challenge.c: give a better error message for failure to find o:line

The snotice sent to other opers can be misleading. For example, it will say
host mismatch even if the host is correct but the username is wrong, or if
the oper name given does not exist in the configuration.

7 months agomodules/m_challenge.c: log correct mechanism
Aaron Jones [Wed, 4 Oct 2023 18:48:42 +0000 (18:48 +0000)] 
modules/m_challenge.c: log correct mechanism

I suspect this is a copy/paste omission when duplicating the code from
modules/m_oper.c when it was created.

7 months agoReplace free with rb_free
Eric Mertens [Mon, 6 Nov 2023 01:29:19 +0000 (17:29 -0800)] 
Replace free with rb_free

7 months agoDelay rehashing until we're not processing events
Ed Kellett [Sun, 5 Nov 2023 22:05:41 +0000 (22:05 +0000)] 
Delay rehashing until we're not processing events

Fixes crash introduced by 0ab6dbbc651ddd1c26cb7baa6e6cf86890a4abd2. It's
probably a regression since it defeats a system designed to stop this
from happening, but I didn't dig through the history.

rehash() closes listeners. If we happen to get a single epoll() result
that wants to first rehash and then accept a connection, the epoll info
will point to a freed rb_fde_t. Other selectors should have similar
problems, but we didn't investigate that.

rb_fde_ts are normally batched up and freed outside the event
processing, but as of the above commit close_listeners() screws that up
by closing pending FDs immediately in order to create new listeners.

I think it might be a bit better to revert this behaviour and simply not
close listeners if we are going to open new ones over them, but have
opted for the smallest reasonable change I can think of.

Helped-by: Eric Mertens <redacted>
8 months agoReplace RPL_WHOISTEXT(337) with RPL_WHOISSPECIAL(320) (#419)
Eric Mertens [Tue, 3 Oct 2023 23:35:52 +0000 (16:35 -0700)] 
Replace RPL_WHOISTEXT(337) with RPL_WHOISSPECIAL(320) (#419)

Reasons:
* 337 conflicts with other IRCds use as RPL_ENDOFINVITELIST
* 320 is commonly used for extra human-readable information

10 months agodocument +M cmode (#417)
Svetlana T [Tue, 29 Aug 2023 16:12:01 +0000 (02:12 +1000)] 
document +M cmode (#417)

10 months agoTerminate last line in setfilter help
Mike Quin [Mon, 7 Aug 2023 14:04:21 +0000 (15:04 +0100)] 
Terminate last line in setfilter help

10 months agoFix typo
Mike Quin [Mon, 7 Aug 2023 13:38:31 +0000 (14:38 +0100)] 
Fix typo

10 months agoCorrect order of chunking and encoding steps.
Mike Quin [Mon, 7 Aug 2023 13:28:59 +0000 (14:28 +0100)] 
Correct order of chunking and encoding steps.

10 months agoDescribe database loading.
Mike Quin [Mon, 7 Aug 2023 07:39:30 +0000 (08:39 +0100)] 
Describe database loading.

10 months agoAdd documentation for extensions/filter
Mike Quin [Sun, 6 Aug 2023 18:02:14 +0000 (19:02 +0100)] 
Add documentation for extensions/filter

11 months agoextensions/extb_extgecos: Fix breakage
TheDaemoness [Mon, 3 Jul 2023 20:50:46 +0000 (13:50 -0700)] 
extensions/extb_extgecos: Fix breakage

This commit returns $x's old behavior as long as the mask does not
contain a #, otherwise it uses the new behavior that supports
CIDR notation.

This fixes `$x:*badword*` not matching realnames containing "badword".

11 months agoClarify messages when auspex users have hidden their own idle times
Stephen Bennett [Sat, 1 Jul 2023 18:28:01 +0000 (19:28 +0100)] 
Clarify messages when auspex users have hidden their own idle times

Co-authored-by: Doug Freed <redacted>
11 months agoprioritise telling opers that a auspexed target is +I
jesopo [Sat, 25 Feb 2023 16:03:59 +0000 (16:03 +0000)] 
prioritise telling opers that a auspexed target is +I

11 months agoshow opers a reasonable message when auspex allows them to see idle time
jesopo [Thu, 12 Jan 2023 00:24:15 +0000 (00:24 +0000)] 
show opers a reasonable message when auspex allows them to see idle time

11 months agoAdd ACCOUNTEXTBAN ISUPPORT token
Valentin Lorentz [Wed, 23 Nov 2022 19:56:35 +0000 (20:56 +0100)] 
Add ACCOUNTEXTBAN ISUPPORT token

To support the draft IRCv3 spec: https://github.com/ircv3/ircv3-specifications/pull/464

11 months agomodules: quietly succeed at loading a module if already loaded
Doug Freed [Thu, 22 Jun 2023 23:11:35 +0000 (23:11 +0000)] 
modules: quietly succeed at loading a module if already loaded

This allows explicitly loading a module in the config so it's available
for later config items that might need it, and skips the double load
when main loads all modules, which would cause errors

11 months agomodules: clear module list and mod paths in init
Doug Freed [Fri, 23 Jun 2023 00:00:55 +0000 (00:00 +0000)] 
modules: clear module list and mod paths in init

If main is called more than once (like in tests), everything is
reinitialized except the loaded module list and module paths, so clear
them too so that modules are loaded again and the path list is correct.

11 months agosupport RSFNC indicating type of FNC (e.g. FORCE vs REGAIN) (#406)
Jess Porter [Sat, 1 Jul 2023 18:22:40 +0000 (19:22 +0100)] 
support RSFNC indicating type of FNC (e.g. FORCE vs REGAIN) (#406)

11 months agoextensions/extb_extgecos: support CIDR masks in $x extbans (#414)
Aaron Jones [Sat, 1 Jul 2023 18:16:27 +0000 (18:16 +0000)] 
extensions/extb_extgecos: support CIDR masks in $x extbans (#414)

This allows a channel operator to set a channel ban such as
"$x:*!*@192.0.2.0/24#*web.libera.chat*" and have it function
as intended.

Closes solanum-ircd/solanum#26

11 months agoAdd extban type for unidentified connections (#411)
TheDaemoness [Sat, 1 Jul 2023 18:09:41 +0000 (11:09 -0700)] 
Add extban type for unidentified connections (#411)

* Add extension extb_guest

This module provides an extban type that acts as a normal ban but
only matches unidentified users.

* Document extban g in help/opers/extban

* extensions/extb_guest: support CIDR masks in $g extbans

This allows a channel operator to set a channel ban such as
"$g:*!*@192.0.2.0/24#*web.libera.chat*" and have it function
as intended.

---------

Co-authored-by: Aaron Jones <redacted>
12 months agoWarn opers about unresponsive servers
David Schultz [Tue, 13 Jun 2023 14:13:42 +0000 (09:13 -0500)] 
Warn opers about unresponsive servers

12 months agoSort reps in CREDITS case insensitive alphabetically
Tom Wesley [Mon, 5 Jun 2023 18:08:57 +0000 (19:08 +0100)] 
Sort reps in CREDITS case insensitive alphabetically

12 months agoReplace libera reps with amdj and spb
Tom Wesley [Sat, 3 Jun 2023 17:48:08 +0000 (18:48 +0100)] 
Replace libera reps with amdj and spb

13 months agoreference.conf: document `hide_opers`
David Schultz [Fri, 19 May 2023 03:23:19 +0000 (22:23 -0500)] 
reference.conf: document `hide_opers`

13 months agom_shedding: user shedding module based on oftc-hybrid
David Schultz [Thu, 18 May 2023 19:44:23 +0000 (14:44 -0500)] 
m_shedding: user shedding module based on oftc-hybrid

13 months agodoc/connecting-servers: update example atheme protocol module
David Schultz [Mon, 15 May 2023 22:47:30 +0000 (17:47 -0500)] 
doc/connecting-servers: update example atheme protocol module

Atheme has had a protocol module designed specifically for Solanum for some time now that includes proper support for new IRCd features.

16 months agoAdd "automake" and "libtool" to the list of packages required for building
jonesman [Thu, 26 Jan 2023 04:10:44 +0000 (05:10 +0100)] 
Add "automake" and "libtool" to the list of packages required for building

17 months agochmode: convert bants to a proper serial
Doug Freed [Wed, 16 Nov 2022 21:44:25 +0000 (16:44 -0500)] 
chmode: convert bants to a proper serial

This way it increments for every change. It need not be a timestamp, as
its actual value is not important.

This fixes an issue where a ban could be set, hit, and cleared all in
the same second, and the affected client would still be cached as banned
because the bants hadn't actually changed.

17 months agoum_callerid: increase hook priority to restore +Rg behavior
Doug Freed [Wed, 18 Jan 2023 22:21:30 +0000 (16:21 -0600)] 
um_callerid: increase hook priority to restore +Rg behavior

Before splitting things out into hooks, umode +Rg would only notify the
recipient if the sender satisfied +R. This restores that behavior by
making the +g hook happen after +R.

17 months agoircd/authproc.c: avoid crash on lack of any configured DNSBLs
Aaron Jones [Wed, 11 Jan 2023 18:39:26 +0000 (18:39 +0000)] 
ircd/authproc.c: avoid crash on lack of any configured DNSBLs

Fixes fbc97166a6e455f5cccf
Closes #396

17 months agohelp/opers/: add HELP entry for DEHELPER
Aaron Jones [Wed, 11 Jan 2023 01:28:13 +0000 (01:28 +0000)] 
help/opers/: add HELP entry for DEHELPER

17 months agoauthd: fix crash/restart breaking DNSBL lookups (#394)
Aaron Jones [Wed, 11 Jan 2023 01:28:32 +0000 (01:28 +0000)] 
authd: fix crash/restart breaking DNSBL lookups (#394)

authd child processes are only told about configured DNSBLs when the
configuration is being parsed.

This is bad, because when authd crashes or is killed, IRCd will restart
it, but will not tell it about any configured DNSBLs until IRCd is next
rehashed.

We already have a dictionary that stores configured DNSBLs (for hit
statistics for `STATS n'), so store the additional needed fields in
that structure, and loop over that dictionary's entries when authd is
restarted, sending the fields just as if the configuration were being
reloaded.

Reported-By: @Unit193
17 months agostrip_colour: Strip '\x11' (monospace) and '\x1e' (strikethrough)
Tobias Geerinckx-Rice [Sun, 4 Dec 2022 00:00:00 +0000 (01:00 +0100)] 
strip_colour: Strip '\x11' (monospace) and '\x1e' (strikethrough)

Also clarify the comment: this function strips more than just colours.

18 months agosend RPL_LOGGEDIN to target_p upon ENCAP SU (#308)
Jess Porter [Fri, 23 Dec 2022 16:27:30 +0000 (16:27 +0000)] 
send RPL_LOGGEDIN to target_p upon ENCAP SU (#308)

18 months agoRemove the unused COMPRESSED flag and stats handler
JailBird [Thu, 22 Dec 2022 21:55:58 +0000 (15:55 -0600)] 
Remove the unused COMPRESSED flag and stats handler

- Null "compress" handler left as-is in newconf.c

19 months agoDon't crash on receiving GRANT from a server
Stephen Bennett [Sun, 20 Nov 2022 13:32:10 +0000 (13:32 +0000)] 
Don't crash on receiving GRANT from a server

19 months agossld: Remove unused zlib_ok variable
JailBird [Wed, 9 Nov 2022 23:53:25 +0000 (17:53 -0600)] 
ssld: Remove unused zlib_ok variable

19 months agoSET SPANNUM: Fix incorrect > 0 check to be >= 0
JailBird [Wed, 9 Nov 2022 23:50:33 +0000 (17:50 -0600)] 
SET SPANNUM: Fix incorrect > 0 check to be >= 0

19 months agoCHGHOST when only case changes (#384)
Jess Porter [Wed, 9 Nov 2022 23:33:07 +0000 (23:33 +0000)] 
CHGHOST when only case changes (#384)

19 months agotimeout_dead_authd_clients(): fix memory leak and order of operations (#385)
Aaron Jones [Sun, 6 Nov 2022 08:14:15 +0000 (08:14 +0000)] 
timeout_dead_authd_clients(): fix memory leak and order of operations (#385)

Ensure we deallocate the nodes created by the first loop, and zero out
the authd data after removing them from the authd clients dict.

The authd_abort_client() function already does the latter, so just call
that instead of authd_free_client().

19 months agoMake auto-accept on message conditional on oper:always_message, not oper:general...
Stephen Bennett [Thu, 3 Nov 2022 14:43:59 +0000 (14:43 +0000)] 
Make auto-accept on message conditional on oper:always_message, not oper:general. This updates the test to match current behaviour of +g

20 months agoNote that messages caught in +g/+G are discarded
Tobias Geerinckx-Rice [Sun, 23 Oct 2022 00:00:00 +0000 (02:00 +0200)] 
Note that messages caught in +g/+G are discarded

20 months agoircd.conf.example: reference.conf: fix invalid line wrapping
Doug Freed [Fri, 26 Aug 2022 20:39:36 +0000 (16:39 -0400)] 
ircd.conf.example: reference.conf: fix invalid line wrapping

20 months agoextensions/umode_hide_idle_time: mask times for hidden sources (#373)
Aaron Jones [Fri, 21 Oct 2022 08:01:41 +0000 (08:01 +0000)] 
extensions/umode_hide_idle_time: mask times for hidden sources (#373)

If the user performing a WHOIS has hidden their idle time (is umode +I),
also prevent them from seeing other user's idle times, even if said users
are not themselves umode +I.

Suggested-by: @Unit193
20 months agolibrb/helper: pass our fd limit to the child
Doug Freed [Fri, 21 Oct 2022 00:42:57 +0000 (20:42 -0400)] 
librb/helper: pass our fd limit to the child

Instead of arbitrarily limiting it to 256.  This avoids an issue with
busy authds "running out" of fds because librb says no more.

20 months agoUnify helper snotes and make netwide.
Unit 193 [Fri, 21 Oct 2022 06:47:15 +0000 (02:47 -0400)] 
Unify helper snotes and make netwide.

20 months agom_sasl: Remove implicit abort on registration
Ed Kellett [Sat, 16 Oct 2021 23:00:55 +0000 (00:00 +0100)] 
m_sasl: Remove implicit abort on registration

This doesn't make sense in a world where post-registration SASL is
allowed, and should fix one case of an annoying login desync that's seen
in the real world.

Specifically, when a client sends its final AUTHENTICATE and Atheme
receives it, it sends an SVSLOGIN for that client. If the client sends
us its CAP END *before* we see the SVSLOGIN, the implicit abort will try
to abort the SASL session that's already succeeded.

Atheme interprets this as an instruction to forget about the successful
SASL session; you'll connect unidentified. But it's already sent
SVSLOGIN, which will log the client in ircd-side, causing ircd and
services views to differ until the user authenticates again manually.

I think allowing a SASL session to be aborted when it has already
succeeded is an Atheme bug, and it can still be triggered without this
change. But our behaviour here seems silly anyway.

20 months agomake some authd warnings L_NETWIDE
Jess Porter [Mon, 3 Oct 2022 19:00:21 +0000 (20:00 +0100)] 
make some authd warnings L_NETWIDE

20 months agohelp/cmode: correct chm_regmsg help
Doug Freed [Sun, 2 Oct 2022 23:34:42 +0000 (19:34 -0400)] 
help/cmode: correct chm_regmsg help

20 months agochm_regmsg: fix typo in description
David Schultz [Sun, 2 Oct 2022 19:37:34 +0000 (14:37 -0500)] 
chm_regmsg: fix typo in description

20 months agoadd help for `chm_regmsg`
David Schultz [Sun, 2 Oct 2022 19:37:03 +0000 (14:37 -0500)] 
add help for `chm_regmsg`

20 months agoMake +R play nicely with +z
Stephen Bennett [Fri, 30 Sep 2022 07:29:02 +0000 (08:29 +0100)] 
Make +R play nicely with +z

20 months agoAdd semicolon to fix a compile error in librb/src/arc4random.c
hello-smile6 [Fri, 30 Sep 2022 17:27:26 +0000 (10:27 -0700)] 
Add semicolon to fix a compile error in librb/src/arc4random.c

21 months agoAdd oper:free_target (#374)
Jess Porter [Mon, 26 Sep 2022 18:50:11 +0000 (19:50 +0100)] 
Add oper:free_target (#374)

Co-authored-by: Ed Kellett <redacted>
21 months agoremove old reference to the unsupported directory
vulpine [Wed, 31 Aug 2022 01:29:12 +0000 (21:29 -0400)] 
remove old reference to the unsupported directory

the unsupported directory was removed by charybdis a while ago

21 months agoAdd umode +I to allow users to hide their idle time (#220)
David Schultz [Tue, 30 Aug 2022 20:49:43 +0000 (15:49 -0500)] 
Add umode +I to allow users to hide their idle time (#220)

22 months agoRemove missed Winsock2 check
jailbird777 [Fri, 26 Aug 2022 22:12:21 +0000 (17:12 -0500)] 
Remove missed Winsock2 check

22 months agoRemove ancient portability code (#361)
jailbird777 [Thu, 25 Aug 2022 00:53:52 +0000 (19:53 -0500)] 
Remove ancient portability code (#361)

Remove portability code for systems that don't follow at least SUSv3.
This fairly closely aligns with ISO C99, which solanum already requires.

22 months agoOpenSSL 3.0 compatibility
jailbird777 [Sat, 13 Aug 2022 03:40:48 +0000 (22:40 -0500)] 
OpenSSL 3.0 compatibility

Edited by @aaronmdjones:

- Correct some data types and casts

- Minor style fixups (e.g. we put * on the variable name not the type)

- librb/src/openssl.c:

  - Defer call of BIO_free(3ssl) to the end of the conditional block
    to avoid having calls to it in multiple paths

  - Check the return value of SSL_CTX_set0_tmp_dh_pkey(3ssl) because if
    it fails then we must use EVP_PKEY_free(3ssl) to avoid a memory leak

    This could fail if, for example, the user supplied DSA parameters
    in the DH parameters file instead.

- ircd/newconf.c:

  - Check whether OSSL_DECODER_CTX_new_for_pkey(3ssl) was able to parse
    the given CHALLANGE public key as a valid RSA public key, and then
    check whether OSSL_DECODER_from_bio(3ssl) actually loads it
    successfully

- ircd/s_newconf.c:

  - Use EVP_PKEY_free(3ssl) instead of OPENSSL_free(3ssl) on EVP_PKEY
    pointers; this will avoid inadvertent memory leaks if the EVP_PKEY
    structure contains any dynamically-allocated child members

- modules/m_challenge.c:

  - Unconditionally use EVP(3ssl) to generate the SHA-1 digest of the
    random challenge; this API has been around for a very long time and
    is available in all supported versions of OpenSSL

  - Add lots of error checking to all steps of the process

Tested against 1.1.1 and 3.0; both with missing and provided DH parameters
(which works as you'd expect; the server will not negotiate a DHE cipher
without them), and CHALLENGE, including missing keys or keys of the wrong
type (e.g. when you supply an EdDSA key instead of an RSA key).

This does break compatibility with OpenSSL 1.1.0 and below, which are now
all end-of-life and unsupported anyway.

Closes #357

22 months agom_stats: z: remove unnecessary casting and fix format strings
Doug Freed [Thu, 25 Aug 2022 00:23:49 +0000 (00:23 +0000)] 
m_stats: z: remove unnecessary casting and fix format strings

22 months agom_stats: z: restore total memory display
Doug Freed [Thu, 25 Aug 2022 00:23:32 +0000 (00:23 +0000)] 
m_stats: z: restore total memory display

22 months agolibrb/src/crypt.c: rb_sha*_crypt_r: avoid UB pointer math
Aaron Jones [Wed, 24 Aug 2022 23:51:14 +0000 (23:51 +0000)] 
librb/src/crypt.c: rb_sha*_crypt_r: avoid UB pointer math

This code is doing (foo - (char*)0) to convert foo from a pointer
value into a numeric value. Unfortunately, this is undefined
behaviour, which clang-14 is now warning about [1].

Cast to uintptr_t instead. Same result, but well-defined.

[1] cf. commit 0302f1532b66e9d09b70

22 months agoCI: Modernize
Doug Freed [Wed, 24 Aug 2022 23:14:24 +0000 (23:14 +0000)] 
CI: Modernize

22 months agoFix assert = hard assignments
jailbird777 [Tue, 16 Aug 2022 19:04:37 +0000 (14:04 -0500)] 
Fix assert = hard assignments

The spaces surrounding the = is bad syntax, which causes the shell to try to
execute 'assert'.

Granted, all of this is just cosmetic, as the only use of $assert seems to be
in the echo at the end of the configure run.

22 months agoFix SCTP support on FreeBSD & NetBSD
jailbird777 [Tue, 16 Aug 2022 00:03:49 +0000 (19:03 -0500)] 
Fix SCTP support on FreeBSD & NetBSD

Unlike Linux, Solaris, and Illumos (and probably others), the 2 BSDs that still
support SCTP didn't put SCTP into its own library, they put it into libc.

They, unlike Linux, don't set SOL_SCTP for us. The official method appears to
be calling getprotobyname("sctp") & endprotoent(), with getprotobyname()
returning a struct that has a p_proto entry. This all reads from
/etc/protocols. However, SCTP is assigned 132 by IANA, so it's 132 everywhere,
so I just set SOL_SCTP to 132 if it's not already set.

22 months agoum_regonlymsg: prevent unregistered users from NOTICEing +R users too
Doug Freed [Tue, 23 Aug 2022 12:04:03 +0000 (12:04 +0000)] 
um_regonlymsg: prevent unregistered users from NOTICEing +R users too

22 months agoEBMASK capab, to burst BMASK metadata (#354)
Jess Porter [Sat, 20 Aug 2022 00:35:54 +0000 (01:35 +0100)] 
EBMASK capab, to burst BMASK metadata (#354)

22 months agosend "End of burst" snote to L_NETWIDE (#356)
Jess Porter [Fri, 19 Aug 2022 02:17:05 +0000 (03:17 +0100)] 
send "End of burst" snote to L_NETWIDE (#356)

23 months agochm_regmsg: don't duplicate nick in 415
Doug Freed [Tue, 12 Jul 2022 02:46:00 +0000 (22:46 -0400)] 
chm_regmsg: don't duplicate nick in 415

sendto_one_numeric already includes the nick, so there's no need to
duplicate it. OFTC does not.

23 months agoserv_connect(): ensure both sa_bind[]/sa_connect[] are always populated (#352)
Aaron Jones [Tue, 5 Jul 2022 06:01:26 +0000 (06:01 +0000)] 
serv_connect(): ensure both sa_bind[]/sa_connect[] are always populated (#352)

Due to [1], linking with SCTP sometimes does not multi-home correctly.
This is triggered by the rand() on the lines immediately above these.

The connect{} blocks already support an `aftype` parameter to instruct
IRCd to prefer IPv4 or IPv6. This commit additionally ensures that the
other structure is always populated with the other address (if any) if
this parameter is specified.

This will allow SCTP server-linking users to work around the bug and
ensure that it always multi-homes by setting `connect::aftype` to IPv4.
Without this commit, that would cause Solanum to not include the IPv6
addresses (if any) in the connect block in its SCTP setup.

If there isn't a valid IP address in the other sockaddr, this should be
of no consequence, because it will not be used by rb_connect_tcp(), and
both rb_connect_sctp() and rb_sctp_bindx_only() already verify that
there is a valid IP address in the sockaddr before making use of it.

[1] https://marc.info/?l=linux-sctp&m=165684809726472&w=2

23 months agoCast time_t to long long when printing
Matthew Martin [Mon, 27 Jun 2022 17:04:33 +0000 (12:04 -0500)] 
Cast time_t to long long when printing

23 months agoglobal masktrace doesn't need to be an operspy action
Jess Porter [Thu, 30 Jun 2022 23:07:02 +0000 (00:07 +0100)] 
global masktrace doesn't need to be an operspy action

23 months agoERROR instead of NOTICE for failed WEBIRC
Jess Porter [Thu, 30 Jun 2022 23:02:53 +0000 (00:02 +0100)] 
ERROR instead of NOTICE for failed WEBIRC

23 months agorefuse opers setting an invalidly long k-line reason
Jess Porter [Thu, 30 Jun 2022 22:59:17 +0000 (23:59 +0100)] 
refuse opers setting an invalidly long k-line reason

23 months agoircd/listener: return a TLS record layer alert to D-Lined TLS clients
Aaron Jones [Sat, 22 Jan 2022 23:50:58 +0000 (23:50 +0000)] 
ircd/listener: return a TLS record layer alert to D-Lined TLS clients

23 months agochmode: Use original string when removing a mask
Matthew Martin [Tue, 28 Jun 2022 02:09:35 +0000 (21:09 -0500)] 
chmode: Use original string when removing a mask

2 years agoIllumos fixes
JailBird [Wed, 8 Jun 2022 22:35:58 +0000 (17:35 -0500)] 
Illumos fixes

- getexecname(3) returns const char *
- pid_t is long

2 years agoNormalize snprintf size to use sizeof where possible
Matthew Martin [Fri, 24 Jun 2022 04:40:02 +0000 (23:40 -0500)] 
Normalize snprintf size to use sizeof where possible

2 years agochmode: Fix snprintf size
Matthew Martin [Fri, 24 Jun 2022 04:38:52 +0000 (23:38 -0500)] 
chmode: Fix snprintf size

2 years agovalid_temp_time: more simplification and test fixes
Doug Freed [Mon, 20 Jun 2022 11:33:03 +0000 (11:33 +0000)] 
valid_temp_time: more simplification and test fixes

2 years agovalid_temp_time: simplify/correct overflow check
Ed Kellett [Sun, 19 Jun 2022 21:07:20 +0000 (22:07 +0100)] 
valid_temp_time: simplify/correct overflow check

the logic for trying to detect the maximum value of time_t was broken;
since we target a lower maximum time anyway, just use that for the
overflow check

2 years agodon't truncate operspy WHO
Jess Porter [Fri, 10 Jun 2022 17:15:56 +0000 (18:15 +0100)] 
don't truncate operspy WHO

2 years agoRemove stray semicolons (#339)
jailbird777 [Fri, 10 Jun 2022 17:07:25 +0000 (12:07 -0500)] 
Remove stray semicolons (#339)

2 years agoNormalize generation for reproducible builds
Bernhard M. Wiedemann [Fri, 27 May 2022 03:27:44 +0000 (05:27 +0200)] 
Normalize generation for reproducible builds

While working on reproducible builds for openSUSE, I found that
our package varied even when building in clean VMs
with as little non-determinism as possible.
This was because of

+++ solanum-0~ch560/ircd/version.c.last
@@ -25,7 +25,7 @@
 #include "serno.h"
 #include "stdinc.h"

-const char *generation = "6";
+const char *generation = "5";
 const char *creation = "1653004800";
 const char *ircd_version = PATCHLEVEL;
 const char *serno = SERNO;

2 years agoAdd description parameter to auth blocks (#327)
Eric Mertens [Thu, 14 Apr 2022 21:39:45 +0000 (14:39 -0700)] 
Add description parameter to auth blocks (#327)

2 years agoApply cmode C to replies (#328)
Eric Mertens [Thu, 14 Apr 2022 20:14:12 +0000 (13:14 -0700)] 
Apply cmode C to replies (#328)

2 years agoMake valid_temp_time overflow-resistant
Ed Kellett [Fri, 18 Mar 2022 18:13:31 +0000 (18:13 +0000)] 
Make valid_temp_time overflow-resistant

2 years agoTest some edge cases of valid_temp_time
Ed Kellett [Fri, 18 Mar 2022 18:13:24 +0000 (18:13 +0000)] 
Test some edge cases of valid_temp_time

2 years agoMake opers talking through +g controllable by user mode +M (#275)
Stephen Bennett [Tue, 12 Apr 2022 21:54:58 +0000 (22:54 +0100)] 
Make opers talking through +g controllable by user mode +M (#275)

Times out after 30 minutes, and adds oper:always_message privilege for
bots and services to always talk through +g