Commit graph

3540 commits

Author SHA1 Message Date
Simon Arlott b55caab91e
travis: Ignore more unused warnings 2019-09-15 10:44:05 +01:00
Simon Arlott b3a987ed15
ircd: Use a larger buffer for ilog() buf2 2019-09-15 10:41:33 +01:00
Simon Arlott 6769ac13a2
travis: Ignore unused-parameter warnings 2019-09-15 10:26:35 +01:00
Simon Arlott c4c1bf3b79
librb: Fix GCC 8 warning; 640 bytes should be enough 2019-09-15 10:25:25 +01:00
Simon Arlott e89a399f94
ircd: Zero out the global_client_list
Otherwise we unconditionally add "me" to it twice in some unit tests,
which results in a loop in the list.
2019-09-15 10:22:26 +01:00
Simon Arlott 0e5b57c40b
travis: Build with GCC 7 and GCC 8 2019-09-15 10:02:11 +01:00
Simon Arlott bcd241da68
Fix compiler warning for SeesOper 2019-09-15 10:00:56 +01:00
Simon Arlott 004007982a
travis: Compile with warnings as errors 2019-09-15 09:57:45 +01:00
Aaron Jones 2f2a26fe9d
Merge pull request #283 from edk0/grant
m_grant improvements
2019-09-14 23:39:40 +00:00
Ed Kellett f7cc54c1ba
Add help for GRANT 2019-09-15 00:35:55 +01:00
Ed Kellett b143f5e3bd
m_grant: match "deoper" case-insensitively 2019-09-15 00:35:55 +01:00
Ed Kellett ebd0f4db7a
m_grant: remove a confusing line 2019-09-15 00:35:55 +01:00
Ed Kellett 7f373431d0
m_grant: use AV2 2019-09-15 00:35:55 +01:00
Ed Kellett 910f883959
m_grant: propagate privset changes 2019-09-15 00:35:55 +01:00
Ed Kellett bdc87b5f37
m_grant: maintain privilegeset refcounts 2019-09-15 00:35:55 +01:00
Ed Kellett 6119faa9a0
charybdise m_grant 2019-09-15 00:35:55 +01:00
Ed Kellett c1649fd04d
Use the m_grant from ircd-seven
Charybdis' rewritten m_grant introduces at least one serious bug without
providing any apparent benefit. I think the best solution here is the
easiest one.

The bug in question is that an empty mode change is triggered after
seven's grant has done its work, and this is necessary in order to
give umodes granted by oper privileges a chance to update. The rewrite
removes this, generating a mode change only if it wants to change the
state of +o, which means the grant victim can keep privileged modes they
no longer have access to, or fail to gain new ones.
2019-09-15 00:35:55 +01:00
Aaron Jones 8b7503c89a
Merge pull request #284 from edk0/drain
Add extensions/drain (port from ircd-seven)
2019-09-14 21:21:38 +00:00
Janik Kleinhoff a0d1df9f38
extensions/drain: remove superfluous includes 2019-09-14 21:13:11 +01:00
Ed Kellett b674a619eb
Add extensions/drain
This takes the simplest possible approach: load the module and you're in
drain mode.
2019-09-14 21:13:11 +01:00
Aaron Jones b9da417b4e
Merge pull request #282 from edk0/propagate-oper
Propagate OPER
2019-09-13 12:15:06 +00:00
Ed Kellett ed3ca2ff16
Propagate OPER
Move opername and privset storage to struct User, so it can exist for
remote opers.

On /oper and when bursting opers, send:

    :foo OPER opername privset

which sets foo's opername and privset. The contents of the privset on
remote servers come from the remote server's config, so the potential
for confusion exists if these do not match.

If an oper's privset does not exist on a server that sees it, it will
complain, but create a placeholder privset. If the privset is created by
a rehash, this will be reflected properly.

/privs is udpated to take an optional argument, the server to query, and
is now local by default:

    /privs [[nick_or_server] nick]
2019-09-13 10:08:27 +01:00
Aaron Jones 742ddc8fac
Merge pull request #279 from edk0/operhide
Rework oper hiding
2019-09-12 22:17:26 +00:00
Ed Kellett 1123eefcb0
Rework oper hiding
As it stands, oper hiding is rather messy and inconsistent. Add
SeesOper(target, source), which is true iff target should appear as an
oper to source. If I haven't missed something, all commands that reveal
oper status now use the same logic.

general::hide_opers_in_whois is a special case, and affects /whois only.

