]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 years agoOnly apply escape functions to tainted boxes
Arran Cudbard-Bell [Thu, 2 Dec 2021 00:16:59 +0000 (18:16 -0600)] 
Only apply escape functions to tainted boxes

4 years agoRemove the old synchronous xlat interpreter
Arran Cudbard-Bell [Wed, 1 Dec 2021 23:24:24 +0000 (17:24 -0600)] 
Remove the old synchronous xlat interpreter

We can just run the new one using a temporary unlang interpreter

4 years agoRemove legacy xlat function infrastructure
Arran Cudbard-Bell [Wed, 1 Dec 2021 23:11:49 +0000 (17:11 -0600)] 
Remove legacy xlat function infrastructure

4 years agolet's see if the passes with gcc
Alan T. DeKok [Sat, 4 Dec 2021 15:51:30 +0000 (10:51 -0500)] 
let's see if the passes with gcc

if not, we'll have to find out what's going on, or disable the
relevant tests

4 years agoadd insert pair before function
Alan T. DeKok [Fri, 3 Dec 2021 20:08:08 +0000 (15:08 -0500)] 
add insert pair before function

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:33 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:27 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:26 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:19 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:16 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sat, 4 Dec 2021 09:34:13 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

4 years agoquiet compiler
Alan T. DeKok [Fri, 3 Dec 2021 19:00:26 +0000 (14:00 -0500)] 
quiet compiler

4 years agodisable integer64 tests
Alan T. DeKok [Fri, 3 Dec 2021 16:59:59 +0000 (11:59 -0500)] 
disable integer64 tests

??? the input json has an array at index 0, but the tests
are trying to parse that as a 64-bit integer, with a large
value ???

Disabled until such time as the test is re-examined.

4 years agodisable tests until nested group copies work
Alan T. DeKok [Fri, 3 Dec 2021 16:59:19 +0000 (11:59 -0500)] 
disable tests until nested group copies work

They should be edited and re-enabled once the new edit sections
are completed

4 years agocontrol items are ":=" not "=="
Alan T. DeKok [Fri, 3 Dec 2021 16:34:03 +0000 (11:34 -0500)] 
control items are ":=" not "=="

4 years agofall through on true, not false
Alan T. DeKok [Fri, 3 Dec 2021 15:49:05 +0000 (10:49 -0500)] 
fall through on true, not false

and rework the logic to be clearer, and correct

4 years agomake "call" run its children again
Alan T. DeKok [Fri, 3 Dec 2021 15:33:23 +0000 (10:33 -0500)] 
make "call" run its children again

4 years agothis doesn't work for now. Removing it to allow CI to pass.
Alan T. DeKok [Fri, 3 Dec 2021 15:32:12 +0000 (10:32 -0500)] 
this doesn't work for now.  Removing it to allow CI to pass.

It looks like this hasn't worked for a bit, but the issues with
the conditional evaluator let it pass.  Now that the condition
eval is fixed, this test fails.

4 years agocheck for existence, not for value
Alan T. DeKok [Fri, 3 Dec 2021 15:27:20 +0000 (10:27 -0500)] 
check for existence, not for value

4 years agostrings are strings, not integers
Alan T. DeKok [Fri, 3 Dec 2021 15:23:18 +0000 (10:23 -0500)] 
strings are strings, not integers

4 years agothings inside of a "parallel" block are children
Alan T. DeKok [Fri, 3 Dec 2021 15:11:58 +0000 (10:11 -0500)] 
things inside of a "parallel" block are children

so that we have to update the parent if we want the results
to be persistent

4 years agoupdate conditional evaluator to return true/false
Alan T. DeKok [Thu, 2 Dec 2021 21:43:25 +0000 (16:43 -0500)] 
update conditional evaluator to return true/false

there is no error.  "attribute not found" is "not match"

4 years agoadd UNLANG_TYPE_EDIT and tests
Alan T. DeKok [Thu, 2 Dec 2021 20:03:19 +0000 (15:03 -0500)] 
add UNLANG_TYPE_EDIT and tests

for now, expansion failures and overflow/underflow are "noop"
instead of "fail".

Only leaf attributes are handled.  And even then only operators
which are not ":=" or "="

4 years agoupdate notes
Alan T. DeKok [Thu, 2 Dec 2021 19:24:26 +0000 (14:24 -0500)] 
update notes

4 years agoadd notes on what to do
Alan T. DeKok [Thu, 2 Dec 2021 19:24:09 +0000 (14:24 -0500)] 
add notes on what to do

