]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Tue, 14 Apr 2020 01:34:42 +0000 (20:34 -0500)]
radius: Don't need file/line for fr_assert_fail anymore
Arran Cudbard-Bell [Tue, 14 Apr 2020 01:11:27 +0000 (20:11 -0500)]
Don't need fake expr
Arran Cudbard-Bell [Tue, 14 Apr 2020 01:04:33 +0000 (20:04 -0500)]
event: Better to make it an assert
Arran Cudbard-Bell [Tue, 14 Apr 2020 01:03:48 +0000 (20:03 -0500)]
Missing header
Arran Cudbard-Bell [Tue, 14 Apr 2020 00:57:59 +0000 (19:57 -0500)]
More compiler issues
Arran Cudbard-Bell [Tue, 14 Apr 2020 00:48:00 +0000 (19:48 -0500)]
Define macros for NDEBUG
Arran Cudbard-Bell [Tue, 14 Apr 2020 00:45:30 +0000 (19:45 -0500)]
Quiet compiler
Arran Cudbard-Bell [Mon, 13 Apr 2020 22:57:27 +0000 (17:57 -0500)]
Remove all calls to exit() and _Exit() except where hey're absolutely necessary
Arran Cudbard-Bell [Mon, 13 Apr 2020 21:57:58 +0000 (16:57 -0500)]
Fixup assert macros
# Conflicts:
# src/lib/unlang/tmpl.c
Alan T. DeKok [Mon, 13 Apr 2020 21:52:49 +0000 (17:52 -0400)]
minor clean ups and bug fixes so that it works
Alan T. DeKok [Mon, 13 Apr 2020 21:50:08 +0000 (17:50 -0400)]
kevent() will return an error if the process has already exited
so we just call waitpid() to reap its status
Alan T. DeKok [Mon, 13 Apr 2020 21:32:29 +0000 (17:32 -0400)]
return the child_fd to the caller
because fr_exec_child() doesn't do it
Alan T. DeKok [Mon, 13 Apr 2020 21:32:13 +0000 (17:32 -0400)]
it helps to wait for the child...
Alan T. DeKok [Mon, 13 Apr 2020 20:38:05 +0000 (16:38 -0400)]
add unlang_module_yield_to_tmpl()
Alan T. DeKok [Mon, 13 Apr 2020 15:15:57 +0000 (11:15 -0400)]
cleanups and simplifications
Alan T. DeKok [Mon, 13 Apr 2020 14:43:36 +0000 (10:43 -0400)]
turn the output buffer into an output value box
and allow exec-wait without an output FD
Disconnect3d [Mon, 13 Apr 2020 14:45:14 +0000 (16:45 +0200)]
Fix rlm_cache_ sanity check for crazy people (#3370)
This PR fixes an incorrect size argument passed to `strncmp` which resulted in smaller prefix matching than intended.
Alan T. DeKok [Mon, 13 Apr 2020 13:11:25 +0000 (09:11 -0400)]
use kevent to wait for the PID
it should all be working. Next is to add tests
Alan T. DeKok [Mon, 13 Apr 2020 12:09:29 +0000 (08:09 -0400)]
more framework for exec-wait
we still need to use kqueue to wait for the child PID. But the
basic parts of the framework are now here.
Alan T. DeKok [Mon, 13 Apr 2020 11:51:47 +0000 (07:51 -0400)]
add fr_exec_waitpid()
so that child processes will be cleaned up if we do exec-wait,
but there's an error.
Alan T. DeKok [Mon, 13 Apr 2020 00:16:28 +0000 (20:16 -0400)]
start of framework for exec-wait
with reading the output.
And some "todo" notes for the future.
Alan T. DeKok [Mon, 13 Apr 2020 00:12:25 +0000 (20:12 -0400)]
exec-wait API using new methods
Alan T. DeKok [Sun, 12 Apr 2020 23:22:02 +0000 (19:22 -0400)]
fix typo
Alan T. DeKok [Sun, 12 Apr 2020 22:11:28 +0000 (18:11 -0400)]
stupid OSX leaks memory on fork(). Let's ignore it.
Alan T. DeKok [Sun, 12 Apr 2020 22:09:12 +0000 (18:09 -0400)]
check for tainted flag on first argument
Alan T. DeKok [Sun, 12 Apr 2020 21:51:58 +0000 (17:51 -0400)]
precompile TMPL_TYPE_EXEC in unlang
into vpt->tmpl_xlat
Update tmpl_verify to allow this.
In preparation for having precompiled xlat's everywhere.
Alan T. DeKok [Sun, 12 Apr 2020 19:55:57 +0000 (15:55 -0400)]
preparation for signal handlers
Alan T. DeKok [Sun, 12 Apr 2020 18:06:40 +0000 (14:06 -0400)]
minor cleanups
Alan T. DeKok [Sun, 12 Apr 2020 12:49:37 +0000 (08:49 -0400)]
allow modules to push async calls onto the stack
i.e. triggers. Which are fire and forget, but which also need
to do async expansions.
Alan T. DeKok [Sun, 12 Apr 2020 12:27:08 +0000 (08:27 -0400)]
don't exit on full stack
instead just cancel the request
Arran Cudbard-Bell [Sat, 11 Apr 2020 17:18:35 +0000 (12:18 -0500)]
rlm_radius: Fail the first message not the last message
Arran Cudbard-Bell [Sat, 11 Apr 2020 17:11:29 +0000 (12:11 -0500)]
rlm_radius - Remove function names, not needed anymore
There's a logging mode which prints log lines that'd be better to use
Arran Cudbard-Bell [Sat, 11 Apr 2020 05:22:58 +0000 (00:22 -0500)]
Always reset repetitions counter
Arran Cudbard-Bell [Sat, 11 Apr 2020 05:21:43 +0000 (00:21 -0500)]
log: Fix repetition check
Arran Cudbard-Bell [Sat, 11 Apr 2020 05:11:14 +0000 (00:11 -0500)]
rlm_radius: Free packets before retransmission
Arran Cudbard-Bell [Sat, 11 Apr 2020 01:01:00 +0000 (20:01 -0500)]
radius_udp: Simplify cancellation function
Arran Cudbard-Bell [Sat, 11 Apr 2020 01:00:41 +0000 (20:00 -0500)]
trunk: More documentation
Jorge Pereira [Sat, 11 Apr 2020 00:43:55 +0000 (21:43 -0300)]
test: lets test the 'radsniff -a' (#3367)
It will prevent to detect issues with pcap.c API used to fetch and list
all network interfaces.
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:28:49 +0000 (18:28 -0500)]
rlm_radius: Add conn_release callback and cleanup release logic
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:12:04 +0000 (18:12 -0500)]
track: Enable "free by ctx"
Arran Cudbard-Bell [Fri, 10 Apr 2020 23:01:13 +0000 (18:01 -0500)]
trunk: Add callback that is called any time a request is remove from a connection
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:16:38 +0000 (16:16 -0500)]
Typo
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:09:35 +0000 (16:09 -0500)]
trunk: Do tconn assignment earlier
Arran Cudbard-Bell [Fri, 10 Apr 2020 21:00:18 +0000 (16:00 -0500)]
trunk: Zero out log entry structs
Arran Cudbard-Bell [Fri, 10 Apr 2020 20:29:30 +0000 (15:29 -0500)]
Typo
Alan T. DeKok [Fri, 10 Apr 2020 20:22:11 +0000 (16:22 -0400)]
clean up and allow async xlat's to work again
Alan T. DeKok [Fri, 10 Apr 2020 18:32:40 +0000 (14:32 -0400)]
disable this for a day until we finish the async tmpl expansion
Arran Cudbard-Bell [Fri, 10 Apr 2020 18:15:15 +0000 (13:15 -0500)]
pcap: Fix multiple issues with fr_pcap_device_names - Closes #3363
- Strip trailing separation char correctly.
- Don't over allocate string buffer
- Don't use snprintf (it's slow).
- Don't use is_truncated... For some reason it doesn't work correctly here.
Arran Cudbard-Bell [Fri, 10 Apr 2020 17:43:12 +0000 (12:43 -0500)]
trunk: Record info about the tconn the request is assigned to
Jorge Pereira [Fri, 10 Apr 2020 17:06:22 +0000 (14:06 -0300)]
rlm_radius: Fix potential double-free (#3366)
Alan T. DeKok [Fri, 10 Apr 2020 15:03:12 +0000 (11:03 -0400)]
%{1} is async-safe
Alan T. DeKok [Fri, 10 Apr 2020 14:51:35 +0000 (10:51 -0400)]
make `foo` work again in the config files
this isn't strictly necessary and should probably be deleted.
But for now, it's a simple way to test UNLANG_TYPE_TMPL and
the async exec functionality
Alan T. DeKok [Fri, 10 Apr 2020 14:30:51 +0000 (10:30 -0400)]
set our async_safe value, based on the childs value
Alan T. DeKok [Fri, 10 Apr 2020 14:30:26 +0000 (10:30 -0400)]
UNLANG_TYPE_TMPL is allowed to yield
Alan T. DeKok [Fri, 10 Apr 2020 14:30:01 +0000 (10:30 -0400)]
walk over the list of child xlat nodes, too
Alan T. DeKok [Fri, 10 Apr 2020 12:56:30 +0000 (08:56 -0400)]
warning fixes
Alan T. DeKok [Fri, 10 Apr 2020 12:44:34 +0000 (08:44 -0400)]
remove UNLANG_TYPE_XLAT_INLINE and replace with UNLANG_TYPE_TMPL
which has the same functionality, but will also allow for async
template expansions.
Alan T. DeKok [Thu, 9 Apr 2020 21:28:28 +0000 (17:28 -0400)]
start of code for async template evaluation
Alan T. DeKok [Thu, 9 Apr 2020 20:28:26 +0000 (16:28 -0400)]
add more 'const'
we shouldn't be modifying instructions as they are being interpreted.
they're essentially static after the server starts.
Jorge Pereira [Thu, 9 Apr 2020 22:28:18 +0000 (19:28 -0300)]
radsniff: Check if fr_radius_init() started with success (#3362)
Arran Cudbard-Bell [Thu, 9 Apr 2020 20:21:29 +0000 (15:21 -0500)]
radius_udp: Skip free ID allocations
Arran Cudbard-Bell [Thu, 9 Apr 2020 19:20:37 +0000 (14:20 -0500)]
trunk/radius: Print out detailed state log
Arran Cudbard-Bell [Thu, 9 Apr 2020 19:20:15 +0000 (14:20 -0500)]
request: Record where allocation occurred
James Jones [Wed, 8 Apr 2020 16:41:00 +0000 (11:41 -0500)]
Generalize the "hack" in dhcpv4_encode_xlat()
Add three functions:
- fr_cursor_filter_head()
- fr_cursor_filter_next()
- fr_cursor_filter_current()
to let one select items for which an "evaluation function" passed
the item and a context value returns true.
Alan T. DeKok [Thu, 9 Apr 2020 18:30:27 +0000 (14:30 -0400)]
add and expose fr_exec_nowait()
which is much simpler than the previous code.
Alan T. DeKok [Thu, 9 Apr 2020 18:17:43 +0000 (14:17 -0400)]
add and expose fr_value_box_list_flatten_argv()
which takes a list of value box groups (e.g. from xlat_eval)
and turns them into an argv-style array
Alan T. DeKok [Thu, 9 Apr 2020 18:15:49 +0000 (14:15 -0400)]
constify things that don't modify their inputs
Alan T. DeKok [Thu, 9 Apr 2020 17:57:20 +0000 (13:57 -0400)]
add and expose tmpl_async_required()
Alan T. DeKok [Thu, 9 Apr 2020 17:52:01 +0000 (13:52 -0400)]
add and expose xlat_async_required()
Arran Cudbard-Bell [Thu, 9 Apr 2020 17:22:43 +0000 (12:22 -0500)]
break string across lines
Arran Cudbard-Bell [Thu, 9 Apr 2020 17:22:35 +0000 (12:22 -0500)]
radius_track: Non-debug version shouldn't have file/line
Alan T. DeKok [Thu, 9 Apr 2020 12:29:59 +0000 (08:29 -0400)]
rework so CHILD_GROUP is no longer necessary
Alan T. DeKok [Thu, 9 Apr 2020 11:59:47 +0000 (07:59 -0400)]
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:12:52 +0000 (22:12 -0500)]
return something
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:09:58 +0000 (22:09 -0500)]
track: We still probably want this check for non-debug builds
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:07:01 +0000 (22:07 -0500)]
schedule: Fix debug messages for workers
Arran Cudbard-Bell [Thu, 9 Apr 2020 03:04:32 +0000 (22:04 -0500)]
trunk: Remove asserts limiting states we can enter the failed state from
Arran Cudbard-Bell [Thu, 9 Apr 2020 02:36:10 +0000 (21:36 -0500)]
connection: Allow nested signal pausing, and prevent duplicates
trunk: Pause connection signal delivery in more places
Arran Cudbard-Bell [Thu, 9 Apr 2020 02:34:28 +0000 (21:34 -0500)]
track: Disallow double allocations
Arran Cudbard-Bell [Thu, 9 Apr 2020 01:17:52 +0000 (20:17 -0500)]
radius: Add check for treq being freed without releasing its tracking entry
Arran Cudbard-Bell [Wed, 8 Apr 2020 23:40:30 +0000 (18:40 -0500)]
probably not a valid assert given the way the rest of the public API works
Arran Cudbard-Bell [Wed, 8 Apr 2020 23:38:28 +0000 (18:38 -0500)]
trunk: Assert if we attempt to requeue a request in an invalid state
Alan T. DeKok [Wed, 8 Apr 2020 21:31:02 +0000 (17:31 -0400)]
fixup evaluation of XLAT_CHILD nodes
put the result into state->rhead
on resume, merge that result into the parent group
Alan T. DeKok [Wed, 8 Apr 2020 21:30:11 +0000 (17:30 -0400)]
parent string value from value_box we just created
Jorge Pereira [Wed, 8 Apr 2020 21:19:17 +0000 (18:19 -0300)]
Fix memory leak in radsniff (#3359)
We should call pcap_freealldevs() always after pcap_findalldevs()
Alan T. DeKok [Wed, 8 Apr 2020 20:58:48 +0000 (16:58 -0400)]
add async_exec method for testing async execs
not done, and mostly for debugging the framework. Will be
extended as the framework is fixed.
Alan T. DeKok [Wed, 8 Apr 2020 20:26:50 +0000 (16:26 -0400)]
fix typo
Alan T. DeKok [Wed, 8 Apr 2020 20:19:16 +0000 (16:19 -0400)]
allow things like --foo=%{bar}
for argv expansion.
Alan T. DeKok [Wed, 8 Apr 2020 20:18:16 +0000 (16:18 -0400)]
stop on "p == end", too
Alan T. DeKok [Wed, 8 Apr 2020 19:58:38 +0000 (15:58 -0400)]
terminate string
Alan T. DeKok [Wed, 8 Apr 2020 19:25:07 +0000 (15:25 -0400)]
forbid duplicate sections
Arran Cudbard-Bell [Wed, 8 Apr 2020 18:04:06 +0000 (13:04 -0500)]
rlm_radius: better assert
Arran Cudbard-Bell [Wed, 8 Apr 2020 17:59:49 +0000 (12:59 -0500)]
rlm_radius: Assert if we still have tracking entries when the connection is being closed
Alan T. DeKok [Wed, 8 Apr 2020 17:38:44 +0000 (13:38 -0400)]
more debug messages
Alan T. DeKok [Wed, 8 Apr 2020 16:47:35 +0000 (12:47 -0400)]
return "read error" when we're done reading
which then ensures that the sockets are closed.
Alan T. DeKok [Wed, 8 Apr 2020 16:40:13 +0000 (12:40 -0400)]
a blocked worker is now a non-fatal error.
The network side just tries another worker. And if all workers
are blocked, it suspends all network reads.
Then when a worker replies, it unsuspends the network IO
Alan T. DeKok [Wed, 8 Apr 2020 15:56:01 +0000 (11:56 -0400)]
pass "inlen" to the various functions
which mostly just pass it along to the functions they call,
and don't check it as much as they should. But it's needed for
later work.
Arran Cudbard-Bell [Wed, 8 Apr 2020 16:27:26 +0000 (11:27 -0500)]
scheduler: Don't need to destroy the network mutliple times
fr_network_exit now destroys the network too.
Calling it again on line 666 results in use-after-free issues with the message set.
Arran Cudbard-Bell [Wed, 8 Apr 2020 16:14:47 +0000 (11:14 -0500)]
network: Pop messages before signalling workers to exit
Alan T. DeKok [Wed, 8 Apr 2020 15:01:35 +0000 (11:01 -0400)]
fix problems introduced in commit
3e7e6970
u->code != code. They are different variables with different
meanings.