]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 days agomap_to_request expects the value callback to only create the leaf pair
Nick Porter [Tue, 29 Jul 2025 09:43:05 +0000 (10:43 +0100)] 
map_to_request expects the value callback to only create the leaf pair

It does the job of creating any interim structural pairs required

7 days agodon't call shutdown recursively
Alan T. DeKok [Tue, 29 Jul 2025 09:00:23 +0000 (05:00 -0400)] 
don't call shutdown recursively

7 days agoPacify coverity (CID #1660567)
Nick Porter [Tue, 29 Jul 2025 08:14:18 +0000 (09:14 +0100)] 
Pacify coverity (CID #1660567)

7 days agoRemove libpcre references from docs
Nick Porter [Mon, 28 Jul 2025 16:17:28 +0000 (17:17 +0100)] 
Remove libpcre references from docs

7 days agoRemove feature.regex-pcre from tests
Nick Porter [Mon, 28 Jul 2025 16:14:39 +0000 (17:14 +0100)] 
Remove feature.regex-pcre from tests

7 days agoAll supported platforms have libpcre2 available
Nick Porter [Thu, 24 Jul 2025 17:35:31 +0000 (18:35 +0100)] 
All supported platforms have libpcre2 available

So remove libpcre code

7 days agoAll supported .deb platforms have libpcre2
Nick Porter [Thu, 24 Jul 2025 16:40:01 +0000 (17:40 +0100)] 
All supported .deb platforms have libpcre2

8 days agoDon't call fr_bio_shutdown recursively
Arran Cudbard-Bell [Mon, 28 Jul 2025 23:31:17 +0000 (16:31 -0700)] 
Don't call fr_bio_shutdown recursively

8 days agoclose and free on shutdown
Alan T. DeKok [Mon, 28 Jul 2025 19:47:51 +0000 (15:47 -0400)] 
close and free on shutdown

8 days agoadd FR_TYPE_ATTR
Alan T. DeKok [Mon, 28 Jul 2025 19:44:37 +0000 (15:44 -0400)] 
add FR_TYPE_ATTR

no tests.  will do soon.

8 days agono need to check for NULL
Alan T. DeKok [Mon, 28 Jul 2025 12:30:58 +0000 (08:30 -0400)] 
no need to check for NULL

8 days agono need to check for NULL
Alan T. DeKok [Mon, 28 Jul 2025 12:29:26 +0000 (08:29 -0400)] 
no need to check for NULL

8 days agono need to check for NULL as a special case
Alan T. DeKok [Mon, 28 Jul 2025 12:27:59 +0000 (08:27 -0400)] 
no need to check for NULL as a special case

8 days agomight as well allow actions{...} in catch {...}
Alan T. DeKok [Sat, 26 Jul 2025 18:52:08 +0000 (14:52 -0400)] 
might as well allow actions{...} in catch {...}

tho I guess this check should really be a flag in the unlang op
structure.

8 days agomight as well save the result somewhere
Alan T. DeKok [Wed, 23 Jul 2025 07:11:05 +0000 (09:11 +0200)] 
might as well save the result somewhere

9 days agocatch many many more corner cases with 'try'
Alan T. DeKok [Mon, 28 Jul 2025 00:27:42 +0000 (20:27 -0400)] 
catch many many more corner cases with 'try'

if the input compile_ctx has REJECT or RETURN for an action, AND
there's a "try / catch" for it, we do NOT have the try actions
stay "REJECT" or "RETURN"

also change the behavior so catch { ... } means "catch ALL" of the
rcodes.

the error rcodes are special, too :(

9 days agohave "try" cache the "catch" instructions
Alan T. DeKok [Sun, 27 Jul 2025 15:38:38 +0000 (11:38 -0400)] 
have "try" cache the "catch" instructions

and rearrange the code so that we don't have to skip to the next
catch, it just happens automatically in the interpreter

9 days agoremove unused macro
Alan T. DeKok [Sun, 27 Jul 2025 16:39:14 +0000 (12:39 -0400)] 
remove unused macro

9 days agomore initialization, and catch corner cases
Alan T. DeKok [Sun, 27 Jul 2025 16:07:52 +0000 (12:07 -0400)] 
more initialization, and catch corner cases

9 days agomove unlang_t to use dlists
Alan T. DeKok [Sun, 27 Jul 2025 15:06:38 +0000 (11:06 -0400)] 
move unlang_t to use dlists

9 days agoremove unused function ulang_timeout_section_push()
Alan T. DeKok [Sun, 27 Jul 2025 11:36:26 +0000 (07:36 -0400)] 
remove unused function ulang_timeout_section_push()

9 days agouse section_result to refer to results from push_section()
Alan T. DeKok [Mon, 21 Jul 2025 12:09:31 +0000 (14:09 +0200)] 
use section_result to refer to results from push_section()

9 days agouse macro
Alan T. DeKok [Mon, 21 Jul 2025 12:08:57 +0000 (14:08 +0200)] 
use macro

11 days agoUse a dummy eap-sim virtual server for the eap_sim module tests
Arran Cudbard-Bell [Fri, 25 Jul 2025 19:45:44 +0000 (12:45 -0700)] 
Use a dummy eap-sim virtual server for the eap_sim module tests

11 days agoMerge state machines with EAP modules, use virtual_server_t in more places
Arran Cudbard-Bell [Fri, 25 Jul 2025 19:33:55 +0000 (12:33 -0700)] 
Merge state machines with EAP modules, use virtual_server_t in more places

11 days agoRemove unused function
Arran Cudbard-Bell [Fri, 25 Jul 2025 18:31:14 +0000 (11:31 -0700)] 
Remove unused function

11 days agoEnsure process modules in virtual servers have a specific name Closes #5626
Arran Cudbard-Bell [Fri, 25 Jul 2025 18:31:05 +0000 (11:31 -0700)] 
Ensure process modules in virtual servers have a specific name Closes #5626

This stops people using the wrong virtual server with EAP modules

12 days agoTest use of local variable to reference index in map list
Nick Porter [Thu, 24 Jul 2025 13:57:33 +0000 (14:57 +0100)] 
Test use of local variable to reference index in map list

12 days agoDon't dereference output pointer in debug
Nick Porter [Thu, 24 Jul 2025 13:37:52 +0000 (14:37 +0100)] 
Don't dereference output pointer in debug

If `out` points to an integer rather than a char* then dereferencing
does not give another pointer.

12 days agoUse a type handled by FR_TYPE_FROM_PTR
Nick Porter [Thu, 24 Jul 2025 12:43:41 +0000 (13:43 +0100)] 
Use a type handled by FR_TYPE_FROM_PTR

12 days agoTest handling of FR_TYPE_NULL in map list
Nick Porter [Thu, 24 Jul 2025 11:16:08 +0000 (12:16 +0100)] 
Test handling of FR_TYPE_NULL in map list

12 days agoAllow redis xlat to emit FR_TYPE_NULL again
Nick Porter [Thu, 24 Jul 2025 11:15:24 +0000 (12:15 +0100)] 
Allow redis xlat to emit FR_TYPE_NULL again

Now that this can be handled by `map list`

12 days agoAdd basic test of map list
Nick Porter [Thu, 24 Jul 2025 11:32:36 +0000 (12:32 +0100)] 
Add basic test of map list

12 days agoAdd `map list` as a "builtin" map
Nick Porter [Thu, 24 Jul 2025 10:54:00 +0000 (11:54 +0100)] 
Add `map list` as a "builtin" map

12 days agoPacify UBSAN for rlm_tacacs conn_init
Nick Porter [Thu, 24 Jul 2025 10:55:22 +0000 (11:55 +0100)] 
Pacify UBSAN for rlm_tacacs conn_init

12 days agoRemove unused prototype
Nick Porter [Thu, 24 Jul 2025 09:50:17 +0000 (10:50 +0100)] 
Remove unused prototype

2 weeks agoUpdate radhttpcheck.py to use pyrad or pyrad2
Nick Porter [Tue, 22 Jul 2025 17:14:57 +0000 (18:14 +0100)] 
Update radhttpcheck.py to use pyrad or pyrad2

pyrad2 is required if the checks are going to be called from Windows,
but it requires Python >= 3.12 so is not suitable for all Linux hosts.

2 weeks agoMap TACACS reply packet code to module rcode
Nick Porter [Tue, 22 Jul 2025 15:01:30 +0000 (16:01 +0100)] 
Map TACACS reply packet code to module rcode

2 weeks agoCompare received session ID to the one sent
Nick Porter [Tue, 22 Jul 2025 13:30:45 +0000 (14:30 +0100)] 
Compare received session ID to the one sent

h->session_id is only used if the packet did not contain a
Packet->Session-Id attribute.

2 weeks agoCorrect assert on timer being disarmed
Nick Porter [Tue, 22 Jul 2025 13:29:04 +0000 (14:29 +0100)] 
Correct assert on timer being disarmed

2 weeks agoTACACS uses TCP not UDP
Nick Porter [Tue, 22 Jul 2025 10:30:48 +0000 (11:30 +0100)] 
TACACS uses TCP not UDP

so name things appropriately

2 weeks agoPrint correct frame index when reporting frame popping
Arran Cudbard-Bell [Mon, 21 Jul 2025 21:54:59 +0000 (14:54 -0700)] 
Print correct frame index when reporting frame popping

2 weeks agoAllocate a name for the trigger request
Arran Cudbard-Bell [Mon, 21 Jul 2025 21:38:55 +0000 (14:38 -0700)] 
Allocate a name for the trigger request

2 weeks agorequest->priority and request->sequence are no longer just used by the IO code, and...
Arran Cudbard-Bell [Mon, 21 Jul 2025 21:38:29 +0000 (14:38 -0700)] 
request->priority and request->sequence are no longer just used by the IO code, and should be a structure that's always allocated i.e. the request_t

2 weeks agoFix trigger plumbing in connection.c
Arran Cudbard-Bell [Mon, 21 Jul 2025 20:52:51 +0000 (13:52 -0700)] 
Fix trigger plumbing in connection.c

2 weeks agotmpl_push should take an argument saying whether it's a top frame
Arran Cudbard-Bell [Mon, 21 Jul 2025 15:02:54 +0000 (08:02 -0700)] 
tmpl_push should take an argument saying whether it's a top frame

2 weeks agoNo need to call fr_network_listen_delete here
Nick Porter [Mon, 21 Jul 2025 14:23:55 +0000 (15:23 +0100)] 
No need to call fr_network_listen_delete here

It only looks up the socket and calls fr_network_socket_dead, but the
socket likely has already been removed from the tree of sockets by the
socket talloc destructor - which is what is calling mod_close

2 weeks agostore the result somewhere
Alan T. DeKok [Mon, 21 Jul 2025 10:18:18 +0000 (12:18 +0200)] 
store the result somewhere

2 weeks agoit helps to check the result of an xlat
Alan T. DeKok [Mon, 21 Jul 2025 08:27:04 +0000 (10:27 +0200)] 
it helps to check the result of an xlat

except that this error check never catches an error, because
something in the interpreter isn't passing the results back to
us.

2 weeks agopush a function before running the trigger
Alan T. DeKok [Mon, 21 Jul 2025 07:45:30 +0000 (09:45 +0200)] 
push a function before running the trigger

the interpreter needs the stack to be bootstrapped with a function
or module that is something other than a tmpl.  The tmpl expects
to be a sub frame.

Without this, the trigger subrequest never runs anything after the
first instruction

2 weeks agodon't append output book on failure
Alan T. DeKok [Mon, 21 Jul 2025 07:40:03 +0000 (09:40 +0200)] 
don't append output book on failure

2 weeks agoallow non-operators for "limit" and "timeout", too
Alan T. DeKok [Sun, 20 Jul 2025 12:45:32 +0000 (14:45 +0200)] 
allow non-operators for "limit" and "timeout", too

2 weeks agouse macros for consistency with the rest of the code
Alan T. DeKok [Sat, 19 Jul 2025 00:03:19 +0000 (20:03 -0400)] 
use macros for consistency with the rest of the code

2 weeks agorename fields for consistency with the rest of the code
Alan T. DeKok [Sat, 19 Jul 2025 00:01:18 +0000 (20:01 -0400)] 
rename fields for consistency with the rest of the code

2 weeks agoset priority, too.
Alan T. DeKok [Fri, 18 Jul 2025 18:35:32 +0000 (14:35 -0400)] 
set priority, too.

instead of having it left over from the previous instruction

2 weeks agoDon't add FR_TYPE_NULL boxes to xlat output
Nick Porter [Fri, 18 Jul 2025 13:53:04 +0000 (14:53 +0100)] 
Don't add FR_TYPE_NULL boxes to xlat output

They currently can't be cast to anything so cause issues when assigning
to a target attribute

2 weeks agoRemove meaningless debug
Nick Porter [Fri, 18 Jul 2025 13:45:40 +0000 (14:45 +0100)] 
Remove meaningless debug

2 weeks agoSimplify trigger handling.
Arran Cudbard-Bell [Fri, 18 Jul 2025 16:20:26 +0000 (10:20 -0600)] 
Simplify trigger handling.

Remove trigger xlat, we just use the request like.

Use tmpl_afrom_substr instead of custom parsing logic.

2 weeks agoInitialise triggers later, move trigger name into an attribute to make serialisation...
Arran Cudbard-Bell [Fri, 18 Jul 2025 15:40:48 +0000 (09:40 -0600)] 
Initialise triggers later, move trigger name into an attribute to make serialisation easier

2 weeks agoadd %test.null() which always returns a value box of FR_TYPE_NULL
Alan T. DeKok [Fri, 18 Jul 2025 14:11:14 +0000 (10:11 -0400)] 
add %test.null() which always returns a value box of FR_TYPE_NULL

2 weeks agoRevert "slight tweaks"
Alan T. DeKok [Fri, 18 Jul 2025 11:00:12 +0000 (07:00 -0400)] 
Revert "slight tweaks"

This reverts commit 8f2845ebe9feeb010c086ac20fc329e44104ea95.

2 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar
github-actions[bot] [Fri, 18 Jul 2025 04:40:08 +0000 (04:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar

2 weeks agoScheduled fuzzing: Update src/tests/fuzzer-corpus/der.tar
github-actions[bot] [Fri, 18 Jul 2025 04:39:04 +0000 (04:39 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/der.tar

2 weeks agoslight tweaks
Alan T. DeKok [Thu, 17 Jul 2025 17:15:18 +0000 (13:15 -0400)] 
slight tweaks

2 weeks agouse macro for common case
Alan T. DeKok [Thu, 17 Jul 2025 16:56:09 +0000 (12:56 -0400)] 
use macro for common case

some instructions didn't return on timeout.  So using a common
initializer is beneficial

2 weeks agoActually run on our runners
Arran Cudbard-Bell [Thu, 17 Jul 2025 19:11:24 +0000 (13:11 -0600)] 
Actually run on our runners

2 weeks agoAttempt to move sanitizers to local infrastructure
Arran Cudbard-Bell [Thu, 17 Jul 2025 17:41:53 +0000 (11:41 -0600)] 
Attempt to move sanitizers to local infrastructure

2 weeks agoFix typos and bad docs
Arran Cudbard-Bell [Thu, 17 Jul 2025 15:55:05 +0000 (09:55 -0600)] 
Fix typos and bad docs

2 weeks agodon't assert on FR_TYPE_NULL
Alan T. DeKok [Thu, 17 Jul 2025 11:36:46 +0000 (07:36 -0400)] 
don't assert on FR_TYPE_NULL

in preparation for allowing it as a real type

2 weeks agoAdd additional file check flags
Arran Cudbard-Bell [Thu, 17 Jul 2025 02:19:55 +0000 (20:19 -0600)] 
Add additional file check flags

Add specific flag for unix sockets

2 weeks agomust always check the return code of fr_value_box_cast
Alan T. DeKok [Wed, 16 Jul 2025 19:31:30 +0000 (15:31 -0400)] 
must always check the return code of fr_value_box_cast

2 weeks agoadd test of "last loop returns the rcode"
Alan T. DeKok [Wed, 16 Jul 2025 19:21:42 +0000 (15:21 -0400)] 
add test of "last loop returns the rcode"

2 weeks agouse consistent names
Alan T. DeKok [Wed, 16 Jul 2025 11:22:29 +0000 (07:22 -0400)] 
use consistent names

$ git grep -w result_p  | wc -l
      42
$ git grep -w p_result  | wc -l
     860

2 weeks agomove MOD_ACTION_NOT_SET --> 0
Alan T. DeKok [Tue, 15 Jul 2025 18:45:03 +0000 (14:45 -0400)] 
move MOD_ACTION_NOT_SET --> 0

add macros for valid values.  sprinkle assertions throughout the
code.  Move the action names to a fixed-size array.  Update the
printing to print out the names in all cases (not the numbers)

2 weeks agoallow ::enum for 'case' statements
Alan T. DeKok [Wed, 16 Jul 2025 10:40:54 +0000 (06:40 -0400)] 
allow ::enum for 'case' statements

2 weeks agoCorrect docs on rlm_radius return codes
Nick Porter [Wed, 16 Jul 2025 10:23:02 +0000 (11:23 +0100)] 
Correct docs on rlm_radius return codes

3 weeks agocorrect behavior of parallel
Alan T. DeKok [Tue, 15 Jul 2025 15:36:31 +0000 (11:36 -0400)] 
correct behavior of parallel

it helps to actually set p_result when pushing the child.

Then, update the tests to match the documented behavior.

3 weeks agoit helps to track the child result
Alan T. DeKok [Tue, 15 Jul 2025 14:48:14 +0000 (10:48 -0400)] 
it helps to track the child result

3 weeks agouse macros for priorities, not hard-coded numbers
Alan T. DeKok [Tue, 15 Jul 2025 14:47:12 +0000 (10:47 -0400)] 
use macros for priorities, not hard-coded numbers

this helps with transitioning the actual values

3 weeks agogive expr.rcode() a better name: interpreter.rcode()
Alan T. DeKok [Tue, 15 Jul 2025 13:05:10 +0000 (09:05 -0400)] 
give expr.rcode() a better name: interpreter.rcode()

the old one is still around for compatibility reasons

3 weeks agoprint rcode if we don't get passed options
Alan T. DeKok [Tue, 15 Jul 2025 13:04:08 +0000 (09:04 -0400)] 
print rcode if we don't get passed options

3 weeks agoSimplify call_env expanding
Nick Porter [Tue, 15 Jul 2025 12:39:18 +0000 (13:39 +0100)] 
Simplify call_env expanding

Pointers to source tmpls are always set in call_env_expand_start, so
don't need handling in call_env_expand_repeat.

Parse only envs are never pushed as tmpls, so will never be processed in
call_env_expand_repeat.

3 weeks agoIf a tmpl is data, no need to push it for evaluation
Nick Porter [Tue, 15 Jul 2025 11:34:25 +0000 (12:34 +0100)] 
If a tmpl is data, no need to push it for evaluation

3 weeks agouse macro to set p_result
Alan T. DeKok [Tue, 15 Jul 2025 10:23:40 +0000 (06:23 -0400)] 
use macro to set p_result

which lets us initialize the structure with the correct values

3 weeks agoUse netlink API to insert ARP entries on FreeBSD
Nick Porter [Tue, 15 Jul 2025 09:54:19 +0000 (10:54 +0100)] 
Use netlink API to insert ARP entries on FreeBSD

Comparable to how FreeBSD's arp command adds entries using netlink.

3 weeks agoSet the request->rcode to the default section rcode when we enter a section
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:13:07 +0000 (23:13 -0600)] 
Set the request->rcode to the default section rcode when we enter a section

3 weeks agoDefault rcode is now noop
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:12:23 +0000 (23:12 -0600)] 
Default rcode is now noop

3 weeks agoSync up perl return codes with server return codes
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:12:09 +0000 (23:12 -0600)] 
Sync up perl return codes with server return codes

3 weeks agoadd signal.raise("break"), this lets us stop the program after an unlang keyword...
Arran Cudbard-Bell [Tue, 15 Jul 2025 04:16:12 +0000 (22:16 -0600)] 
add signal.raise("break"), this lets us stop the program after an unlang keyword executes, which makes it easier to debug certain issues

3 weeks agoRLM_MODULE_NOT_SET=0 so that zeroed memory is invalid.
Arran Cudbard-Bell [Tue, 15 Jul 2025 05:14:00 +0000 (23:14 -0600)] 
RLM_MODULE_NOT_SET=0 so that zeroed memory is invalid.

3 weeks agouse macro to initialize struct with UNLANG_RESULT_NOT_SET
Alan T. DeKok [Mon, 14 Jul 2025 20:54:57 +0000 (16:54 -0400)] 
use macro to initialize struct with UNLANG_RESULT_NOT_SET

3 weeks agoMake the compound literal part of the macro
Arran Cudbard-Bell [Tue, 15 Jul 2025 03:27:38 +0000 (21:27 -0600)] 
Make the compound literal part of the macro

3 weeks agoThe result of the interpret should be the result_p of the frame not the section_result
Arran Cudbard-Bell [Tue, 15 Jul 2025 02:50:51 +0000 (20:50 -0600)] 
The result of the interpret should be the result_p of the frame not the section_result

This caused synchronous evaluation of xlats to return reject

3 weeks agomove redundant to its own function
Alan T. DeKok [Fri, 11 Jul 2025 23:05:05 +0000 (19:05 -0400)] 
move redundant to its own function

it's not really a group.  Instead, it should share the redundancy
functionality of redundant-load-balance

3 weeks agoRemove unused function
Arran Cudbard-Bell [Tue, 15 Jul 2025 01:14:38 +0000 (19:14 -0600)] 
Remove unused function

3 weeks agorun dsymutil if we have it and libbacktrace
Alan T. DeKok [Mon, 14 Jul 2025 13:29:04 +0000 (09:29 -0400)] 
run dsymutil if we have it and libbacktrace

3 weeks agoThe pid file may reference a process that doesn't exist
Nick Porter [Mon, 14 Jul 2025 08:14:43 +0000 (09:14 +0100)] 
The pid file may reference a process that doesn't exist

3 weeks agoadd p_result to unlang_tmpl_push()
Alan T. DeKok [Thu, 10 Jul 2025 19:35:06 +0000 (15:35 -0400)] 
add p_result to unlang_tmpl_push()

3 weeks agoRegression test for internal encoder
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:22:00 +0000 (18:22 -0600)] 
Regression test for internal encoder

3 weeks agoAdd support for libbacktrace
Arran Cudbard-Bell [Mon, 14 Jul 2025 00:21:41 +0000 (18:21 -0600)] 
Add support for libbacktrace