]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoadd run-time evaluation of regular expressions.
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

3 years agodoc cleanups and fixes
Alan T. DeKok [Wed, 1 Jun 2022 13:21:44 +0000 (09:21 -0400)] 
doc cleanups and fixes

3 years agoremove unnecessary "const"
Alan T. DeKok [Wed, 1 Jun 2022 12:56:22 +0000 (08:56 -0400)] 
remove unnecessary "const"

3 years agofirst pass at regex operators.
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

3 years agorename to follow naming scheme
Alan T. DeKok [Wed, 1 Jun 2022 11:20:09 +0000 (07:20 -0400)] 
rename to follow naming scheme

3 years agoenable more tests
Alan T. DeKok [Wed, 1 Jun 2022 11:12:08 +0000 (07:12 -0400)] 
enable more tests

3 years agoupdate for recent changes
Alan T. DeKok [Wed, 1 Jun 2022 01:18:00 +0000 (21:18 -0400)] 
update for recent changes

3 years agomore purify for logical operations
Alan T. DeKok [Wed, 1 Jun 2022 00:09:40 +0000 (20:09 -0400)] 
more purify for logical operations

3 years agoexpose xlat_purify_list() for use in node->func.purify() callbacks
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

3 years agomore "set flags properly"
Alan T. DeKok [Tue, 31 May 2022 21:14:50 +0000 (17:14 -0400)] 
more "set flags properly"

3 years agoprint head flags, too
Alan T. DeKok [Tue, 31 May 2022 21:13:12 +0000 (17:13 -0400)] 
print head flags, too

3 years agoadd purify callback for || and &&
Alan T. DeKok [Tue, 31 May 2022 14:23:15 +0000 (10:23 -0400)] 
add purify callback for || and &&

3 years agoset flags correctly on n-ary ops
Alan T. DeKok [Tue, 31 May 2022 14:15:00 +0000 (10:15 -0400)] 
set flags correctly on n-ary ops

3 years agoadd set purify callback, and use it in xlat_purify()
Alan T. DeKok [Tue, 31 May 2022 14:14:10 +0000 (10:14 -0400)] 
add set purify callback, and use it in xlat_purify()

3 years agoadd function to convert XLAT_FUNC to other type
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.

3 years agostart of regex parsing and tests.
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.

3 years agogeneralize rules
Alan T. DeKok [Sat, 28 May 2022 14:46:09 +0000 (10:46 -0400)] 
generalize rules

3 years agoadd precendence definitions for =~ and !~
Alan T. DeKok [Sat, 28 May 2022 14:05:33 +0000 (10:05 -0400)] 
add precendence definitions for =~ and !~

3 years agorespect t_rules->at_runtime for regex parsing
Alan T. DeKok [Sat, 28 May 2022 13:18:33 +0000 (09:18 -0400)] 
respect t_rules->at_runtime for regex parsing

3 years agotypo
Alan T. DeKok [Sat, 28 May 2022 13:11:02 +0000 (09:11 -0400)] 
typo

3 years ago|| and && now return their "truthy" values
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 ||

3 years agostructural and NULL types are logically false.
Alan T. DeKok [Fri, 27 May 2022 21:43:46 +0000 (17:43 -0400)] 
structural and NULL types are logically false.

3 years agoNULL types on input yield NULL types on output.
Alan T. DeKok [Fri, 27 May 2022 21:41:22 +0000 (17:41 -0400)] 
NULL types on input yield NULL types on output.

3 years agoupdate comments
Alan T. DeKok [Fri, 27 May 2022 20:48:07 +0000 (16:48 -0400)] 
update comments

3 years agobetter errors for invalid casts
Alan T. DeKok [Fri, 27 May 2022 20:22:35 +0000 (16:22 -0400)] 
better errors for invalid casts

3 years agoon error, add box of FR_TYPE_NULL, instead of returning XLAT_ACTION_FAIL
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

3 years agoprint data types just to be helpful
Alan T. DeKok [Fri, 27 May 2022 19:48:18 +0000 (15:48 -0400)] 
print data types just to be helpful

3 years agoattribute expansions aren't pure.
Alan T. DeKok [Fri, 27 May 2022 19:47:58 +0000 (15:47 -0400)] 
attribute expansions aren't pure.

3 years agofix typo which shouldn't change much.
Alan T. DeKok [Fri, 27 May 2022 19:47:08 +0000 (15:47 -0400)] 
fix typo which shouldn't change much.

3 years agoadd missing upcasts for comparisons
Alan T. DeKok [Fri, 27 May 2022 19:42:29 +0000 (15:42 -0400)] 
add missing upcasts for comparisons

