0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-01 03:18:54 +01:00
Commit graph

2563 commits

Author SHA1 Message Date
William Pitcock
9d5170247e msgbuf: attach capabilities mask to each tag for sending
this will be used with a bloom filter to speed up the 1-to-many case
2016-02-11 19:50:47 -06:00
William Pitcock
7b20f46ed3 Merge pull request #146 from lp0/fix-sqlite-unixRandomness-read-20160211
bandb: sqlite3: check read() return value
2016-02-11 16:13:34 -06:00
William Pitcock
5f8919a9c3 Merge pull request #145 from lp0/fix-ssld-fmt-warnings-20160211
ssld: fix format string warnings for statistics
2016-02-11 16:13:20 -06:00
Simon Arlott
20b940a99c
bandb: sqlite3: check read() return value 2016-02-11 22:08:37 +00:00
Simon Arlott
26b83fa09d
ssld: fix format string warnings for statistics
Cast the uint64_t format arguments to unsigned long long as
that's what the format string specifies.
2016-02-11 21:58:44 +00:00
William Pitcock
08006c16f8 msgbuf: do a better job of handling gotchas with parsing tags 2016-02-10 21:16:28 -06:00
William Pitcock
c84003aeb5 ssld: we use uint8_t for IPC buffers, not char 2016-02-10 21:03:09 -06:00
William Pitcock
a1125230f3 libratbox: time_t can be 64-bit, so use labs() 2016-02-10 21:02:56 -06:00
William Pitcock
ca45daba73 extensions: add m_echotags extension to echo back your tags in NOTICE form 2016-02-10 21:00:27 -06:00
William Pitcock
428ca87b01 modules: chase MsgBuf API change 2016-02-10 20:54:17 -06:00
William Pitcock
760bafdac3 extensions: update for API change 2016-02-10 20:14:22 -06:00
William Pitcock
4a84a763cd ircd: change MessageHandler to include a MsgBuf pointer at the front for tag access 2016-02-10 20:13:44 -06:00
Simon Arlott
8ace0906ad libratbox: event: continually adjust ish event times
When events are scheduled to run at a random +/- 1/3rd of the specified
frequency it can vary considerably for the longer timers (particularly
try_connections), so adjust the frequency to a different random interval
of the original frequency every time the event runs.
2016-02-10 19:03:31 -06:00
Simon Arlott
eb1b303d56 ircd: support restarting ssld processes
Add REHASH SSLD (admins only) that starts new sslds and marks the
existing ones as inactive until all their clients disconnect.

Very useful whenever the SSL library has a vulnerability because
new connections can use a new version of the library without
disconnecting existing clients/servers.

Add STATS S (admins only) to list ssld processes, status, and client
count.
2016-02-10 19:03:30 -06:00
William Pitcock
dea27a087c Merge pull request #144 from lp0/handle-which_ssld_failure-start_ssld_connect-accept-20160210
ircd: Handle which_ssld failure
2016-02-10 18:54:05 -06:00
Simon Arlott
5e270e7d89
ircd: Handle which_ssld failure
It's possible for which_ssld to fail and return NULL, handle this in
start_ssld_connect and start_ssld_accept by returning NULL. The NULL
return value is already handled in all calls to start_ssld_accept,
so handle this for start_ssld_connect by reporting an error connecting.

Handle it in start_zlib_session by exiting the client.
2016-02-10 22:45:38 +00:00
Simon Arlott
b9ff4868a9
ircd: add missing rb_free in start_zlib_session 2016-02-10 22:45:35 +00:00
William Pitcock
6d01fdc791 Merge pull request #137 from lp0/fix-ssld-change_connid-20160207
ssld: change_connid may be called with an unknown ID
2016-02-10 15:54:43 -06:00
William Pitcock
45d128bc10 Merge pull request #142 from lp0/fix-random_socket-20160210
authd: fix link failure in random_socket
2016-02-10 15:53:27 -06:00
Simon Arlott
3f6cbacc41
authd: fix link failure in random_socket
The random_socket function isn't used, and the code can only be
compiled if the function is optimised away (because it's static
and unused) otherwise it will fail to link when "ipv4_addr" and
"ipv6_addr" are not found.