4 years agoremove more $(shell..) by using built-in GNU make functions
Alan T. DeKok [Thu, 2 Dec 2021 18:21:20 +0000 (13:21 -0500)] 
remove more $(shell..) by using built-in GNU make functions

4 years agoFuzzer corpus pushback: Spread calls to the file_update API to avoid clashes (#4324)
Terry Burton [Fri, 3 Dec 2021 13:37:47 +0000 (13:37 +0000)] 
Fuzzer corpus pushback: Spread calls to the file_update API to avoid clashes (#4324)

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:25 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:22 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:21 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:13 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:12 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:12 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Fri, 3 Dec 2021 09:34:11 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

4 years agoFuzzer corpus pushback: Avoid stripping of trailing newline by environment (#4323)
Terry Burton [Thu, 2 Dec 2021 19:06:41 +0000 (19:06 +0000)] 
Fuzzer corpus pushback: Avoid stripping of trailing newline by environment (#4323)

4 years agoFixup cache redis tests
Arran Cudbard-Bell [Thu, 2 Dec 2021 17:41:24 +0000 (11:41 -0600)] 
Fixup cache redis tests

4 years agoIsolate redis test keys from different tests
Arran Cudbard-Bell [Thu, 2 Dec 2021 17:27:01 +0000 (11:27 -0600)] 
Isolate redis test keys from different tests

4 years agoremove time zone offset, don't double them
Alan T. DeKok [Thu, 2 Dec 2021 17:15:34 +0000 (12:15 -0500)] 
remove time zone offset, don't double them

4 years agoApply timezone offset correctly
Arran Cudbard-Bell [Thu, 2 Dec 2021 17:08:42 +0000 (11:08 -0600)] 
Apply timezone offset correctly

4 years agoTest the redis cache module
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:28:47 +0000 (09:28 -0600)] 
Test the redis cache module

4 years agoRevert "tests use certs from src/tests/certs, not raddb/certs"
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

4 years agoProvide more information about what expired
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:29:02 +0000 (09:29 -0600)] 
Provide more information about what expired

4 years agoStrings need to be copied to the to_cast box first
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

4 years agoDon't expect a prefix in tuples coming back from redis
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

4 years agoDifference between Linux and macos?
Arran Cudbard-Bell [Thu, 2 Dec 2021 15:30:51 +0000 (09:30 -0600)] 
Difference between Linux and macos?

4 years agoAdd taint and untaint xlats
Arran Cudbard-Bell [Thu, 2 Dec 2021 05:48:38 +0000 (23:48 -0600)] 
Add taint and untaint xlats

4 years agorework fixup code so that it does more / better fixups
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

4 years agotests use certs from src/tests/certs, not raddb/certs
Alan T. DeKok [Thu, 2 Dec 2021 13:49:59 +0000 (08:49 -0500)] 
tests use certs from src/tests/certs, not raddb/certs

4 years agotypo
Alan T. DeKok [Thu, 2 Dec 2021 13:34:44 +0000 (08:34 -0500)] 
typo

4 years agouse the certs from src/tests, and not from raddb/certs
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.

4 years agotell cov-build to use the config file
Alan T. DeKok [Thu, 2 Dec 2021 13:18:23 +0000 (08:18 -0500)] 
tell cov-build to use the config file

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:45 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:37 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:33 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:29 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:28 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

4 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Wed, 1 Dec 2021 22:57:27 +0000 (22:57 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

4 years agoFix pure flag state for different redundant types
Arran Cudbard-Bell [Wed, 1 Dec 2021 22:28:31 +0000 (16:28 -0600)] 
Fix pure flag state for different redundant types

4 years agoRremove the last legacy xlat function Closes #4321
Arran Cudbard-Bell [Wed, 1 Dec 2021 22:22:54 +0000 (16:22 -0600)] 
Rremove the last legacy xlat function  Closes #4321

4 years agoReturn NULL not -1
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:23:44 +0000 (14:23 -0600)] 
Return NULL not -1

4 years agoRevert "the default validity for certificates is 60 days, from"
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.

4 years agoUse correct enum
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:16:07 +0000 (14:16 -0600)] 
Use correct enum

4 years agoConst issues
Arran Cudbard-Bell [Wed, 1 Dec 2021 20:14:42 +0000 (14:14 -0600)] 
Const issues

4 years agoAdd xctx structures for xlat instantiation and calling
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.

4 years agoFormatting
Arran Cudbard-Bell [Wed, 1 Dec 2021 19:34:58 +0000 (13:34 -0600)] 
Formatting

4 years agoUse correct calling convention for redundant_test
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:55:17 +0000 (08:55 -0600)] 
Use correct calling convention for redundant_test