3 years agoprint "true" and "false" in more situations
Alan T. DeKok [Fri, 27 May 2022 19:01:46 +0000 (15:01 -0400)] 
print "true" and "false" in more situations

3 years agodisallow lists and structural types in comparisons
Alan T. DeKok [Thu, 26 May 2022 19:19:22 +0000 (15:19 -0400)] 
disallow lists and structural types in comparisons

3 years agoxlat_instantiate_ephemeral() will now call xlat_resolve()
Alan T. DeKok [Thu, 26 May 2022 18:37:50 +0000 (14:37 -0400)] 
xlat_instantiate_ephemeral() will now call xlat_resolve()

if needed

3 years agoallow comparisons to print "true" and "false"
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.

3 years agocleanups, fixes, and tests to handle many condition tests
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.

3 years agosuppress useless casts.
Alan T. DeKok [Thu, 26 May 2022 14:47:21 +0000 (10:47 -0400)] 
suppress useless casts.

3 years agominor fixes for printing
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.

3 years agoprint &Foo instead of %{Foo}, which is less confusing
Alan T. DeKok [Thu, 26 May 2022 13:28:17 +0000 (09:28 -0400)] 
print &Foo instead of %{Foo}, which is less confusing

3 years agoparse lists as attributes.
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

3 years agoalign message and offset with other parts of the code
Alan T. DeKok [Thu, 26 May 2022 11:30:29 +0000 (07:30 -0400)] 
align message and offset with other parts of the code

3 years agoCert validity period is 60 days now
Arran Cudbard-Bell [Thu, 2 Jun 2022 19:29:43 +0000 (15:29 -0400)] 
Cert validity period is 60 days now

3 years agoCan't really check the serial value easily
Arran Cudbard-Bell [Thu, 2 Jun 2022 18:48:23 +0000 (14:48 -0400)] 
Can't really check the serial value easily

3 years agoMove libcurl init to global_lib framework
Arran Cudbard-Bell [Thu, 2 Jun 2022 18:14:16 +0000 (14:14 -0400)] 
Move libcurl init to global_lib framework

3 years agoHaving pre-generated certificates saves very little time and breaks CI regularly
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

3 years agoRename some more global_lib functions
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:41:31 +0000 (13:41 -0400)] 
Rename some more global_lib functions

3 years agoTable formatting in libldap
Arran Cudbard-Bell [Thu, 2 Jun 2022 17:40:20 +0000 (13:40 -0400)] 
Table formatting in libldap

3 years agoMove global_lib_init and instantiation calls inside the module code
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

3 years agoMinor fixes
Arran Cudbard-Bell [Thu, 2 Jun 2022 16:51:34 +0000 (12:51 -0400)] 
Minor fixes

