]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
14 months agoParent nested list events from the nested list
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:14 +0000 (23:45 -0600)] 
Parent nested list events from the nested list

14 months agoAdd out of order inserts test
Arran Cudbard-Bell [Fri, 28 Mar 2025 04:32:32 +0000 (22:32 -0600)] 
Add out of order inserts test

14 months agore-enable regex escape
Alan T. DeKok [Fri, 28 Mar 2025 17:30:25 +0000 (13:30 -0400)] 
re-enable regex escape

14 months agoremove last vestiges of tmpl_attr_prefix_t
Alan T. DeKok [Fri, 28 Mar 2025 17:00:55 +0000 (13:00 -0400)] 
remove last vestiges of tmpl_attr_prefix_t

14 months agoremove all references to tmpl_attr_prefix
Alan T. DeKok [Fri, 28 Mar 2025 15:08:07 +0000 (11:08 -0400)] 
remove all references to tmpl_attr_prefix

14 months agoignore prefix flags when parsing attributes
Alan T. DeKok [Fri, 28 Mar 2025 14:23:18 +0000 (10:23 -0400)] 
ignore prefix flags when parsing attributes

14 months agoremove prefix flag from tmpl print routines
Alan T. DeKok [Fri, 28 Mar 2025 14:08:45 +0000 (10:08 -0400)] 
remove prefix flag from tmpl print routines

14 months agoalways parse the LHS of a map as an attribute
Alan T. DeKok [Fri, 28 Mar 2025 14:03:04 +0000 (10:03 -0400)] 
always parse the LHS of a map as an attribute

14 months agolet the tmpl code decide if it's an attribute or a value
Alan T. DeKok [Fri, 28 Mar 2025 13:45:52 +0000 (09:45 -0400)] 
let the tmpl code decide if it's an attribute or a value

14 months agomove to prefix AUTO
Alan T. DeKok [Thu, 27 Mar 2025 20:40:30 +0000 (16:40 -0400)] 
move to prefix AUTO

14 months agomark unsafe attributes as SAFE_FOR_NONE
Alan T. DeKok [Wed, 26 Mar 2025 20:56:32 +0000 (16:56 -0400)] 
mark unsafe attributes as SAFE_FOR_NONE

no matter where they come from.  This catches SQL and the files
module.  The usersfile code sets SAFE_FOR_ANY, but that is then
over-ridden with da->flags.unsafe.  If we later want to make the
SQL module default to SAFE_FOR_ANY, we can make that change
without affecting the security of Cleartext-Password

Assert that creating pairs from random strings always results in
the output value box being unsafe for anything

14 months agoadd unsafe to dict_attr_flags_t
Alan T. DeKok [Wed, 26 Mar 2025 20:10:56 +0000 (16:10 -0400)] 
add unsafe to dict_attr_flags_t

which is mainly for Password.Cleartext.  That is user-supplied
input, and is unsafe no matter where it comes from.

14 months agoRedis MOVED reply is not an error
Nick Porter [Thu, 27 Mar 2025 19:46:55 +0000 (19:46 +0000)] 
Redis MOVED reply is not an error

14 months agoAdd more tests
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:50 +0000 (20:34 -0600)] 
Add more tests

14 months agoTypos
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:41 +0000 (20:34 -0600)] 
Typos

14 months agoCheck result of disarming the child
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:35 +0000 (20:34 -0600)] 
Check result of disarming the child

14 months agoSupport calling fr_timer_run within an event
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:33:52 +0000 (20:33 -0600)] 
Support calling fr_timer_run within an event

14 months agoHave to use O(N) move for inserting deffered events
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:33:34 +0000 (20:33 -0600)] 
Have to use O(N) move for inserting deffered events

14 months agoBasic timer tests
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:16:01 +0000 (13:16 -0600)] 
Basic timer tests

14 months agoUse a separate field for tracking the timer event's position in the ordered list
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:15:14 +0000 (13:15 -0600)] 
Use a separate field for tracking the timer event's position in the ordered list

14 months agoDo more talloc checks on timer chunks
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:14:47 +0000 (13:14 -0600)] 
Do more talloc checks on timer chunks

14 months agoWhitespace fixes
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:14:21 +0000 (13:14 -0600)] 
Whitespace fixes

14 months agorely on fr_value_box_is_safe_for() rather then checking safe_for value
Alan T. DeKok [Thu, 27 Mar 2025 18:52:49 +0000 (14:52 -0400)] 
rely on fr_value_box_is_safe_for() rather then checking safe_for value

