]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:28:47 +0000 (09:28 -0600)]
Test the redis cache module
Alan T. DeKok [Thu, 2 Dec 2021 16:25:46 +0000 (11:25 -0500)]
Revert "tests use certs from src/tests/certs, not raddb/certs"
This reverts commit
5f6bcbfffae48f896e50ebb3f9cdffa529f0e9b1 .
until such time as the docker images are updated to use these
tests
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:29:02 +0000 (09:29 -0600)]
Provide more information about what expired
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:19:19 +0000 (09:19 -0600)]
Strings need to be copied to the to_cast box first
Arran Cudbard-Bell [Thu, 2 Dec 2021 07:32:00 +0000 (01:32 -0600)]
Don't expect a prefix in tuples coming back from redis
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:30:51 +0000 (09:30 -0600)]
Difference between Linux and macos?
Arran Cudbard-Bell [Thu, 2 Dec 2021 05:48:38 +0000 (23:48 -0600)]
Add taint and untaint xlats
Alan T. DeKok [Thu, 2 Dec 2021 15:19:57 +0000 (10:19 -0500)]
rework fixup code so that it does more / better fixups
the map code shouldn't be doing the same fixups as the update code
and the update code should be doing different / better fixes
than before
These changes don't affect existing tests, but are needed for the
new edit code
Alan T. DeKok [Thu, 2 Dec 2021 13:49:59 +0000 (08:49 -0500)]
tests use certs from src/tests/certs, not raddb/certs
Alan T. DeKok [Thu, 2 Dec 2021 13:34:44 +0000 (08:34 -0500)]
typo
Alan T. DeKok [Thu, 2 Dec 2021 13:16:32 +0000 (08:16 -0500)]
use the certs from src/tests, and not from raddb/certs
while the ones in src/tests are copied to raddb/ during CI, they're
not copied for dev builds. As a result, they're pointing to the
wrong thing.
Alan T. DeKok [Thu, 2 Dec 2021 13:18:23 +0000 (08:18 -0500)]
tell cov-build to use the config file
github-actions[bot] [Wed, 1 Dec 2021 22:57:45 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:37 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:33 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:29 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:28 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:27 +0000 (22:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
Arran Cudbard-Bell [Wed, 1 Dec 2021 22:28:31 +0000 (16:28 -0600)]
Fix pure flag state for different redundant types
Arran Cudbard-Bell [Wed, 1 Dec 2021 22:22:54 +0000 (16:22 -0600)]
Rremove the last legacy xlat function Closes #4321
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:23:44 +0000 (14:23 -0600)]
Return NULL not -1
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:19:04 +0000 (14:19 -0600)]
Revert "the default validity for certificates is 60 days, from"
This reverts commit
3ee5edd6388edb1114e1e9936b040ea00ee1f316 .
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:16:07 +0000 (14:16 -0600)]
Use correct enum
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:14:42 +0000 (14:14 -0600)]
Const issues
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:05:39 +0000 (14:05 -0600)]
Add xctx structures for xlat instantiation and calling
This is similar to the changes made to modules.
These changes also switch the instance and thread instance trees to heaps, which allows O(1) lookup of thread instance data. This is significantly more efficient than the old code.
This commit is large as it changes the function signature for xlat functions, and removes a large amount of boilerplate in the modules that dealt with copying module instance and thread instance data around.
Arran Cudbard-Bell [Wed, 1 Dec 2021 19:34:58 +0000 (13:34 -0600)]
Formatting
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:55:17 +0000 (08:55 -0600)]
Use correct calling convention for redundant_test
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:54:24 +0000 (08:54 -0600)]
Fix comment
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:53:31 +0000 (08:53 -0600)]
Gracefully deal with malloc failures in module_ctx.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:52:13 +0000 (08:52 -0600)]
Fix headers in xlat.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:51:36 +0000 (08:51 -0600)]
Add seperate registration function for xlats tied to modules
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:39:49 +0000 (08:39 -0600)]
Move xlat instruction into the function that uses it
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:38:54 +0000 (08:38 -0600)]
Remove spurious text
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:38:42 +0000 (08:38 -0600)]
Move the xlat flag merge function into xlat_priv.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:38:23 +0000 (08:38 -0600)]
Record the input type %{ vs %( and expose the validation functions
Also do more validation when we're resolving a previously unresolved xlat
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:34:04 +0000 (08:34 -0600)]
Allow additional function calls to be allocated using the arguments from another xlat call
This enables redundant to work correctly
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:32:54 +0000 (08:32 -0600)]
Don't exit the resolver loop when we hit a XLAT_GROUP
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:32:11 +0000 (08:32 -0600)]
Minor formatting issues in xlat_tokenize.c
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:31:24 +0000 (08:31 -0600)]
xlat_copy should actually insert the nodes it copies
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:30:40 +0000 (08:30 -0600)]
Redundant as xlat_exp_alloc_null already sets the pure flag
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:30:11 +0000 (08:30 -0600)]
Improve xlat_debug by indenting nodes
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:29:12 +0000 (08:29 -0600)]
Descend into unresolved xlat functions too
This fixes a bug where xlat functions calls that were children of an unresolved xlat function call were never instantiated, even if that call was later resolved.
It presented with crashes when using %{expr:} as that function is registered by a module and is initially unresolved.
Alan T. DeKok [Wed, 1 Dec 2021 15:40:20 +0000 (10:40 -0500)]
the default validity for certificates is 60 days, from
raddb/certs/server.cnf
Alan T. DeKok [Wed, 1 Dec 2021 15:40:20 +0000 (10:40 -0500)]
%(date:...) should return FR_TYPE_DATE
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:29:42 +0000 (13:29 -0600)]
Revert "unify pass2_fixup_update_map() and unlang_fixup_map()"
This reverts commit
51c5635130ee088aab54dda3de3ee2399e7d0bf9 .
Changes break the json and cache module tests.
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:15:26 +0000 (13:15 -0600)]
Revert "set the default dictionary"
The internal dictionary isn't allowed as the default as the internal dictionary is searched in most cases.
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:08:16 +0000 (13:08 -0600)]
Formatting
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:00:55 +0000 (13:00 -0600)]
Add copy functions for tmpls and xlats
Alan T. DeKok [Tue, 30 Nov 2021 17:55:23 +0000 (12:55 -0500)]
set the default dictionary
Alan T. DeKok [Tue, 30 Nov 2021 17:11:40 +0000 (12:11 -0500)]
tets are in the RADIUS dictionary
Alan T. DeKok [Tue, 30 Nov 2021 16:18:48 +0000 (11:18 -0500)]
add map_list_tail
Alan T. DeKok [Tue, 30 Nov 2021 15:25:27 +0000 (10:25 -0500)]
unify pass2_fixup_update_map() and unlang_fixup_map()
and change callers of unlang_fixup_map() to pass tmpl_rules_t
as the ctx
Alan T. DeKok [Tue, 30 Nov 2021 14:05:03 +0000 (09:05 -0500)]
copy the string values, instead of shallow copies
we're not allowing multiple refcounts for the same string, so
the simplest solution is to just copy it whole-sale.
Alan T. DeKok [Mon, 29 Nov 2021 14:28:25 +0000 (09:28 -0500)]
shut up linker complaints on OSX
Alan T. DeKok [Mon, 29 Nov 2021 14:02:19 +0000 (09:02 -0500)]
allow casts for negative numbers in strings
Alan T. DeKok [Mon, 29 Nov 2021 13:50:53 +0000 (08:50 -0500)]
date / time_delta are _signed_ integers
Alan T. DeKok [Mon, 29 Nov 2021 13:43:15 +0000 (08:43 -0500)]
update comments
Alan T. DeKok [Mon, 29 Nov 2021 13:39:32 +0000 (08:39 -0500)]
add SSLKEYLOGFILE capability
and add "keylog_file" to the TLS configuration, so that we can
distinguish SSL keys for EAP versus incoming / outgoing RadSec
Alan T. DeKok [Sat, 27 Nov 2021 14:06:47 +0000 (09:06 -0500)]
cast RHS, as the types might be different
Alan T. DeKok [Thu, 25 Nov 2021 21:30:49 +0000 (16:30 -0500)]
rename functions and add a few more helper functions
Alan T. DeKok [Thu, 25 Nov 2021 21:30:16 +0000 (16:30 -0500)]
update return code
Alan T. DeKok [Thu, 25 Nov 2021 16:53:49 +0000 (11:53 -0500)]
add assertion
Alan T. DeKok [Thu, 25 Nov 2021 16:39:47 +0000 (11:39 -0500)]
add recommendation from the coverity people
this time without extra stuff
Alan T. DeKok [Thu, 25 Nov 2021 16:38:43 +0000 (11:38 -0500)]
Revert "add recommendation from the coverity people"
This reverts commit
d5d2149b16656b9ed2fe29de33aef598b2526049 .
nope.
Alan T. DeKok [Thu, 25 Nov 2021 16:27:22 +0000 (11:27 -0500)]
remove assert
Alan T. DeKok [Thu, 25 Nov 2021 16:25:55 +0000 (11:25 -0500)]
fix code broken in commit
3391575a5
Alan T. DeKok [Thu, 25 Nov 2021 16:08:09 +0000 (11:08 -0500)]
we can get away without using "..."
This also serves as a test for the fixes in commit
f0db834416
Alan T. DeKok [Thu, 25 Nov 2021 15:43:02 +0000 (10:43 -0500)]
add recommendation from the coverity people
Alan T. DeKok [Thu, 25 Nov 2021 02:29:49 +0000 (21:29 -0500)]
update pure flags
we default to pure, and various other things will over-ride
the flag if necessary. e.g. impure functions will set the flag
to false, as will attribute references.
Alan T. DeKok [Thu, 25 Nov 2021 02:17:17 +0000 (21:17 -0500)]
rand, etc. aren't pure
Nick Porter [Thu, 25 Nov 2021 13:42:18 +0000 (13:42 +0000)]
Fixes for mruby for new instantiate / detach structures (#4319)
Arran Cudbard-Bell [Wed, 24 Nov 2021 20:02:05 +0000 (15:02 -0500)]
Revert "reorder types"
There are so many uses of the old ordering it makes visually checking whether cases are covered annoying.
The old ordering orders things by types which relate directly to C types, and then more abstract types, and system types, which is generally far more useful.
The C types are usually the ones we deal with explicitly in martialling and unmartialling functions. It's very rare we end up needing to convert between time_delta and a native database type, but very common we need to deal with the numeric and float types.
Alan T. DeKok [Tue, 23 Nov 2021 21:05:41 +0000 (16:05 -0500)]
try a different way to shut up gcc
Alan T. DeKok [Tue, 23 Nov 2021 20:46:01 +0000 (15:46 -0500)]
if we allow %() and %{}, then parse both
Alan T. DeKok [Tue, 23 Nov 2021 19:41:31 +0000 (14:41 -0500)]
remove check for now
Alan T. DeKok [Tue, 23 Nov 2021 17:43:15 +0000 (12:43 -0500)]
mark up a bunch of functions as PURE.
Nothing uses the flag yet, but that's coming.
Note that any function which uses 'request->foo' at runtime
is NOT pure. However, the xlat functions MAY use RDEBUG, REDEBUG,
or other R macros
Alan T. DeKok [Tue, 23 Nov 2021 17:30:36 +0000 (12:30 -0500)]
pass xlat_flags_t to xlat_register()
so that we can pass both needs_async && pure
Alan T. DeKok [Tue, 23 Nov 2021 17:26:38 +0000 (12:26 -0500)]
pure functions cannot require async resolution
they must operate only on things in memory
Alan T. DeKok [Tue, 23 Nov 2021 15:47:36 +0000 (10:47 -0500)]
rename XLAT_LITERAL to XLAT_BOX
we already have XLAT_VIRTUAL, so we might as well avoid
XLAT_VALUE_BOX. But that can be changed at any time.
Updated comments and functions to make it clear which things
are strings, and which things are literal values (i.e. boxes)
Alan T. DeKok [Tue, 23 Nov 2021 15:19:12 +0000 (10:19 -0500)]
add value_box to xlat node, and make XLAT_LITERAL use it
right now we don't pass (or therefore use) any tainting flag.
That should arguably be fixed.
Alan T. DeKok [Mon, 22 Nov 2021 20:13:35 +0000 (15:13 -0500)]
now that we don't mangle things, put these into a union
because there's no reason to have all of the field available
for all of the xlat types
Alan T. DeKok [Mon, 22 Nov 2021 20:11:07 +0000 (15:11 -0500)]
we don't need to store node->attr for virtual attributes
the function itself defines what to do
Alan T. DeKok [Mon, 22 Nov 2021 20:09:19 +0000 (15:09 -0500)]
minor reformatting, and use common function
Alan T. DeKok [Sun, 21 Nov 2021 22:28:17 +0000 (17:28 -0500)]
minor cleanups, and add calculations for booleans
it's still not clear what to do for IFIDs and ethernet addresses.
IFIDs are site-local integers, and likely should just be treated
as opaque blobs.
we may want to allow editing ethernet addresses, by splitting
them into OUI, or by merging OUI and trailing bits. But for now
the caller might as well just convert them to octets, do the
opertions, and convert them back.
Alan T. DeKok [Sat, 20 Nov 2021 19:59:15 +0000 (14:59 -0500)]
add preliminary support for and/or
we likely also want to allow
ipaddr AND integer -> ipv4prefix
tho that' a little more work to figure stuff out
Alan T. DeKok [Sat, 20 Nov 2021 17:52:39 +0000 (12:52 -0500)]
typo: don't NUL terminate octet strings
Alan T. DeKok [Sat, 20 Nov 2021 17:38:41 +0000 (12:38 -0500)]
add cast to shut up warnings
Alan T. DeKok [Sat, 20 Nov 2021 17:37:47 +0000 (12:37 -0500)]
this is only for clang
Alan T. DeKok [Sat, 20 Nov 2021 16:24:54 +0000 (11:24 -0500)]
try to shut up clang
Alan T. DeKok [Sat, 20 Nov 2021 16:18:55 +0000 (11:18 -0500)]
we only need to clear values, not the whole thing
Alan T. DeKok [Sat, 20 Nov 2021 16:09:35 +0000 (11:09 -0500)]
subtraction is the inverse of addition
Alan T. DeKok [Sat, 20 Nov 2021 16:18:06 +0000 (11:18 -0500)]
clear the right thing
Alan T. DeKok [Sat, 20 Nov 2021 16:02:43 +0000 (11:02 -0500)]
add unary operation function
Alan T. DeKok [Sat, 20 Nov 2021 14:46:00 +0000 (09:46 -0500)]
add tests for assignment operations
Alan T. DeKok [Sat, 20 Nov 2021 14:18:14 +0000 (09:18 -0500)]
add binary op array
Alan T. DeKok [Sat, 20 Nov 2021 14:13:15 +0000 (09:13 -0500)]
add function to manage assignment operations
Alan T. DeKok [Sat, 20 Nov 2021 14:12:58 +0000 (09:12 -0500)]
add MUL and DIV
and rename errors due to floating point issues
Alan T. DeKok [Fri, 19 Nov 2021 21:43:46 +0000 (16:43 -0500)]
add and use fr_value_box_cast_to_float()
Alan T. DeKok [Fri, 19 Nov 2021 21:28:49 +0000 (16:28 -0500)]
set output on success, not on error
Alan T. DeKok [Fri, 19 Nov 2021 21:12:05 +0000 (16:12 -0500)]
rename function
we will later have unary / self-modifying functions. So it's
best to have consistent names from the start