general::hide_opers is introduced, and has the same effect as giving
everyone oper:hidden. All commands that reveal oper status respect both.
2019-09-12 23:14:15 +01:00
Aaron Jones f7f1c50494
Support ECDH X25519 for TLSv1.3 (OpenSSL 1.1.1) 2019-09-08 14:00:24 +00:00
Aaron Jones 95c84a44fd
Merge pull request #277 from edk0/helpops
Fix various bugs in extensions/helpops
2019-09-07 14:57:30 +00:00
Aaron Jones a9118e5b81
Merge pull request #278 from edk0/override
Fix various bugs in extensions/override
2019-09-07 14:26:01 +00:00
Aaron Jones d6c8286e3e
Merge pull request #275 from edk0/override-immunity
override: move kick immunity to its own module
2019-09-07 14:10:22 +00:00
Aaron Jones 84a969d686
Merge pull request #276 from edk0/deferred-cap-notify
Deferred capability notifications from modules
2019-09-07 14:08:19 +00:00
Ed Kellett dbeda234e6
override: always check oper:override
It's possible to have the oper:override privilege removed by /grant.
/grant triggers an empty umode change event to allow privileged umodes
to be set or removed, so checking for oper:override on all umode changes
(and not just ones where +o or +p is changed) allows us to remove +p
when necessary.
2019-09-07 15:06:39 +01:00
Ed Kellett 6637a54728
override: don't leak the old expiry timer list 2019-09-07 15:06:39 +01:00
Ed Kellett cc75db3f3f
override: start timers for +p clients on modinit
Reloading override previously would have the effect of cancelling +p
expiry. With this change, reloading the module just refreshes the
timers, so expiry is delayed a bit rather than forgotten entirely.
2019-09-07 15:06:39 +01:00
Ed Kellett 5339043003
helpops: remove +H if usermode:helpops is lost 2019-09-07 15:04:05 +01:00
Ed Kellett 0c5dd86cfc
helpops: handle the helper list properly on reload
Free the whole list on unload rather than leaking it, and initialise it
to the list of people with +H on load.
2019-09-07 15:04:05 +01:00
Ed Kellett 6c639159b0
helpops: fix umode handling
construct_umodebuf() can change the char->flag mapping (to restore an
orphaned mode). I don't love the use of a fake constant, so I think the
cleanest solution here is just to index user_modes with a macro for the
umode letter.
2019-09-07 15:04:05 +01:00
Ed Kellett 28cc8bb924
Deferred capability notifications from modules
Reloading modules sends CAP DEL followed by an immediate CAP NEW:

    :staberinde.local CAP * DEL :account-tag
    :staberinde.local CAP * NEW :account-tag

This isn't very nice. /modrestart is particularly bad. In order to avoid
doing this, we remember the capability set at the beginning of module
operations, compare that with the set afterwards, and report only the
differences with CAP {DEL,NEW}.
2019-09-07 14:59:33 +01:00
Aaron Jones 515b54ddf9
Merge pull request #274 from edk0/event-deletion
librb/event: delete indirectly via a dead flag
2019-09-07 13:56:17 +00:00
Ed Kellett ead77e93aa
override: move kick immunity to its own module 2019-09-07 14:53:21 +01:00
Ed Kellett 3576d1b482
librb/event: delete indirectly via a dead flag
This avoids an issue where deleting an event inside the handler of a
different event puts the event iteration in an invalid state.
2019-09-07 14:50:42 +01:00
Simon Arlott 9ac0390734
Version 4.1.3-dev 2019-08-31 21:14:27 +01:00
Simon Arlott efe1f312b5
Version 4.1.2 2019-08-31 21:12:44 +01:00
Simon Arlott 728c3ed5cb
travis: don't run the tests on macosx
overriding rb_gettimeofday and "me" doesn't work
2019-08-31 16:41:18 +01:00
Simon Arlott ac4365f5a4
ircd: remove debug 2019-08-31 16:36:41 +01:00
Simon Arlott eeeb228664
cap_server_time: Fix strftime return value check 2019-08-31 16:35:19 +01:00
Simon Arlott 493f729efc
tests: Fix use-after-free bug 2019-08-31 16:32:55 +01:00
Simon Arlott 17809d2db7
librb: Fix type of dst for rb_inet_pton_sock() 2019-08-31 16:10:50 +01:00
Simon Arlott 8b96670079
tests: Remove modules that don't exist 2019-08-31 15:38:48 +01:00
Simon Arlott a006add93c
check_one_kline: Fix compiler warning 2019-08-31 15:31:45 +01:00
Simon Arlott c6e707ae76
Merge branch 'edk0-check-one-kline' 2019-08-31 15:05:29 +01:00
Simon Arlott b18dba6da8
Document the process shared by check_one_kline() and find_kline() 2019-08-31 15:05:20 +01:00