14 months agoremove unnecessary assignment
Alan T. DeKok [Thu, 27 Mar 2025 18:24:26 +0000 (14:24 -0400)] 
remove unnecessary assignment

14 months agoadd and use FR_VALUE_BOX_SAFE_FOR_ANY
Alan T. DeKok [Mon, 10 Mar 2025 12:31:03 +0000 (08:31 -0400)] 
add and use FR_VALUE_BOX_SAFE_FOR_ANY

which lets us *not* escape data which is taken from the
configuration files

disable the regex escape test for now.  We don't want a regex.safe()
function.  We want a "escape this string, even tho it's value is safe"
function

14 months agoIf redis returns an array keep the values separate
Nick Porter [Thu, 27 Mar 2025 16:59:01 +0000 (16:59 +0000)] 
If redis returns an array keep the values separate

If the xlat just returns a FR_TYPE_GROUP, then the values get smushed
together before being assigned to the LHS of an assignment.

14 months agoYet more UBSAN issues
Arran Cudbard-Bell [Thu, 27 Mar 2025 14:41:58 +0000 (08:41 -0600)] 
Yet more UBSAN issues

14 months agoQuiet more ubsan issues
Arran Cudbard-Bell [Thu, 27 Mar 2025 13:48:27 +0000 (07:48 -0600)] 
Quiet more ubsan issues

14 months agoQuiet ubsan when calling PID event callbacks
Arran Cudbard-Bell [Wed, 26 Mar 2025 01:21:45 +0000 (19:21 -0600)] 
Quiet ubsan when calling PID event callbacks

14 months agoFall back to global rate limiting if there's no thread instance
Arran Cudbard-Bell [Thu, 27 Mar 2025 00:49:22 +0000 (18:49 -0600)] 
Fall back to global rate limiting if there's no thread instance

14 months agoRemember if we opened the fp referring to the file we're processing
Arran Cudbard-Bell [Thu, 27 Mar 2025 00:49:07 +0000 (18:49 -0600)] 
Remember if we opened the fp referring to the file we're processing

Mostly to quiet clang analyzer

14 months agoBreak out of the file processing loop when we reach EOF a file we're skipping
Arran Cudbard-Bell [Thu, 27 Mar 2025 00:48:38 +0000 (18:48 -0600)] 
Break out of the file processing loop when we reach EOF a file we're skipping

14 months agoNew nested timer system that avoids constantly reallocating timer memory
Arran Cudbard-Bell [Wed, 26 Mar 2025 01:21:45 +0000 (19:21 -0600)] 
New nested timer system that avoids constantly reallocating timer memory

14 months agoMake more "failed to define client" messages, errors, and write them rate limited...
Arran Cudbard-Bell [Mon, 10 Feb 2025 20:33:47 +0000 (13:33 -0700)] 
Make more "failed to define client" messages, errors, and write them rate limited to the global log

Print messages about ignoring clients by default

...add toggle to turn this off for servers facing the internet

14 months agoComplain loudly when injecting packets, or stopping threads errors
Arran Cudbard-Bell [Mon, 10 Feb 2025 20:31:05 +0000 (13:31 -0700)] 
Complain loudly when injecting packets, or stopping threads errors

This is usually symptomatic of something else going wrong, and it's useful to have the errors

14 months agothe LHS of this map is always an attribute
Alan T. DeKok [Wed, 26 Mar 2025 21:01:21 +0000 (17:01 -0400)] 
the LHS of this map is always an attribute

which is enforced, but then later code also checks if the LHS is
an attribute.  So remove the duplicate checks

14 months agouse unlang features rather than in-line bash scripts
Alan T. DeKok [Wed, 26 Mar 2025 19:01:51 +0000 (15:01 -0400)] 
use unlang features rather than in-line bash scripts

as part of getting rid of back-ticks

14 months agoremove & from configuration files in src/tests
Alan T. DeKok [Wed, 26 Mar 2025 15:58:40 +0000 (11:58 -0400)] 
remove & from configuration files in src/tests

largely via Perl auto-replacements, with only a few manual changes

14 months agoremove & from antora docs
Alan T. DeKok [Wed, 26 Mar 2025 16:04:27 +0000 (12:04 -0400)] 
remove & from antora docs

14 months agoremove &
Alan T. DeKok [Wed, 26 Mar 2025 16:01:54 +0000 (12:01 -0400)] 
remove &

14 months agoremove more require_enum_prefix migration flags
Alan T. DeKok [Wed, 26 Mar 2025 15:10:34 +0000 (11:10 -0400)] 
remove more require_enum_prefix migration flags