4 years agoFix comment
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:54:24 +0000 (08:54 -0600)] 
Fix comment

4 years agoGracefully deal with malloc failures in module_ctx.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:53:31 +0000 (08:53 -0600)] 
Gracefully deal with malloc failures in module_ctx.h

4 years agoFix headers in xlat.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:52:13 +0000 (08:52 -0600)] 
Fix headers in xlat.h

4 years agoAdd seperate registration function for xlats tied to modules
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:51:36 +0000 (08:51 -0600)] 
Add seperate registration function for xlats tied to modules

4 years agoMove xlat instruction into the function that uses it
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:39:49 +0000 (08:39 -0600)] 
Move xlat instruction into the function that uses it

4 years agoRemove spurious text
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:38:54 +0000 (08:38 -0600)] 
Remove spurious text

4 years agoMove the xlat flag merge function into xlat_priv.h
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:38:42 +0000 (08:38 -0600)] 
Move the xlat flag merge function into xlat_priv.h

4 years agoRecord the input type %{ vs %( and expose the validation functions
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

4 years agoAllow additional function calls to be allocated using the arguments from another...
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

4 years agoDon't exit the resolver loop when we hit a XLAT_GROUP
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

4 years agoMinor formatting issues in xlat_tokenize.c
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:32:11 +0000 (08:32 -0600)] 
Minor formatting issues in xlat_tokenize.c

4 years agoxlat_copy should actually insert the nodes it copies
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:31:24 +0000 (08:31 -0600)] 
xlat_copy should actually insert the nodes it copies

4 years agoRedundant as xlat_exp_alloc_null already sets the pure flag
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

4 years agoImprove xlat_debug by indenting nodes
Arran Cudbard-Bell [Wed, 1 Dec 2021 14:30:11 +0000 (08:30 -0600)] 
Improve xlat_debug by indenting nodes

4 years agoDescend into unresolved xlat functions too
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.

4 years agothe default validity for certificates is 60 days, from
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

4 years ago%(date:...) should return FR_TYPE_DATE
Alan T. DeKok [Wed, 1 Dec 2021 15:40:20 +0000 (10:40 -0500)] 
%(date:...) should return FR_TYPE_DATE

4 years agoRevert "unify pass2_fixup_update_map() and unlang_fixup_map()"
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.

4 years agoRevert "set the default dictionary"
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.

4 years agoFormatting
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:08:16 +0000 (13:08 -0600)] 
Formatting

4 years agoAdd copy functions for tmpls and xlats
Arran Cudbard-Bell [Tue, 30 Nov 2021 19:00:55 +0000 (13:00 -0600)] 
Add copy functions for tmpls and xlats

4 years agoset the default dictionary
Alan T. DeKok [Tue, 30 Nov 2021 17:55:23 +0000 (12:55 -0500)] 
set the default dictionary

4 years agotets are in the RADIUS dictionary
Alan T. DeKok [Tue, 30 Nov 2021 17:11:40 +0000 (12:11 -0500)] 
tets are in the RADIUS dictionary

4 years agoadd map_list_tail
Alan T. DeKok [Tue, 30 Nov 2021 16:18:48 +0000 (11:18 -0500)] 
add map_list_tail

4 years agounify pass2_fixup_update_map() and unlang_fixup_map()
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

4 years agocopy the string values, instead of shallow copies
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.

4 years agoshut up linker complaints on OSX
Alan T. DeKok [Mon, 29 Nov 2021 14:28:25 +0000 (09:28 -0500)] 
shut up linker complaints on OSX

4 years agoallow casts for negative numbers in strings
Alan T. DeKok [Mon, 29 Nov 2021 14:02:19 +0000 (09:02 -0500)] 
allow casts for negative numbers in strings

4 years agodate / time_delta are _signed_ integers
Alan T. DeKok [Mon, 29 Nov 2021 13:50:53 +0000 (08:50 -0500)] 
date / time_delta are _signed_ integers

4 years agoupdate comments
Alan T. DeKok [Mon, 29 Nov 2021 13:43:15 +0000 (08:43 -0500)] 
update comments

4 years agoadd SSLKEYLOGFILE capability
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

4 years agocast RHS, as the types might be different
Alan T. DeKok [Sat, 27 Nov 2021 14:06:47 +0000 (09:06 -0500)] 
cast RHS, as the types might be different

4 years agorename functions and add a few more helper functions
Alan T. DeKok [Thu, 25 Nov 2021 21:30:49 +0000 (16:30 -0500)] 
rename functions and add a few more helper functions