Fix this by modifying ipv4_addr and ipv6_addr so that they're not
external variables.
2016-02-10 21:29:41 +00:00
Simon Arlott
7beaee5239
ssld: change_connid may be called with an unknown ID
If change_connid is called with an unknown ID, conn will be
NULL, check this with an assert and then respond by reporting
the new ID as closed instead of dereferencing a NULL pointer.
2016-02-10 21:22:50 +00:00
William Pitcock
1579e155b1 parse: further cleanups 2016-02-10 10:25:16 -06:00
William Pitcock
20dd3725b8 parse: fix aliases 2016-02-10 10:09:42 -06:00
William Pitcock
269dd686b3 msgbuf: improve parse logic 2016-02-10 00:46:32 -06:00
William Pitcock
4d03595da4 parse: utilise MsgBuf to simplify message parsing 2016-02-10 00:22:37 -06:00
William Pitcock
a8e69f5dfc msgbuf: implement msgbuf_parse() 2016-02-10 00:08:58 -06:00
William Pitcock
88b427b61d msgbuf: add lowlevel interface for building MsgBuf objects 2016-02-09 23:19:13 -06:00
William Pitcock
b830b64106 include: add msgbuf.h for future msgbuf api 2016-02-09 23:08:35 -06:00
William Pitcock
de50a480af Remove unused .depend files. 2016-02-09 23:08:35 -06:00
William Pitcock
5512416070 Merge pull request #140 from viatsko/remove-snprintf
Remove libratbox's snprintf.c, update related ircd code
2016-02-09 21:58:07 -06:00
Valerii Iatsko
5203cba5ce Remove libratbox's snprintf.c, update related ircd code 2016-02-10 02:25:32 +01:00
Valerii Iatsko
e44504ebf1 Add .travis.yml 2016-02-10 00:00:30 +01:00
William Pitcock
55d5f7970a ircd: various memory leak fixes from pull requests 2016-02-09 10:53:24 -06:00
Simon Arlott
87c44482d0 ircd: chmode: Avoid referencing beyond the end of the flags_list array in set_channel_mode
We're setting flags to flags_list[3] at the end of the loop, but the
array only has 3 elements. Unless the compiler optimises this away
(because flags will not be used again) we're accessing memory beyond
the end of the array.

With gcc-4.9:
chmode.c: In function 'set_channel_mode':
chmode.c:1548:54: warning: iteration 2u invokes undefined behavior [-Waggressive-loop-optimizations]
  for(j = 0, flags = flags_list[0]; j < 3; j++, flags = flags_list[j])
                                                      ^
chmode.c:1548:2: note: containing loop
  for(j = 0, flags = flags_list[0]; j < 3; j++, flags = flags_list[j])

Explicitly set "flags = flags_list[j]" at the start of each loop
iteration, which will avoid referencing off the end of the array.
2016-02-09 10:41:37 -06:00
Simon Arlott
41aed6bbf7 libratbox: define UINT16_MAX
UINT16_MAX may not be defined on some ancient hosts (FreeBSD 4.8)

It's used by libratbox/src/tools.c
2016-02-09 10:41:37 -06:00
Valerii Iatsko
32c3cbd857 Update .gitignore 2016-02-09 10:41:37 -06:00
Valerii Iatsko
9258de810b ircd: configure: require C99 compiler 2016-02-09 10:41:37 -06:00
Valerii Iatsko
b79edd3e79 ircd: configure.ac: remove trailing whitespaces 2016-02-09 10:41:37 -06:00
Valerii Iatsko
6755009c17 Run autoconf 2016-02-09 10:41:37 -06:00
Simon Arlott
173a2f4dda configure: make TOPICLEN warn on >390, not >=390
Configuring --with-topiclen=390 outputs a warning that TOPICLEN
has been limited to 390, but that's what was requested.
2016-02-09 10:41:37 -06:00
Simon Arlott
d5ef3fd3b6 autoconf: Quote AC_LANG_PROGRAM when used within AC_*_IFELSE
AC_LANG_PROGRAM needs to be quoted when used within AC_*_IFELSE:
https://lists.gnu.org/archive/html/bug-autoconf/2011-04/msg00017.html

This fixes the following warnings:

$ autoreconf
configure.ac:298: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.ac:298: the top level
configure.ac:593: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
configure.ac:593: the top level
...
configure.ac:309: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.ac:309: the top level
...
2016-02-09 10:41:37 -06:00
Valerii Iatsko
84b49742ad ssld: fix memleak
same as r29199 ircd-ratbox:
free zlib_stream_t with the rest of the conn_t
2016-02-09 10:41:36 -06:00
Valerii Iatsko
8f89a66d2a Update .gitignore 2016-02-09 10:41:36 -06:00
Valerii Iatsko
de596e1948 CREDITS: updated my nickname and email 2016-02-09 10:41:36 -06:00
Valerii Iatsko
c56f5979aa Fixed compilation w/ gnutls v3 2016-02-09 10:41:36 -06:00
William Pitcock
c4e9deaef9 extensions: add chm_insecure, which has the opposite effect of chm_sslonly.
This module makes SSL required to join any channels except for ones specifically marked insecure.
It is meant to be used in a migration path away from plaintext IRC.
2016-01-29 22:26:41 -05:00
William Pitcock
35f284c2bd ircd: newconf: impose a deprecation warning for plaintext listeners 2016-01-29 11:35:05 -05:00
William Pitcock
f7036bbe6f libratbox: gnutls: add gnutls 3.4 support (closes #123) 2016-01-24 14:51:57 -05:00
William Pitcock
46277ee2e2 remove TODO, outdated like whoa 2016-01-23 14:55:06 -05:00
William Pitcock
41976628bd README: being the reference ircv3.1 implementation seems boring in 2016. 2016-01-23 14:52:57 -05:00