14 months agoremove migration flag
Alan T. DeKok [Wed, 26 Mar 2025 15:09:59 +0000 (11:09 -0400)] 
remove migration flag

14 months agoremove "&" from example module config
Alan T. DeKok [Wed, 26 Mar 2025 15:08:11 +0000 (11:08 -0400)] 
remove "&" from example module config

14 months agoremove tmpl_require_enum_prefix
Alan T. DeKok [Wed, 26 Mar 2025 14:45:15 +0000 (10:45 -0400)] 
remove tmpl_require_enum_prefix

it's now the default, and can't be turned off

14 months agouse new :: syntax for enums
Alan T. DeKok [Wed, 26 Mar 2025 11:45:53 +0000 (07:45 -0400)] 
use new :: syntax for enums

14 months agofix map resolution
Alan T. DeKok [Wed, 26 Mar 2025 11:39:09 +0000 (07:39 -0400)] 
fix map resolution

the RHS of a map is NOT resolved in the context of the LHS.
Instead, the RHS is really a pointer to a value.  And the final
value is then resolved in the context of the LHS.

14 months agoonly cast leaf elements
Alan T. DeKok [Wed, 26 Mar 2025 10:09:22 +0000 (06:09 -0400)] 
only cast leaf elements

14 months agomake xlat_func_bare_words=no the default
Alan T. DeKok [Tue, 25 Mar 2025 18:31:45 +0000 (14:31 -0400)] 
make xlat_func_bare_words=no the default

so function arguments can now be full expressions

14 months agoAdd OS specific install/build instructions
nolade [Wed, 19 Mar 2025 22:33:16 +0000 (18:33 -0400)] 
Add OS specific install/build instructions

14 months agoshut up coverity
Alan T. DeKok [Tue, 25 Mar 2025 12:17:31 +0000 (08:17 -0400)] 
shut up coverity

14 months agoallow casts for switch statements
Alan T. DeKok [Mon, 24 Mar 2025 12:18:38 +0000 (14:18 +0200)] 
allow casts for switch statements

because it seems obvious to use it

14 months agorespect casting in tmpl_to_atype()
Alan T. DeKok [Mon, 24 Mar 2025 12:04:40 +0000 (14:04 +0200)] 
respect casting in tmpl_to_atype()

the output might be a value-box, but it should have the data type
specified by the tmpl, and not by the input data

14 months agofunctions to determine data type of tmpls and xlats
Alan T. DeKok [Mon, 24 Mar 2025 11:25:11 +0000 (13:25 +0200)] 
functions to determine data type of tmpls and xlats

it's not perfect, but it helps simplify oether parts of the code.

Use it when compiling "foreach" and "switch"

14 months agodon't assume that the xlat outputs are string
Alan T. DeKok [Mon, 24 Mar 2025 11:04:51 +0000 (13:04 +0200)] 
don't assume that the xlat outputs are string

they could be something else.  We never noticed before because
the rest of the code just mashed all of the switch keys to string,
too.

Now that we're a bit smarter, we can automatically determine the
data types for xlat functions.  So the key expansion for switch
statements should always cast to value_box, and not to string

14 months agoswitch keys cannot be unresolved
Alan T. DeKok [Mon, 24 Mar 2025 10:28:37 +0000 (12:28 +0200)] 
switch keys cannot be unresolved

14 months agotmpl_expand() is never passed an escape function
Alan T. DeKok [Mon, 24 Mar 2025 09:57:26 +0000 (11:57 +0200)] 
tmpl_expand() is never passed an escape function

so we remove it from the function arguments.

The callers need to be sure that the resulting data is used in a
safe way.  Which means that it's used as-is for a key lookup, or
it is hashed.

14 months agotmpl_aexpand() type doesn't need escape functions
Alan T. DeKok [Mon, 24 Mar 2025 09:32:39 +0000 (11:32 +0200)] 
tmpl_aexpand() type doesn't need escape functions

the only two callers didn't pass it, and the output data is only
used for key comparisons (csv) or for delays (delay)