3 years agov4: Framework for configuring, initialising and freeing libraries (#4541)
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

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:19 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:16 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:13 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:09 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:07 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:04 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 2 Jun 2022 09:51:01 +0000 (09:51 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Thu, 2 Jun 2022 09:50:58 +0000 (09:50 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoCheck fr_sbuff_in_bstrncpy() return in xlat_func_rpad() (CID #15039490) (#4515)
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)

3 years agoCast to void where we know a call will work or just want side effects (#4537)
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: 146913315039111503964,
1504282 (#1 of 5)

3 years agoDeal with unchecked return value Coverity reports (#4532)
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: 15039431503949,
14552331503981

3 years agoRemove needless checks from xlat_config_escape(). (#4536)
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.

3 years agoAdd some more text about identity privacy
Arran Cudbard-Bell [Tue, 31 May 2022 15:41:04 +0000 (11:41 -0400)] 
Add some more text about identity privacy

3 years agoUse eapol_test-build.sh to build eapol_test on deb CI
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

3 years agoUpdate test certificates
Nick Porter [Mon, 30 May 2022 15:48:51 +0000 (16:48 +0100)] 
Update test certificates

3 years agoAlways build jlibtool with debugging symbols
Arran Cudbard-Bell [Sat, 21 May 2022 20:57:19 +0000 (15:57 -0500)] 
Always build jlibtool with debugging symbols

3 years agoAdd $(E) suffix for executable targets and $(L) suffix for dynamic libraries
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

3 years agoAdd rule for .js files and fix Linux specific extension substitution
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

3 years agoUse BUILD and TARGET not HOST and TARGET
Arran Cudbard-Bell [Mon, 16 May 2022 14:31:23 +0000 (09:31 -0500)] 
Use BUILD and TARGET not HOST and TARGET

3 years agofix final issues
Alan T. DeKok [Wed, 25 May 2022 20:45:54 +0000 (16:45 -0400)] 
fix final issues

3 years agoRemove module bootstrapping from conf parsing (#4538)
Nick Porter [Wed, 25 May 2022 16:45:45 +0000 (17:45 +0100)] 
Remove module bootstrapping from conf parsing (#4538)

3 years agoset and print quotes for string values.
Alan T. DeKok [Wed, 25 May 2022 14:36:18 +0000 (10:36 -0400)] 
set and print quotes for string values.

3 years agotests for unary not
Alan T. DeKok [Wed, 25 May 2022 14:22:10 +0000 (10:22 -0400)] 
tests for unary not

3 years agoappend argument as group, not as raw node
Alan T. DeKok [Wed, 25 May 2022 14:20:40 +0000 (10:20 -0400)] 
append argument as group, not as raw node

3 years agovalidate data type where possible.
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.

3 years agoFix typo (#4531)
Josef Vybíhal [Wed, 25 May 2022 05:08:57 +0000 (07:08 +0200)] 
Fix typo (#4531)

3 years agojust pass all of the tmpl_rules to the xlat tokenize functions
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

3 years agocheck fields only when they're valid
Alan T. DeKok [Tue, 24 May 2022 18:21:07 +0000 (14:21 -0400)] 
check fields only when they're valid

3 years agolots of fixes.
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.

3 years agocomments
Alan T. DeKok [Tue, 24 May 2022 14:28:30 +0000 (10:28 -0400)] 
comments

3 years agoallow for instantiated xlats to be put into other ones
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

3 years agoallow for pruning of xlat walk
Alan T. DeKok [Tue, 24 May 2022 14:18:52 +0000 (10:18 -0400)] 
allow for pruning of xlat walk

3 years agoprint data types, too
Alan T. DeKok [Tue, 24 May 2022 14:14:33 +0000 (10:14 -0400)] 
print data types, too

3 years agoset more flags correctly
Alan T. DeKok [Mon, 23 May 2022 20:27:26 +0000 (16:27 -0400)] 
set more flags correctly

3 years agoprint out indexes, which can help at times.
Alan T. DeKok [Mon, 23 May 2022 19:21:46 +0000 (15:21 -0400)] 
print out indexes, which can help at times.

3 years agocheck for xlat / exec tmpls
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.

3 years agomore debugging
Alan T. DeKok [Mon, 23 May 2022 18:40:40 +0000 (14:40 -0400)] 
more debugging

3 years agoclean up flag handling
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

3 years agoCI FreeBSD: Bump vmactions/freebsd-vm and prune before pushback (#4533)
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.

3 years agoRaise limit for number of Redis xlat components (#4534)
Terry Burton [Tue, 24 May 2022 17:00:59 +0000 (18:00 +0100)] 
Raise limit for number of Redis xlat components (#4534)

3 years agoCorrect arguments in the enscripten target
Arran Cudbard-Bell [Wed, 18 May 2022 19:15:19 +0000 (14:15 -0500)] 
Correct arguments in the enscripten target

3 years agoInit proto
Arran Cudbard-Bell [Tue, 10 May 2022 13:08:27 +0000 (09:08 -0400)] 
Init proto

3 years agoTypo
Arran Cudbard-Bell [Sat, 21 May 2022 15:37:35 +0000 (10:37 -0500)] 
Typo

3 years agoFixes for tmpl_resolve
Arran Cudbard-Bell [Sat, 21 May 2022 15:34:24 +0000 (10:34 -0500)] 
Fixes for tmpl_resolve

3 years agoadd void to shut up compiler
Alan T. DeKok [Sat, 21 May 2022 14:22:32 +0000 (10:22 -0400)] 
add void to shut up compiler

3 years agoadd custom resolve callback handler
Alan T. DeKok [Sat, 21 May 2022 14:20:03 +0000 (10:20 -0400)] 
add custom resolve callback handler

3 years agoadd more debug output for xlat_purify
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

3 years agopurify arguments, even if the function can't be purified
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.

3 years agomove more logic into tmpl_resolve()
Alan T. DeKok [Sat, 21 May 2022 12:55:11 +0000 (08:55 -0400)] 
move more logic into tmpl_resolve()

3 years agorlm_expr: Fix typo with double '&' (#4525)
Jorge Pereira [Sat, 21 May 2022 12:29:53 +0000 (09:29 -0300)] 
rlm_expr: Fix typo with double '&' (#4525)

3 years agohead can be NULL
Alan T. DeKok [Fri, 20 May 2022 20:01:49 +0000 (16:01 -0400)] 
head can be NULL