]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Wed, 1 Jun 2022 13:44:29 +0000 (09:44 -0400)]
add run-time evaluation of regular expressions.
and more error checks, and tests
Alan T. DeKok [Wed, 1 Jun 2022 13:21:44 +0000 (09:21 -0400)]
doc cleanups and fixes
Alan T. DeKok [Wed, 1 Jun 2022 12:56:22 +0000 (08:56 -0400)]
remove unnecessary "const"
Alan T. DeKok [Wed, 1 Jun 2022 12:41:39 +0000 (08:41 -0400)]
first pass at regex operators.
* no resolution yet
* no run-time compliation
Alan T. DeKok [Wed, 1 Jun 2022 11:20:09 +0000 (07:20 -0400)]
rename to follow naming scheme
Alan T. DeKok [Wed, 1 Jun 2022 11:12:08 +0000 (07:12 -0400)]
enable more tests
Alan T. DeKok [Wed, 1 Jun 2022 01:18:00 +0000 (21:18 -0400)]
update for recent changes
Alan T. DeKok [Wed, 1 Jun 2022 00:09:40 +0000 (20:09 -0400)]
more purify for logical operations
Alan T. DeKok [Wed, 1 Jun 2022 00:08:29 +0000 (20:08 -0400)]
expose xlat_purify_list() for use in node->func.purify() callbacks
Alan T. DeKok [Tue, 31 May 2022 21:14:50 +0000 (17:14 -0400)]
more "set flags properly"
Alan T. DeKok [Tue, 31 May 2022 21:13:12 +0000 (17:13 -0400)]
print head flags, too
Alan T. DeKok [Tue, 31 May 2022 14:23:15 +0000 (10:23 -0400)]
add purify callback for || and &&
Alan T. DeKok [Tue, 31 May 2022 14:15:00 +0000 (10:15 -0400)]
set flags correctly on n-ary ops
Alan T. DeKok [Tue, 31 May 2022 14:14:10 +0000 (10:14 -0400)]
add set purify callback, and use it in xlat_purify()
Alan T. DeKok [Mon, 30 May 2022 20:49:59 +0000 (16:49 -0400)]
add function to convert XLAT_FUNC to other type
only in limited situations, and only if we can't leak memory.
Alan T. DeKok [Sat, 28 May 2022 14:46:17 +0000 (10:46 -0400)]
start of regex parsing and tests.
We'll need regex instantiate / print, but this is a start.
Alan T. DeKok [Sat, 28 May 2022 14:46:09 +0000 (10:46 -0400)]
generalize rules
Alan T. DeKok [Sat, 28 May 2022 14:05:33 +0000 (10:05 -0400)]
add precendence definitions for =~ and !~
Alan T. DeKok [Sat, 28 May 2022 13:18:33 +0000 (09:18 -0400)]
respect t_rules->at_runtime for regex parsing
Alan T. DeKok [Sat, 28 May 2022 13:11:02 +0000 (09:11 -0400)]
typo
Alan T. DeKok [Sat, 28 May 2022 12:38:27 +0000 (08:38 -0400)]
|| and && now return their "truthy" values
2 || 5 --> 2, not "true"
(1 < 2) || (...) --> true
Or later,
&Foo = (&Bar || &Baz)
which assigns to Foo whatever value exists.
and since we now have tests for this, update the code to correctly
implement && and ||
Alan T. DeKok [Fri, 27 May 2022 21:43:46 +0000 (17:43 -0400)]
structural and NULL types are logically false.
Alan T. DeKok [Fri, 27 May 2022 21:41:22 +0000 (17:41 -0400)]
NULL types on input yield NULL types on output.
Alan T. DeKok [Fri, 27 May 2022 20:48:07 +0000 (16:48 -0400)]
update comments
Alan T. DeKok [Fri, 27 May 2022 20:22:35 +0000 (16:22 -0400)]
better errors for invalid casts
Alan T. DeKok [Fri, 27 May 2022 19:48:42 +0000 (15:48 -0400)]
on error, add box of FR_TYPE_NULL, instead of returning XLAT_ACTION_FAIL
so that the calculation can proceed, instead of dying part-way thru.
There should be some discussion around perhaps a better approach.
One is that xlats which can't be purified are invalid, and cause
higher-level parse errors.
For now, this addresses a few more 'todo' in the tests
Alan T. DeKok [Fri, 27 May 2022 19:48:18 +0000 (15:48 -0400)]
print data types just to be helpful
Alan T. DeKok [Fri, 27 May 2022 19:47:58 +0000 (15:47 -0400)]
attribute expansions aren't pure.
Alan T. DeKok [Fri, 27 May 2022 19:47:08 +0000 (15:47 -0400)]
fix typo which shouldn't change much.
Alan T. DeKok [Fri, 27 May 2022 19:42:29 +0000 (15:42 -0400)]
add missing upcasts for comparisons
Alan T. DeKok [Fri, 27 May 2022 19:01:46 +0000 (15:01 -0400)]
print "true" and "false" in more situations
Alan T. DeKok [Thu, 26 May 2022 19:19:22 +0000 (15:19 -0400)]
disallow lists and structural types in comparisons
Alan T. DeKok [Thu, 26 May 2022 18:37:50 +0000 (14:37 -0400)]
xlat_instantiate_ephemeral() will now call xlat_resolve()
if needed
Alan T. DeKok [Thu, 26 May 2022 18:14:54 +0000 (14:14 -0400)]
allow comparisons to print "true" and "false"
instead of "yes" and "no".
this doesn't *always* work. A bare
(bool) true
will result in a box of FR_TYPE_BOOL, with no enumv, and will thus
print as "yes". But we blame value.c for that.
Alan T. DeKok [Thu, 26 May 2022 17:50:35 +0000 (13:50 -0400)]
cleanups, fixes, and tests to handle many condition tests
Some of the results are different due to minor implementation
differences. Others are omitted because we're no longer doing that.
Others are marked up with a "@todo", because they're arguably wrong.
Alan T. DeKok [Thu, 26 May 2022 14:47:21 +0000 (10:47 -0400)]
suppress useless casts.
Alan T. DeKok [Thu, 26 May 2022 14:19:47 +0000 (10:19 -0400)]
minor fixes for printing
once we've moved the arguments into our own array, we have to
print spaces ourselves.
Alan T. DeKok [Thu, 26 May 2022 13:28:17 +0000 (09:28 -0400)]
print &Foo instead of %{Foo}, which is less confusing
Alan T. DeKok [Thu, 26 May 2022 13:12:34 +0000 (09:12 -0400)]
parse lists as attributes.
Which fixes &Reply-Message getting parsed as
&Reply - Message
Alan T. DeKok [Thu, 26 May 2022 11:30:29 +0000 (07:30 -0400)]
align message and offset with other parts of the code
Arran Cudbard-Bell [Thu, 2 Jun 2022 19:29:43 +0000 (15:29 -0400)]
Cert validity period is 60 days now
Arran Cudbard-Bell [Thu, 2 Jun 2022 18:48:23 +0000 (14:48 -0400)]
Can't really check the serial value easily
Arran Cudbard-Bell [Thu, 2 Jun 2022 18:14:16 +0000 (14:14 -0400)]
Move libcurl init to global_lib framework
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:57:06 +0000 (13:57 -0400)]
Having pre-generated certificates saves very little time and breaks CI regularly
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:41:31 +0000 (13:41 -0400)]
Rename some more global_lib functions
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:40:20 +0000 (13:40 -0400)]
Table formatting in libldap
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:10:31 +0000 (13:10 -0400)]
Move global_lib_init and instantiation calls inside the module code
Arran Cudbard-Bell [Thu, 2 Jun 2022 16:51:34 +0000 (12:51 -0400)]
Minor fixes
Nick Porter [Thu, 2 Jun 2022 16:50:31 +0000 (17:50 +0100)]
v4: Framework for configuring, initialising and freeing libraries (#4541)
* Add endforeach macro to close code blocks opened by foreach macros
* Define framework for initialising and freeing libraries
Reading library configuration from a subsection of a global {} config
section.
* Initialise global list of libraries
* Register handlers for "lib" symbols to auto initialise and free libraries
github-actions[bot] [Thu, 2 Jun 2022 09:51:19 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:16 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:13 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:09 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:07 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:04 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:01 +0000 (09:51 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 2 Jun 2022 09:50:58 +0000 (09:50 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
James Jones [Wed, 1 Jun 2022 14:43:30 +0000 (09:43 -0500)]
Check fr_sbuff_in_bstrncpy() return in xlat_func_rpad() (CID #
15039490 ) (#4515)
James Jones [Wed, 1 Jun 2022 01:25:31 +0000 (20:25 -0500)]
Cast to void where we know a call will work or just want side effects (#4537)
This deals with the following CIDs:
1469133 ,
1503911 ,
1503964 ,
1504282 (#1 of 5)
James Jones [Wed, 1 Jun 2022 01:24:18 +0000 (20:24 -0500)]
Deal with unchecked return value Coverity reports (#4532)
This deals with the following CIDs:
1503943 ,
1503949 ,
1455233 ,
1503981
James Jones [Wed, 1 Jun 2022 01:22:37 +0000 (20:22 -0500)]
Remove needless checks from xlat_config_escape(). (#4536)
The VLA escaped[] is declared to be large enough to hold the text
from the value box even if every single character needs the
largest possible encoding (MIME, which takes three characters to
encode one). The bound checks will therefore never cause an error
return.
Arran Cudbard-Bell [Tue, 31 May 2022 15:41:04 +0000 (11:41 -0400)]
Add some more text about identity privacy
Nick Porter [Tue, 31 May 2022 08:06:21 +0000 (09:06 +0100)]
Use eapol_test-build.sh to build eapol_test on deb CI
Nick Porter [Mon, 30 May 2022 15:48:51 +0000 (16:48 +0100)]
Update test certificates
Arran Cudbard-Bell [Sat, 21 May 2022 20:57:19 +0000 (15:57 -0500)]
Always build jlibtool with debugging symbols
Arran Cudbard-Bell [Wed, 18 May 2022 19:16:44 +0000 (14:16 -0500)]
Add $(E) suffix for executable targets and $(L) suffix for dynamic libraries
Arran Cudbard-Bell [Wed, 18 May 2022 19:15:34 +0000 (14:15 -0500)]
Add rule for .js files and fix Linux specific extension substitution
Arran Cudbard-Bell [Mon, 16 May 2022 14:31:23 +0000 (09:31 -0500)]
Use BUILD and TARGET not HOST and TARGET
Alan T. DeKok [Wed, 25 May 2022 20:45:54 +0000 (16:45 -0400)]
fix final issues
Nick Porter [Wed, 25 May 2022 16:45:45 +0000 (17:45 +0100)]
Remove module bootstrapping from conf parsing (#4538)
Alan T. DeKok [Wed, 25 May 2022 14:36:18 +0000 (10:36 -0400)]
set and print quotes for string values.
Alan T. DeKok [Wed, 25 May 2022 14:22:10 +0000 (10:22 -0400)]
tests for unary not
Alan T. DeKok [Wed, 25 May 2022 14:20:40 +0000 (10:20 -0400)]
append argument as group, not as raw node
Alan T. DeKok [Wed, 25 May 2022 12:19:31 +0000 (08:19 -0400)]
validate data type where possible.
This doesn't catch all of the cases, but it catches enough to be
useful.
Josef Vybíhal [Wed, 25 May 2022 05:08:57 +0000 (07:08 +0200)]
Fix typo (#4531)
Alan T. DeKok [Tue, 24 May 2022 18:57:49 +0000 (14:57 -0400)]
just pass all of the tmpl_rules to the xlat tokenize functions
so that they all take the same thing, and so that we have better
control over non-attribute parsing
Alan T. DeKok [Tue, 24 May 2022 18:21:07 +0000 (14:21 -0400)]
check fields only when they're valid
Alan T. DeKok [Tue, 24 May 2022 14:44:42 +0000 (10:44 -0400)]
lots of fixes.
Set flags better. Do more resolution of binary operations.
We still need to add xlat_expr_resolve_unary()
update tests to show that most pure things can now be purified.
Alan T. DeKok [Tue, 24 May 2022 14:28:30 +0000 (10:28 -0400)]
comments
Alan T. DeKok [Tue, 24 May 2022 14:19:43 +0000 (10:19 -0400)]
allow for instantiated xlats to be put into other ones
tmpl_tokenize() will call xlat_instantiate_ephemeral() on things
it sees. However, if we then hoist that xlat out of the tmpl
and into the main xlat tree, we can't re-instantiate the node.
Rather than adding flags to change the rest of the code, we just
catch that here. This should likely be cleaned up later
Alan T. DeKok [Tue, 24 May 2022 14:18:52 +0000 (10:18 -0400)]
allow for pruning of xlat walk
Alan T. DeKok [Tue, 24 May 2022 14:14:33 +0000 (10:14 -0400)]
print data types, too
Alan T. DeKok [Mon, 23 May 2022 20:27:26 +0000 (16:27 -0400)]
set more flags correctly
Alan T. DeKok [Mon, 23 May 2022 19:21:46 +0000 (15:21 -0400)]
print out indexes, which can help at times.
Alan T. DeKok [Mon, 23 May 2022 18:40:58 +0000 (14:40 -0400)]
check for xlat / exec tmpls
which should really be handled, but let's debug other code first.
Alan T. DeKok [Mon, 23 May 2022 18:40:40 +0000 (14:40 -0400)]
more debugging
Alan T. DeKok [Mon, 23 May 2022 18:38:40 +0000 (14:38 -0400)]
clean up flag handling
things are pure unless marked impure.
check input allow_unresolved once per loop, and not in some of the
individual "case" statements
Terry Burton [Tue, 24 May 2022 18:38:45 +0000 (19:38 +0100)]
CI FreeBSD: Bump vmactions/freebsd-vm and prune before pushback (#4533)
Pushback of the working directory over rsync sometimes fails with
"ssh_dispatch_run_fatal: Connection to A.B.C.D: message authentication code
incorrect" irrespective of the MAC used by the SSH connection.
Cleaning the unnecessary parts of the working directory should reduce the
chances of such failures until the cause is determined.
We keep any changes to the eapol_test build since this is cached between runs.
Terry Burton [Tue, 24 May 2022 17:00:59 +0000 (18:00 +0100)]
Raise limit for number of Redis xlat components (#4534)
Arran Cudbard-Bell [Wed, 18 May 2022 19:15:19 +0000 (14:15 -0500)]
Correct arguments in the enscripten target
Arran Cudbard-Bell [Tue, 10 May 2022 13:08:27 +0000 (09:08 -0400)]
Init proto
Arran Cudbard-Bell [Sat, 21 May 2022 15:37:35 +0000 (10:37 -0500)]
Typo
Arran Cudbard-Bell [Sat, 21 May 2022 15:34:24 +0000 (10:34 -0500)]
Fixes for tmpl_resolve
Alan T. DeKok [Sat, 21 May 2022 14:22:32 +0000 (10:22 -0400)]
add void to shut up compiler
Alan T. DeKok [Sat, 21 May 2022 14:20:03 +0000 (10:20 -0400)]
add custom resolve callback handler
Alan T. DeKok [Sat, 21 May 2022 14:19:15 +0000 (10:19 -0400)]
add more debug output for xlat_purify
which can help track down issues with the flags
Alan T. DeKok [Sat, 21 May 2022 14:15:44 +0000 (10:15 -0400)]
purify arguments, even if the function can't be purified
and hoist can_purify up to the parent.
We should really have a merge flags just for XLAT_FUNC, which
would cut down on some of this repetition.
Alan T. DeKok [Sat, 21 May 2022 12:55:11 +0000 (08:55 -0400)]
move more logic into tmpl_resolve()
Jorge Pereira [Sat, 21 May 2022 12:29:53 +0000 (09:29 -0300)]
rlm_expr: Fix typo with double '&' (#4525)
Alan T. DeKok [Fri, 20 May 2022 20:01:49 +0000 (16:01 -0400)]
head can be NULL