We also cap delays, so that they are not crazy :(

14 months agoAdd htrie driver to sample rlm_cache module config
Nick Porter [Tue, 25 Mar 2025 09:50:02 +0000 (09:50 +0000)] 
Add htrie driver to sample rlm_cache module config

14 months agoAdd rlm_cache_htrie.so to RHEL packaging
Nick Porter [Tue, 25 Mar 2025 09:48:22 +0000 (09:48 +0000)] 
Add rlm_cache_htrie.so to RHEL packaging

14 months agoAdd test of rlm_cache htrie driver
Nick Porter [Tue, 25 Mar 2025 09:32:00 +0000 (09:32 +0000)] 
Add test of rlm_cache htrie driver

14 months agoBuild rlm_cache_htrie
Nick Porter [Tue, 25 Mar 2025 09:31:02 +0000 (09:31 +0000)] 
Build rlm_cache_htrie

14 months agoCache key data can be fixed length when the driver is htrie
Nick Porter [Tue, 25 Mar 2025 09:28:09 +0000 (09:28 +0000)] 
Cache key data can be fixed length when the driver is htrie

14 months agoUse wrapper function to align signatures
Nick Porter [Tue, 25 Mar 2025 09:26:55 +0000 (09:26 +0000)] 
Use wrapper function to align signatures

UBSAN analysis throws an error with the function signature difference
between `fr_cmp_t` and `fr_value_box_cmp`

14 months agoHandle un-used rlm_cache instances using htrie driver
Nick Porter [Tue, 25 Mar 2025 09:22:29 +0000 (09:22 +0000)] 
Handle un-used rlm_cache instances using htrie driver

When a module instance using the htrie driver is not used in policy, and
has it's type set to `auto`, it will still have htype FR_HTRIE_AUTO when
the module is instantiated.

In this case, exit driver instantiation early.

14 months agoMove mutable instance data to separate structure
Nick Porter [Mon, 24 Mar 2025 20:41:47 +0000 (20:41 +0000)] 
Move mutable instance data to separate structure

As instance data is now protected after instantiation

14 months agoUse correct itterator to free htrie cache
Nick Porter [Mon, 24 Mar 2025 20:29:18 +0000 (20:29 +0000)] 
Use correct itterator to free htrie cache

14 months agoFix up parsing of key types for rlm_cache_htrie
Nick Porter [Mon, 24 Mar 2025 20:28:56 +0000 (20:28 +0000)] 
Fix up parsing of key types for rlm_cache_htrie

14 months agoCorrect function signature for cache_key_parse
Nick Porter [Mon, 24 Mar 2025 20:27:47 +0000 (20:27 +0000)] 
Correct function signature for cache_key_parse

15 months agomove file to the dictionary directory
Alan T. DeKok [Mon, 24 Mar 2025 05:08:53 +0000 (07:08 +0200)] 
move file to the dictionary directory

where it makes a bit more sense

15 months agoallow wildcards in xlat_tokenize_attribute()
Alan T. DeKok [Sun, 23 Mar 2025 14:36:20 +0000 (16:36 +0200)] 
allow wildcards in xlat_tokenize_attribute()

because we no longer always allow unknowns

15 months agomost of the v3 -> v4 alias maps
Alan T. DeKok [Sat, 22 Mar 2025 08:15:51 +0000 (15:15 +0700)] 
most of the v3 -> v4 alias maps

./build/make/jlibtool --mode=execute ./build/bin/local/radict -D ./share/dictionary -p radius -A | sort > scripts/upgrade/alias.txt

And update the script so that it reads this file, and does some
additional rewriting

&foo -> foo
request: --> request.

etc.

15 months agoadd export of aliases to radict
Alan T. DeKok [Sat, 22 Mar 2025 08:08:11 +0000 (15:08 +0700)] 
add export of aliases to radict

15 months agoadd function to export aliases
Alan T. DeKok [Sat, 22 Mar 2025 08:07:16 +0000 (15:07 +0700)] 
add function to export aliases

15 months agoclean uo and merge from v3.2.x
Alan T. DeKok [Sat, 22 Mar 2025 08:04:43 +0000 (15:04 +0700)] 
clean uo and merge from v3.2.x

and ensure that almost all of the aliases work.

15 months agodon't use FR_FAULT_LOG for debugging
Alan T. DeKok [Sat, 22 Mar 2025 06:30:36 +0000 (13:30 +0700)] 
don't use FR_FAULT_LOG for debugging

FILE* is a little more friendly

15 months agominor rearrangements
Alan T. DeKok [Sat, 22 Mar 2025 06:05:32 +0000 (13:05 +0700)] 
minor rearrangements

15 months agohoist regex checks to tokenize expression
Alan T. DeKok [Fri, 21 Mar 2025 08:30:14 +0000 (15:30 +0700)] 
hoist regex checks to tokenize expression

15 months agoclean up tokenize regex
Alan T. DeKok [Fri, 21 Mar 2025 08:15:53 +0000 (15:15 +0700)] 
clean up tokenize regex

in preparation for unifying the code

15 months agoremove "%{...}" wrappers
Alan T. DeKok [Fri, 21 Mar 2025 03:24:02 +0000 (10:24 +0700)] 
remove "%{...}" wrappers

15 months agoadd commas after list
Alan T. DeKok [Thu, 20 Mar 2025 10:19:10 +0000 (17:19 +0700)] 
add commas after list

arguably this should be required.

15 months agoupdate comments
Alan T. DeKok [Thu, 20 Mar 2025 10:17:30 +0000 (17:17 +0700)] 
update comments

15 months agoCorrect error message arguments
Nick Porter [Thu, 20 Mar 2025 11:43:59 +0000 (11:43 +0000)] 
Correct error message arguments

15 months agoremove old foreach, along with XLAT_VIRTUAL
Alan T. DeKok [Thu, 20 Mar 2025 10:06:33 +0000 (17:06 +0700)] 
remove old foreach, along with XLAT_VIRTUAL

15 months agoremove old "foreach" syntax and update documentation
Alan T. DeKok [Thu, 20 Mar 2025 06:35:30 +0000 (13:35 +0700)] 
remove old "foreach" syntax and update documentation

15 months agoadd more tests and clean up foreach assert
Alan T. DeKok [Thu, 20 Mar 2025 04:52:28 +0000 (11:52 +0700)] 
add more tests and clean up foreach assert

15 months agoremove debug text
Alan T. DeKok [Thu, 20 Mar 2025 04:25:27 +0000 (11:25 +0700)] 
remove debug text

15 months agoAdd box to list after it's been populated
Nick Porter [Thu, 20 Mar 2025 09:07:53 +0000 (09:07 +0000)] 
Add box to list after it's been populated

fr_redis_reply_to_value_box calls fr_value_box_init once the type is
known - which resets list membership pointers.

15 months agotry to quiet coverity
Alan T. DeKok [Thu, 20 Mar 2025 02:34:24 +0000 (09:34 +0700)] 
try to quiet coverity

15 months agoallow index in addition to path
Alan T. DeKok [Wed, 19 Mar 2025 12:34:15 +0000 (19:34 +0700)] 
allow index in addition to path

15 months agoswitch to using new syntax
Alan T. DeKok [Wed, 19 Mar 2025 11:37:33 +0000 (18:37 +0700)] 
switch to using new syntax

15 months agoremove old foreach, and use %range()
Alan T. DeKok [Wed, 19 Mar 2025 11:23:27 +0000 (18:23 +0700)] 
remove old foreach, and use %range()

15 months agoremove XLAT_VIRTUAL_UNRESOLVED
Alan T. DeKok [Wed, 19 Mar 2025 11:04:50 +0000 (18:04 +0700)] 
remove XLAT_VIRTUAL_UNRESOLVED

it hasn't been needed for a while.  The only XLAT_VIRTUAL is
Foreach-Variable-*, and that's going away soon.

15 months agowhitespace
Alan T. DeKok [Wed, 19 Mar 2025 10:59:34 +0000 (17:59 +0700)] 
whitespace

15 months agoremove unused functions
Alan T. DeKok [Wed, 19 Mar 2025 10:56:20 +0000 (17:56 +0700)] 
remove unused functions

15 months agouse new syntax in foreach
Alan T. DeKok [Wed, 19 Mar 2025 10:33:44 +0000 (17:33 +0700)] 
use new syntax in foreach

15 months agoautomatically determine data types for xlat functions
Alan T. DeKok [Wed, 19 Mar 2025 06:36:14 +0000 (13:36 +0700)] 
automatically determine data types for xlat functions

and add range test which uses it, and the new %range() function

15 months agoadd %range(). Documentation TBD
Alan T. DeKok [Wed, 19 Mar 2025 06:04:51 +0000 (13:04 +0700)] 
add %range().  Documentation TBD

15 months agoprint out data types, too
Alan T. DeKok [Wed, 19 Mar 2025 06:00:52 +0000 (13:00 +0700)] 
print out data types, too

15 months agoremove Foreach-Variable
Alan T. DeKok [Wed, 19 Mar 2025 05:25:04 +0000 (12:25 +0700)] 
remove Foreach-Variable

15 months agoupdate to use new syntax
Alan T. DeKok [Wed, 19 Mar 2025 04:38:47 +0000 (11:38 +0700)] 
update to use new syntax

and to note that we can't delete things while we're looping
over them.  We may relax that restriction later