Commit graph

121 commits

Author SHA1 Message Date
Matthew Martin 5c01fc8bd7 Cast time_t to long long when printing 2022-07-01 03:43:36 -04:00
JailBird 62f6351d90 Illumos fixes
- getexecname(3) returns const char *
- pid_t is long
2022-06-29 20:28:11 -04:00
Eric Mertens 48a06ae3d7
Add description parameter to auth blocks (#327) 2022-04-14 14:39:45 -07:00
jailbird777 8f0c3422e7 Remove Windows support 2021-07-30 14:17:47 -04:00
Ariadne Conill 81531536aa
Remove ziplinks (#218) 2021-06-26 17:45:52 +01:00
Ed Kellett ce376a21cc Keep propagated bans in a dictionary, not a list 2021-06-08 21:57:43 +01:00
Ed Kellett 6485005214 Get rid of hub_mask/leaf_mask 2020-11-14 18:22:08 +00:00
Ed Kellett 8f0dd52ce7 Add /stats s to list secure blocks
`s` and `S` were both used for ssld stats, but only `S` was documented,
so I'm taking `s`. You can't stop me!
2020-11-09 00:26:56 +00:00
Ed Kellett 63ab1dd609 Add general::stats_l_oper_only 2020-11-08 19:38:19 +00:00
Ed Kellett f57d88bc71 Remove shared blocks 2020-11-01 04:20:44 +00:00
Eric Mertens 67ab06dd8a
Combine stats A output parameters (#35)
Every other use of RPL_STATSDEBUG follows the format: <letter> :<text>

This case appeared to slip through because it's two-word argument is encoded
in a single `->data` buffer.
2020-10-27 16:39:38 -07:00
Aaron Jones 9dd128b4da
Merge pull request #288 from edk0/umode-o-split
Split oper privs up a bit
2020-08-06 09:07:50 +00:00
Ed Kellett 7f7a433218
m_stats: Remove outdated comment 2020-08-04 22:58:31 +01:00
Ed Kellett b549e8e80d
m_stats: use oper:privs for /stats O 2020-08-04 22:58:30 +01:00
Ed Kellett 326ecd968b
m_stats: Rework privilege requirements
.need_oper is replaced with a generic mechanism for requiring any
privilege. need_admin remains because I think it's the least horrible
way to deal with oper:hidden_admin.

All need_oper requirements have been changed to oper:general
requirements.
2020-08-04 22:58:30 +01:00
Ed Kellett 9039ac0178
m_stats: use designated initializers 2020-08-04 22:58:30 +01:00
Ed Kellett 6d5be11fb1
Add oper:privs 2020-08-04 22:58:30 +01:00
Ed Kellett d4f7eb4ce6
Replace most checks for +o with oper:general
I'm preparing to PR a succession of privs changes with the ultimate goal
of severely limiting the scope of the binary oper/user dichotomy and
move conceptually distinct oper functions into their own privs.

Accomplishing this is a non-trivial task, and can wait, but it's
inconvenient now to have such functions enabled by the same mechanism
that grants any privs at all--so I'm moving all of them to a
transitional priv with the intention of eroding that later.
2020-08-04 22:58:30 +01:00
Ed Kellett 24652f2b95
m_stats: Make /stats l respect oper hiding
found by @jesopo
2020-08-03 01:23:54 +01:00
Ariadne Conill 3321eef45a ircd: rename DNSBL entries from blacklist to dnsbl_entry. 2020-07-05 21:20:31 -06:00
Ed Kellett e902e16974
m_stats: don't ratelimit with no server argument 2019-09-15 20:05:51 +01: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
Simon Arlott 6003ce763c
Add outgoing SCTP connect support 2017-08-24 20:08:21 +01:00
Simon Arlott 169a1c3535
msgbuf: s_assert is not a substitute for proper code
(dns, m_alias, m_stats updated as msgbuf no longer includes s_assert.h)
2017-07-26 19:30:41 +01:00
Simon Arlott d8f0b5d763
cppcheck: fix various warnings/errors
[ircd/match.c:316]: (error) Shifting a negative value is undefined behaviour
[librb/src/patricia.c:55]: (error) Shifting a negative value is undefined behaviour
[modules/m_alias.c:64]: (portability) '(void*)message' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[modules/m_time.c:111]: (warning) %u in format string (no. 9) requires 'unsigned int' but the argument type is 'signed int'.
[modules/m_time.c:111]: (warning) %u in format string (no. 10) requires 'unsigned int' but the argument type is 'signed int'.
[librb/src/dictionary.c:819]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'.
[librb/src/radixtree.c:1080]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'.
[ircd/s_user.c:351] -> [ircd/s_user.c:357]: (warning) Either the condition '0!=source_p' is redundant or there is possible null pointer dereference: source_p.
[extensions/ip_cloaking_3.0.c:109]: (warning, inconclusive) The buffer 'buf' may not be null-terminated after the call to strncpy().
[ircd/chmode.c:256]: (style) Clarify calculation precedence for '&' and '?'.
[modules/m_help.c:100]: (style) Clarify calculation precedence for '&' and '?'.
[modules/m_knock.c:169]: (style) Clarify calculation precedence for '&' and '?'.
[modules/m_stats.c:628]: (style) Clarify calculation precedence for '&' and '?'.
[modules/m_stats.c:727]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:601]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:704]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:739]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:763]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:768]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:774]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:781]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:786]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:791]: (style) Clarify calculation precedence for '&' and '?'.
[librb/src/radixtree.c:804]: (style) Clarify calculation precedence for '&' and '?'.
[ircd/wsproc.c:372]: (style) Unused variable: len
[modules/core/m_modules.c:382]: (style) Unused variable: i
[modules/m_stats.c:741]: (style) Unused variable: amsg
[ircd/authproc.c:390]: (style) Unused variable: iter
[ircd/authproc.c:391]: (style) Unused variable: client_p
2016-10-28 20:13:36 +01:00
Simon Arlott 896370cc3e
m_stats: don't try to access bl_stats if it doesn't exist 2016-04-30 13:18:48 +01:00
Simon Arlott 3085734104
m_stats: display certificate fingerprint in STATS C 2016-04-24 01:06:51 +01:00
Elizabeth Myers 5e9a3f8674
Change the way authd configures opm
It's a bit of a hack, but better than before. Rather than rehashing
(which could get us into an endless loop), we now segregate the
configuration phase (creating entries ircd-side in case we restart authd
later) and sending phases (when configure_authd() is called). Since we
have to call configure_authd() no matter what (to send timeouts etc.)
and we have to send this data to configure authd anyway, and sending
duplicate data is bad, this is the only way I can think of for now.
2016-04-12 09:36:09 -05:00
Elizabeth Myers 95b0324658 m_stats: use macros to clean up generating the stats table 2016-04-07 03:27:50 -05:00
Elizabeth Myers 0d7e4d311a m_stats: don't list alias entries twice. 2016-04-06 11:45:55 -05:00
Elizabeth Myers d3f6b80867 Replace s_auth/blacklist stuff with authd calls
This also does a lot of surgery on the conf system to reconfigure authd.

