1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00
Commit Graph

6450 Commits

Author SHA1 Message Date
Travis McArthur acaef2a4d3 Enable tests for OS X builds 2018-04-28 20:35:44 -07:00
Travis McArthur 83be1571ef Install correct gems on OS X environments 2018-04-28 20:01:02 -07:00
Travis McArthur 49394ed346 Update run-tests 2018-04-28 19:23:02 -07:00
Bram Matthys 04b3dd24f8 Set default ECDH(E) curves to be X25519:secp521r1:secp384r1:prime256v1 with
the following remarks:
* We only set these curves if SSL_CTX_set1_curves_list() is available
  (OpenSSL 1.0.2 or later, LibreSSL 2.5.1 or later)
* The X25519 curve is only added if it is available (OpenSSL 1.1.0+)
2018-04-27 20:08:47 +02:00
Bram Matthys fa9bdcd7df Move detection of SSL_CTX_set1_curves_list to autoconf (CHECK_SSL_CTX_SET1_CURVES_LIST) 2018-04-27 19:27:19 +02:00
Bram Matthys 3809168992 Improve comments in source code to better explain what's going on.
..and so nobody makes the same mistake.
2018-04-27 18:10:17 +02:00
Bram Matthys a6a4196af9 Add set::ssl::ecdh-curve so you can force one or more ECDH(E) curves.
This requires OpenSSL 1.0.2 or newer (released on 22 Jan 2015).
Also fix a bug with OpenSSL 1.1.0+ where - due to removal of an API
function - we accidentally forced curve P-256 rather than automatic
selection. That sucks because the automatic selection (since 1.0.2+)
allows supporting multiple curves and selecting the highest one.
2018-04-27 17:59:53 +02:00
Bram Matthys 3ea67268fc Travis-CI: OS X: try to make system-curl work 2018-04-26 15:17:09 +02:00
Bram Matthys df19b65a78 Travis-CI: system-cares + system-curl test wasn't run properly
because only the first argument was passed to the select-config script.
Also add 'set -x' in select-config for easier debugging.
2018-04-26 12:47:12 +02:00
Bram Matthys 66b2a036d8 Travis-CI: Of course, OS X doesn't have 'ldd' *sigh* 2018-04-26 10:58:16 +02:00
Bram Matthys 94c718dc3d Travis-CI: show 'ldd' output in build logs 2018-04-26 10:36:23 +02:00
Bram Matthys def588917a Travis-CI OS X improvements:
* Enable system curl, system c-ares and local curl tests
* Disable IRC test framework for now
2018-04-26 09:52:30 +02:00
Bram Matthys 40b0a5a9b2 Travis-CI: OS X build test attempt 101 2018-04-26 09:17:11 +02:00
Bram Matthys f615b6fa54 Travis-CI: more adjustments for OSX 2018-04-25 21:55:08 +02:00
Bram Matthys 64367d5d4c OSX: try find right packages to run test framework 2018-04-25 21:40:57 +02:00
Bram Matthys 568a808dbe temporarily disable -Werror to see OS X warnings 2018-04-25 21:21:13 +02:00
Bram Matthys d1d87d4d42 Apparently you need to use -Wl,-rpath,xx and not -Wl,-rpath=xx. Fix OSX compile problem? 2018-04-25 21:09:01 +02:00
Bram Matthys 7fe86ac1d8 Travis-CI: Show config.log on failure to trace osx build issue 2018-04-25 20:57:31 +02:00
Bram Matthys 3a97bc29da Fix bug 2 due to code cleanup yesterday... 2018-04-23 08:50:34 +02:00
Bram Matthys c342b432d1 OpenSSL detection: also check /usr/local/opt/openssl 2018-04-22 20:01:50 +02:00
Bram Matthys 34ae2cb0db OS X build-test: +brew install openssl 2018-04-22 19:49:43 +02:00
Bram Matthys 47e2975f01 Fix crash number 1 due to latest changes (TOPIC). 2018-04-22 19:38:29 +02:00
Bram Matthys 52b785cf4e Let's build (and fail) OS X via Travis-CI. 2018-04-22 18:58:41 +02:00
Bram Matthys 47bfcf7587 -Wno-format-zero-length 2018-04-22 18:58:30 +02:00
Bram Matthys d8c6201fbb Enable -Werror (via --enable-werror) in build tests 2018-04-22 18:36:49 +02:00
Bram Matthys 821a0464c7 Add --with-werror to enable -Werror 2018-04-22 18:35:50 +02:00
Bram Matthys 31409b19a5 Removed useless/unused * (pointer dereference) in increment 2018-04-22 18:06:10 +02:00
Bram Matthys 255223b308 -Wno-invalid-source-encoding:
+dnl This is purely for charsys.c... I like it so we can easily read
+dnl this for non-utf8. We can remove it once we ditch non-utf8 some day
+dnl of course, or decide to ignore me and encode them.
2018-04-22 17:44:11 +02:00
Bram Matthys ecf260dfc2 Only use -Wl,-export-dynamic while linking unrealircd or modules. 2018-04-22 17:36:04 +02:00
Bram Matthys 1c2da25573 Handle return value for truncate() - only for debugging anyway.. 2018-04-22 17:35:36 +02:00
Bram Matthys 33db0bf73e Get rid of a number of clang warnings. 2018-04-22 17:06:31 +02:00
Bram Matthys f535860670 Make check for -fno-strict-aliasing / -Wno-pointer-sign work with clang. 2018-04-22 16:50:51 +02:00
Bram Matthys 9e2f16db9e warn_unused was a good idea once, but doing more harm than good at this point.
Too many useless warnings and no easy way to ignore the result.
2018-04-22 16:11:27 +02:00
Bram Matthys 992bed3c7a Similar to previous commit, change: alter HOOKTYPE_MODE_DEOP function:
-int hooktype_mode_deop(aClient *sptr, aClient *victim, aChannel *chptr, u_int what, char modechar, long my_access, char **badmode);
+int hooktype_mode_deop(aClient *sptr, aClient *victim, aChannel *chptr, u_int what, int modechar, long my_access, char **badmode);
.. this to get rid of a compiler warning and potential problem.
2018-04-22 16:09:10 +02:00
Bram Matthys 4f0f8478cc Update HOOKTYPE_CHANNEL_SYNCED to get rid of compiler warning.
Can't safely use shorts with variable argument functions I think,
or maybe only with reduced type checking which is not what we want.
-void hooktype_channel_synced(aChannel *chptr, unsigned short merge, unsigned short removetheirs, unsigned short nomode);
+void hooktype_channel_synced(aChannel *chptr, int merge, int removetheirs, int nomode);
2018-04-22 16:02:13 +02:00
Bram Matthys bb4758f321 Add strldup() and safestrldup(), reducing ridiculous amount of code in
m_pass and m_topic.c when duplicating strings with a length limit.
+/* strldup(str,max) copies a string and ensures the new buffer
+ * is at most 'max' size, including nul byte. The syntax is pretty
+ * much identical to strlcpy() except that the buffer is newly
+ * allocated.
+ * If you wonder why not use strndup() instead?
+ * I feel that mixing code with strlcpy() and strndup() would be
+ * rather confusing since strlcpy() assumes buffer size including
+ * the nul byte and strndup() assumes without the nul byte and
+ * will write one character extra. Hence this strldup(). -- Syzop
+ */
2018-04-22 15:40:21 +02:00
Bram Matthys 6990b7d9a6 Mass-replace MyMalloc with MyMallocEx, even if it's unnecessary.
Replace century-old custom functions with C standard funcs,
such as AllocCpy -> strdup.
2018-04-22 14:55:07 +02:00
Bram Matthys 61f40a59a7 Remove unused events.h 2018-04-22 14:36:21 +02:00
Bram Matthys 9a1a4f13a4 Remove sjoin.h (was included but contents were unused) 2018-04-22 14:32:28 +02:00
Bram Matthys d5d446c38d More code cleanups to get rid of useless casts and other useless
structures such as:
-       lp->value.cp = (char *)MyMalloc(strlen(mask) + 1);
-       (void)strcpy(lp->value.cp, mask);
+       lp->value.cp = strdup(mask);
2018-04-22 14:28:22 +02:00
Bram Matthys 680715b1b5 Partially rewrite send_channel_modes() (+helper functions).
Although this is only used by servers lacking SJOIN/SJOIN3 so
is of limited use. Still.. got rid of the most ridiculous casts.
2018-04-22 13:51:37 +02:00
Bram Matthys 147ae3012b Get rid of about a million (now) useless casts and some re-indenting. 2018-04-22 10:29:36 +02:00
Bram Matthys 8d7d6d7c4c Get rid of compiler warning 2018-04-22 09:50:13 +02:00
Bram Matthys 6ef9a83c97 Surely this can use the generic #include "unrealircd.h" instead?
Avoids sendto_realops() warning.
2018-04-22 09:48:12 +02:00
Bram Matthys 5044013dd5 Make m_ircops use RPL_TEXT rather than conflicting numeric.
The output of /IRCOPS isn't meant to be client parsable anyway (which
can be seen by the use of bold text and such), so using a generic
numeric rather than wasting two others seems sensible.
Reported by The_Myth in #5066.
2018-04-22 09:42:14 +02:00
Bram Matthys a7bcb637b7 Fix small memory leak if not passing the weak cipher config test (DES/3DES..)
Reported by Sky-Dancer (#5078).
2018-04-22 09:37:06 +02:00
Bram Matthys a235b35633 This code can be a lot simpler, duh. Reported by Sky-Dancer (#5078). 2018-04-22 09:35:05 +02:00
Bram Matthys 04ca88cc1e Fix bug in blacklist module with multiple replies for the same IP.
We only parsed the first A record reply, so if the blacklist returned
multiple results /and/ you would not have all those types in your
blacklist { } block then you could miss a hit (false negative).
2018-04-22 09:04:14 +02:00
Bram Matthys ad9ca5e449 Add support for checking IPv6 addresses in blacklists.
Suggested by k4be (#5040).
2018-04-22 08:30:02 +02:00
Bram Matthys 9b1a79a191 And again a Windows compile fix (hm how did this happen.. :D) 2018-04-21 20:35:54 +02:00