]>
jfr.im git - irc/UndernetIRC/iauthd-c.git/log
Michael Poole [Sun, 30 Apr 2023 12:38:55 +0000 (08:38 -0400)]
distclean: Remove unit-tests.log
This makes "make distcleancheck" pass.
Michael Poole [Sun, 30 Apr 2023 12:34:26 +0000 (08:34 -0400)]
iauthd-c 1.0.5
Michael Poole [Sun, 12 Mar 2023 23:43:00 +0000 (19:43 -0400)]
Use pkg-config to check for libevent
This simplifies configuration when it is in an "odd" location,
such as when homebrew installs it.
Michael Poole [Thu, 23 Feb 2023 02:13:54 +0000 (21:13 -0500)]
Support building on Darwin
Michael Poole [Sun, 3 Oct 2021 16:02:11 +0000 (12:02 -0400)]
Revert "Update autoconfigury for current autoconf"
This reverts commit
bc6f30728540745dd6b878a671b26a95752e5de6 .
OpenBSD ports still uses autoconf 2.69, which does not support
AC_CHECK_INCLUDES_DEFAULT().
Michael Poole [Sun, 12 Sep 2021 17:51:04 +0000 (13:51 -0400)]
Explicitly list transitively required modules
Alpine Linux 3(.14.2) uses musl libc, which does not support lazy
binding[1]. Our usual use of module_depends() requires lazy binding to
work neatly; there is no POSIX standard way to change the platform's
equivalent of LD_LIBRARY_PATH at runtime.
[1]- https://wiki.musl-libc.org/functional-differences-from-glibc.html#Lazy-bindings
Michael Poole [Sun, 12 Sep 2021 16:21:28 +0000 (12:21 -0400)]
Ensure strlcpy() gets declared
FreeBSD 12.1 only declares strlcpy() if __BSD_VISIBLE is 1, which is
set by sys/cdefs.h only when _POSIX_C_SOURCE is *not* defined.
Michael Poole [Sun, 12 Sep 2021 15:53:58 +0000 (11:53 -0400)]
Update path of unit testing config file
Fixes: 90a80713441cd62264a1158f47bbf3c001689283
"tests: Add IAuth unit test; rename unit test .conf file"
Michael Poole [Sun, 12 Sep 2021 15:51:57 +0000 (11:51 -0400)]
Update autoconfigury for current autoconf
Michael Poole [Thu, 1 Apr 2021 13:11:51 +0000 (09:11 -0400)]
Drone checks should use soft holds, not hard holds
Michael Poole [Mon, 15 Mar 2021 00:11:00 +0000 (20:11 -0400)]
code-coverage.sh: Convert mostly to Perl
It was too hard to extend the shell scripting approach to check the output
from iauthd-c, so do it in Perl instead.
Michael Poole [Fri, 26 Mar 2021 14:24:47 +0000 (10:24 -0400)]
iauth: Add diagnostic logs to help debugging
Michael Poole [Thu, 25 Mar 2021 02:24:16 +0000 (22:24 -0400)]
config: Properly replace objects on type change
Michael Poole [Wed, 24 Mar 2021 23:46:05 +0000 (19:46 -0400)]
iauth.h: Add missing word in comment
Michael Poole [Wed, 24 Mar 2021 23:45:32 +0000 (19:45 -0400)]
iauth_xquery: Fix ref counting for MORE challenge/response
Michael Poole [Wed, 24 Mar 2021 23:37:55 +0000 (19:37 -0400)]
Greatly revise "Improve handling of non-final replies"
That was commit
413e5622e4326fb5221d98d87248f8b2371f2b1d . The
previous logic was almost right, except that:
- we need to update the reference counting after we validate the input,
so that malformed lines do no affect the reference counts;
- we still need to remove hard holds for drone checks; and
- iauth_check_request() needs to run after the reference count updates.
Michael Poole [Wed, 24 Mar 2021 18:53:27 +0000 (14:53 -0400)]
iauth_xquery: Do not send login-type XQUERYs without a recognized password
Michael Poole [Wed, 24 Mar 2021 19:49:08 +0000 (15:49 -0400)]
iauth_xquery: Correctly ignore unsolicited xreply messages
Michael Poole [Wed, 24 Mar 2021 19:29:40 +0000 (15:29 -0400)]
iauth_xquery: Convert drone checks into hard holds
Michael Poole [Sun, 14 Mar 2021 13:04:33 +0000 (09:04 -0400)]
Initial commit of code coverage script
Michael Poole [Sun, 14 Mar 2021 17:34:09 +0000 (13:34 -0400)]
iauth_xquery: Improve handling of non-final replies like AGAIN/MORE
Michael Poole [Sun, 14 Mar 2021 17:33:35 +0000 (13:33 -0400)]
iauth_xquery: Explain statistics table at its start
Michael Poole [Sun, 14 Mar 2021 17:31:30 +0000 (13:31 -0400)]
irc_pton: Always fail for patterns like a::b:*
That alternative is to parse that just like "a::b" with trailing text,
which seems prone to surprisign behavior.
Michael Poole [Sun, 14 Mar 2021 15:59:25 +0000 (11:59 -0400)]
tests: Add IAuth unit test; rename unit test .conf file
Michael Poole [Sun, 14 Mar 2021 15:27:50 +0000 (11:27 -0400)]
iauth_class: Fix formatting of intervals
Michael Poole [Sun, 14 Mar 2021 15:27:12 +0000 (11:27 -0400)]
iauth_class: Fix trust_username implementation
Michael Poole [Sun, 14 Mar 2021 15:18:43 +0000 (11:18 -0400)]
iauth_core: Report in-use and stale IAuth requests in statistics
Michael Poole [Sun, 14 Mar 2021 15:06:05 +0000 (11:06 -0400)]
iauth_core: Only allocate req->timeout for non-zero timeouts
Michael Poole [Sun, 14 Mar 2021 15:05:39 +0000 (11:05 -0400)]
tests_config: Improve coverage of source module
Michael Poole [Sun, 14 Mar 2021 14:33:19 +0000 (10:33 -0400)]
config: Avoid use-after-free of removed config nodes
Michael Poole [Sun, 14 Mar 2021 14:32:46 +0000 (10:32 -0400)]
config: Do not leak libevent addrinfos
Michael Poole [Sun, 14 Mar 2021 14:30:38 +0000 (10:30 -0400)]
iauth_xquery: Handle shorter strings
Michael Poole [Sun, 14 Mar 2021 14:30:08 +0000 (10:30 -0400)]
iauth_xquery: Handle removed services in iauth_xreply_ok()
Michael Poole [Sun, 14 Mar 2021 13:07:43 +0000 (09:07 -0400)]
iauth_class: Implement "hostname" rule
Michael Poole [Sun, 14 Mar 2021 13:06:07 +0000 (09:06 -0400)]
Use strncmp() rather than memcmp() for strings
Apparently, memcmp(A, B, N) requires N bytes to be valid in both A and B,
and we are not guaranteed that in these cases.
Michael Poole [Sun, 7 Mar 2021 14:08:48 +0000 (09:08 -0500)]
iauth_core: Update description of routing format
Michael Poole [Sun, 7 Mar 2021 14:08:21 +0000 (09:08 -0500)]
iauth_core: EOF on stdin should be a clean exit
Michael Poole [Sun, 7 Mar 2021 03:44:17 +0000 (22:44 -0500)]
iauth_read: Minor bug fixes
Ignore blank lines.
When we get a line we don't recognize, try to read another line rather than
bailing out to the event loop.
Michael Poole [Sat, 6 Mar 2021 22:14:02 +0000 (17:14 -0500)]
Improve code coverage from "make check" (slightly)
Michael Poole [Sat, 6 Mar 2021 22:12:18 +0000 (17:12 -0500)]
tests: is(NULL, NULL, explanation) should pass
Michael Poole [Sat, 6 Mar 2021 22:11:21 +0000 (17:11 -0500)]
main: Avoid null derefs on early exits
event_free(NULL) faults, but we have some early exits before allocating
these two signal-based events.
Michael Poole [Sat, 6 Mar 2021 21:45:08 +0000 (16:45 -0500)]
README: Update URL for libevent
Michael Poole [Sat, 6 Mar 2021 21:44:01 +0000 (16:44 -0500)]
Replace sar with evdns calls
libevent2 adds the missing features we wanted from sar, so only use it.
For some reason, doing this made the standard library more picky about
which extensions it defined, so update configure.ac, compat.h and main.c
to handle those changes.
Michael Poole [Sat, 6 Mar 2021 21:40:58 +0000 (16:40 -0500)]
module: Unconditionally unload shared libraries
STAY_LOADED was to help valgrind generate sensible call stacks, but it now
has --keep-debuginfo=yes as a proper way to do that.
Michael Poole [Sat, 6 Mar 2021 21:40:06 +0000 (16:40 -0500)]
Fix memory leaks in "make check"
Michael Poole [Sat, 6 Mar 2021 21:39:50 +0000 (16:39 -0500)]
tests: Update for libevent2 too
The last commit accidentally broke "make check".
Michael Poole [Sat, 6 Mar 2021 17:40:32 +0000 (12:40 -0500)]
Convert to libevent2 APIs
Michael Poole [Fri, 5 Mar 2021 23:27:55 +0000 (18:27 -0500)]
sar: Fix skipping over pointers in answers
In the unlikely event that the query had multiple names, and one of the
later names included a pointer, the previous code would probably
enter an infinite loop.
Michael Poole [Sun, 22 Nov 2020 20:19:53 +0000 (15:19 -0500)]
sar: Fix memory leak of cname.
Michael Poole [Fri, 24 Apr 2020 01:36:49 +0000 (21:36 -0400)]
tests: Add more tests to improve coverage
Michael Poole [Fri, 24 Apr 2020 01:35:46 +0000 (21:35 -0400)]
config: Improve error detection for conf_parse_interval.
Michael Poole [Fri, 24 Apr 2020 01:17:01 +0000 (21:17 -0400)]
config: Support semicolons after lists of bare tokens.
Michael Poole [Fri, 24 Apr 2020 01:16:22 +0000 (21:16 -0400)]
config: Save first string in a list of bare tokens.
Michael Poole [Fri, 24 Apr 2020 01:16:02 +0000 (21:16 -0400)]
config: Fix support for C-style comments
Michael Poole [Fri, 24 Apr 2020 01:04:49 +0000 (21:04 -0400)]
config: Improve handling of errors from the standard I/O library
Michael Poole [Fri, 24 Apr 2020 01:04:24 +0000 (21:04 -0400)]
main: Make sure we get error messages from config loading.
Michael Poole [Thu, 23 Apr 2020 23:15:11 +0000 (19:15 -0400)]
iauth_core: Be more defensive about commands with -1 prefixes
Michael Poole [Thu, 23 Apr 2020 23:14:30 +0000 (19:14 -0400)]
log_parse_type_sevset: Add some switch fallthrough comments.
Michael Poole [Thu, 23 Apr 2020 23:14:10 +0000 (19:14 -0400)]
log_vmessage: Improve code clarity for type == NULL.
Michael Poole [Thu, 23 Apr 2020 23:13:37 +0000 (19:13 -0400)]
src: Add missing va_end() calls.
Michael Poole [Thu, 23 Apr 2020 23:13:11 +0000 (19:13 -0400)]
iauth_xquery: Fix upper bound on a strncpy().
Michael Poole [Thu, 23 Apr 2020 23:11:47 +0000 (19:11 -0400)]
configure.ac: Remove reference to never-set LIBEVENT_CFLAGS.
Michael Poole [Thu, 23 Apr 2020 23:11:28 +0000 (19:11 -0400)]
set: Fix ordering when using set_compare_int()
Michael Poole [Sun, 15 Mar 2020 13:57:15 +0000 (09:57 -0400)]
Convert more indentation to spaces
Michael Poole [Mon, 16 Dec 2019 01:26:44 +0000 (20:26 -0500)]
iauth_core: Support "? stats2".
Michael Poole [Mon, 16 Dec 2019 01:18:00 +0000 (20:18 -0500)]
iauth_core: Fix typo in first line of statistics
Michael Poole [Sun, 8 Dec 2019 13:19:33 +0000 (08:19 -0500)]
iauthd-c 1.0.4
Michael Poole [Sun, 8 Dec 2019 13:33:00 +0000 (08:33 -0500)]
iauth_xquery: Fix warnings from GCC 8+
strncpy() should usually be strncpy(x, ..., sizeof x) because it will write
up to N bytes, including the terminating NUL(s). However, GCC 8 also warns
on strncpy(..., y, N) when y is char[L] if N < L, so we need to tweak the
third strncpy() a bit and add an extra byte to username[].
Michael Poole [Sun, 8 Dec 2019 13:18:12 +0000 (08:18 -0500)]
Convert indentation to spaces
Michael Poole [Sat, 21 Sep 2019 11:48:56 +0000 (07:48 -0400)]
tests: Add test_set unit test for splay tree code
Michael Poole [Wed, 11 Sep 2019 02:17:03 +0000 (22:17 -0400)]
tests/iauthd-c.conf: Work around apparent musl or Alpine bug
"make check" would fail on Alpine 3.10.2 with "missing test plan", which
was caused by dlopen() not loading test_sar.so because it had some
unresolved symbols (such as test_is) that should be provided by tests.so.
There was not an obvious reason that dlopen() would effectively ignore
the RTLD_LAZY flag, so use this as a workaround.
Michael Poole [Sun, 23 Jun 2019 01:37:13 +0000 (21:37 -0400)]
iauth_xquery: Add some memory allocation statistics.
Michael Poole [Sun, 23 Jun 2019 01:36:53 +0000 (21:36 -0400)]
iauth_core: Add some memory allocation statistics.
Michael Poole [Sun, 23 Jun 2019 01:36:36 +0000 (21:36 -0400)]
main: Consistently call_exit_funcs() on exit.
Michael Poole [Sun, 23 Jun 2019 01:35:39 +0000 (21:35 -0400)]
iauth_xquery: Free iauth_xquery_services on module unload.
Michael Poole [Sun, 23 Jun 2019 01:33:18 +0000 (21:33 -0400)]
iauth_core: Fix argument passed to set_remove().
Michael Poole [Sun, 23 Jun 2019 01:32:56 +0000 (21:32 -0400)]
set: Add "no_dispose" parameter to set_clear().
Michael Poole [Sun, 23 Jun 2019 01:30:50 +0000 (21:30 -0400)]
iauth_core: Repeat ourselves less often.
Michael Poole [Sun, 23 Jun 2019 01:30:24 +0000 (21:30 -0400)]
vector.h: Make (lack of) spacing before \ in macro consistent.
Michael Poole [Sun, 23 Jun 2019 01:29:20 +0000 (21:29 -0400)]
module: Actually update the "rdepends" field.
Michael Poole [Sun, 23 Jun 2019 01:28:28 +0000 (21:28 -0400)]
iauth_core: Free the iauth_in object from libevent.
Michael Poole [Sun, 23 Jun 2019 01:27:44 +0000 (21:27 -0400)]
iauth_class: Fix leaks of "account" and "xreply_ok" fields.
Michael Poole [Sun, 7 Apr 2019 01:07:42 +0000 (21:07 -0400)]
iauth_core: Send the right command for a new statistics report.
Michael Poole [Sun, 7 Apr 2019 01:07:22 +0000 (21:07 -0400)]
iauth_class: Actually increment iauth_class_rule.assigned.
Michael Poole [Sun, 7 Apr 2019 01:06:56 +0000 (21:06 -0400)]
iauth_class: Tidy up the statistics report.
Michael Poole [Sat, 6 Apr 2019 01:09:41 +0000 (21:09 -0400)]
iauthd-c 1.0.3
Michael Poole [Sat, 6 Apr 2019 01:08:42 +0000 (21:08 -0400)]
iauth_core: Convert iauth_module node to owning module correctly.
Michael Poole [Tue, 19 Mar 2019 01:40:00 +0000 (21:40 -0400)]
Fix the value of MODULESDIR.
Michael Poole [Sun, 17 Mar 2019 18:16:26 +0000 (14:16 -0400)]
iauthd-c 1.0.2
Michael Poole [Sat, 16 Mar 2019 03:02:56 +0000 (23:02 -0400)]
iauth_class: Fix trust_username.
Michael Poole [Sat, 16 Mar 2019 03:02:39 +0000 (23:02 -0400)]
iauth_core: Do not call iauth_check_request() for an already-set bit.
This prevents (attempted) infinite recursion when the client is being
accepted or soft-done, and an iauth module calls one of these functions.
Michael Poole [Sat, 16 Mar 2019 00:10:41 +0000 (20:10 -0400)]
iauth_class: Add "trust_username" option for classes.
Michael Poole [Tue, 26 Feb 2019 01:01:13 +0000 (20:01 -0500)]
Makefile.am: Create LOGDIR at install time.
Michael Poole [Mon, 25 Feb 2019 01:22:09 +0000 (20:22 -0500)]
iauth_core: Support ? command to trigger config or stats report.
Always report config at program startup.
Prefix version report with :.
Michael Poole [Mon, 18 Feb 2019 00:25:53 +0000 (19:25 -0500)]
iauth_xquery: Do not prefix ~ to a cli_username that starts with ~.
Michael Poole [Sun, 17 Feb 2019 22:56:53 +0000 (17:56 -0500)]
iauth_xquery: Make sure we properly terminate username.
Michael Poole [Wed, 13 Feb 2019 12:40:56 +0000 (07:40 -0500)]
Do not require git to support the -C command-line option.
Michael Poole [Wed, 13 Feb 2019 03:21:01 +0000 (22:21 -0500)]
iauth_core: Remove trailing carriage return from stdin if we get one.
Michael Poole [Wed, 14 Mar 2018 00:16:07 +0000 (20:16 -0400)]
iauth_class: Update comment about "address" config field.
Michael Poole [Wed, 14 Mar 2018 00:15:51 +0000 (20:15 -0400)]
iauth_core: Stop expecting class in 'H' message.
We probably shouldn't be copying the ircd's proposed connection class
anyway, and ircu is going to stop sending it.