/!\ WARNING! ACHTUNG! ADVERTENCIA! ATTENTION! AVVERTIMENTO! /!\
This code has not been run-time tested yet (though it compiles)!
2016-03-28 02:11:16 -05:00
Elizabeth Myers 79435744c7 common.h: raison d'être is gone, so out it goes.
Fold whatever was left into ircd_defs.h
2016-03-23 09:33:56 -05:00
Elizabeth Myers 2fc6772ee1 typedef-ify rb_radixtree for consistency. 2016-03-23 08:32:22 -05:00
Elizabeth Myers 4177311e6e Change struct Dictionary(*) to rb_dictionary(_\1).
This cleans things up a slightly and puts the dictionary stuff in its
own namespace.
2016-03-23 08:09:58 -05:00
Elizabeth Myers 56f84dedf7 DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH
This is in librb and therefore should be prefixed.
2016-03-23 07:45:44 -05:00
Matt Ullman e23126c83b Cleanup warnings 2016-03-21 22:28:41 -04:00
William Pitcock 2d77d121a3 m_stats: win32 fixes 2016-03-20 02:19:36 -05:00
Elizabeth Myers 788e2d592c m_stats: eliminate special casing of calling the stats L handler. 2016-03-09 17:19:16 -06:00
Mantas Mikulėnas 6f39a80ec6 authd, m_stats: fix command table sizes
There are 256 possible byte values.
2016-03-09 18:15:42 +02:00
Elizabeth Myers 3c7d6fcce7 Message handlers should return void.
Also fix up some return values and stuff to use bool (or void if
nothing). I just did it whilst I was here.

According to jilles, the return value used to signify whether or not the
client had exited. This was error-prone and was fixed a long, long time
ago, but the return value was left int for historical reasons.

Since the return type is not used (and has no clear use case anyway),
it's safe to just get rid of it.
2016-03-09 01:37:03 -06:00
Elizabeth Myers eeabf33a7c Move module description headers to the top
This is cleaner.

Note this was broken out of a much larger piece of work I did, so if
there's any problems, I apologise!
2016-03-09 01:29:41 -06:00
Elizabeth Myers 963c3faa43 m_stats: kill O(n) lookup on stats. 2016-03-08 04:38:42 -06:00
Elizabeth Myers 55799c6b4d dns: prune worthless function. 2016-03-08 03:25:21 -06:00
Elizabeth Myers 8a26cd1973 dns: clean up awful hacks.
We now have a resolver cache which we init on startup.
2016-03-08 03:22:25 -06:00
Elizabeth Myers 394b8dde17 authd: allow querying the list of DNS servers.
This was an asston of pain, and it still feels "dirty" as it introduces
an async call where there normally wouldn't be one. Better
implementation more than welcome.
2016-03-08 02:53:25 -06:00
Andrew Wilcox 3abc337fe1 modules: Add AV2 descriptions to all m_s* modules 2016-03-07 02:05:28 -06:00
Elizabeth Myers 105a4985b4 Migrate remaining modules to AV2
No descriptions yet. :(
2016-03-07 00:03:39 -06:00
Elizabeth Myers a4bf26dd34 Move irc_* data structures to librb.
This makes the base ircd less cluttered up with data structures that can
go elsewhere.
2016-03-06 14:17:19 -06:00
Elizabeth Myers cbeab4bc34 Remove $Id tags from everything.
These are obsolete and none have changed since 10 years gao...
2016-03-06 02:47:27 -06:00
Elizabeth Myers e8f1c19e7b parse: get rid of report_messages
It is a function with a single usage, that is used only for one specific
stats command on one line.
2016-03-05 00:55:33 -06:00