]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 months agoremove migration flag
Alan T. DeKok [Wed, 26 Mar 2025 15:09:59 +0000 (11:09 -0400)] 
remove migration flag

4 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

4 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

4 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

4 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.

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

4 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

4 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

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

4 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

4 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

4 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"

4 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

4 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

4 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.

4 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 :(

4 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

4 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

4 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

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

4 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

4 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`

4 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.

4 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

4 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

4 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

4 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

4 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

5 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

5 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.

5 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

5 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

5 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.

5 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

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

5 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

5 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

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

5 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.

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

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

5 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

5 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

5 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

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

5 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.

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

5 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

5 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

5 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()

5 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.

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

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

5 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

5 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

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

5 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

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

5 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

5 months agoremove local variables back to front
Alan T. DeKok [Wed, 19 Mar 2025 04:31:37 +0000 (11:31 +0700)] 
remove local variables back to front

and update tests, which now pass

5 months agomove to new functionality, mostly.
Alan T. DeKok [Tue, 18 Mar 2025 15:24:35 +0000 (22:24 +0700)] 
move to new functionality, mostly.

and go back to "deleting edit things is an ignore, not an error"
too many tests needed to change, and it doesn't seem to be worth
it.

Some keyword tests haven't been updated.  It's currently not
possible to loop over children of a list, when the children are of
different types.  Perhaps the solution there could be to use "void"
for the type?  So it doesn't create a local attribute for the
value.

the nested foreach doesn't work, as the nested local variable doesn't
change value.  Perhaps it isn't being deleted when the inner loop
exits

5 months agoclear cursor before exiting
Alan T. DeKok [Wed, 19 Mar 2025 02:42:09 +0000 (09:42 +0700)] 
clear cursor before exiting

5 months agopush checks for vp_edit and immutable down to edit list
Alan T. DeKok [Tue, 18 Mar 2025 13:45:27 +0000 (20:45 +0700)] 
push checks for vp_edit and immutable down to edit list

where they are caught more often.

and update test.  it's a failure to delete an attribute which
can't be deleted.  So the attempt has to be in a try / catch
block

5 months agomove to new syntax
Alan T. DeKok [Tue, 18 Mar 2025 09:31:47 +0000 (16:31 +0700)] 
move to new syntax

and fix crash on nothing to loop over

5 months agoallow 100 chars
Alan T. DeKok [Tue, 18 Mar 2025 08:15:15 +0000 (15:15 +0700)] 
allow 100 chars

5 months agoPacify coverity (CID #1644853, #1644852, #1644851, #1644850, #1644849)
Nick Porter [Tue, 18 Mar 2025 08:03:52 +0000 (08:03 +0000)] 
Pacify coverity (CID #1644853, #1644852, #1644851, #1644850, #1644849)

5 months agoupdate messages and fix coverity issues
Alan T. DeKok [Tue, 18 Mar 2025 02:58:33 +0000 (09:58 +0700)] 
update messages and fix coverity issues

5 months agomake function static
Alan T. DeKok [Mon, 17 Mar 2025 10:27:29 +0000 (17:27 +0700)] 
make function static

5 months agoinvalid_foo isn't an rcode
Alan T. DeKok [Mon, 17 Mar 2025 08:54:31 +0000 (15:54 +0700)] 
invalid_foo isn't an rcode

5 months agofr_slen_t vs ssize_t fixes
Alan T. DeKok [Mon, 17 Mar 2025 08:40:23 +0000 (15:40 +0700)] 
fr_slen_t vs ssize_t fixes

5 months agoadd more XLAT_VERIFY, and verify XLAT_TMPL, too
Alan T. DeKok [Mon, 17 Mar 2025 04:26:19 +0000 (11:26 +0700)] 
add more XLAT_VERIFY, and verify XLAT_TMPL, too

5 months agoit helps to parent things properly
Alan T. DeKok [Mon, 17 Mar 2025 03:08:06 +0000 (10:08 +0700)] 
it helps to parent things properly

5 months agoclean up debug output
Alan T. DeKok [Mon, 17 Mar 2025 03:05:37 +0000 (10:05 +0700)] 
clean up debug output

print node names, which helps a lot in telling what the heck
these things are.

print "func" for functions, and not "xlat"

5 months agouse names consitent with tmpls
Alan T. DeKok [Mon, 17 Mar 2025 03:00:21 +0000 (10:00 +0700)] 
use names consitent with tmpls

and purify shouldn't set the name buffer to vb_strvalue.  even
though it's been purified, it's bad process.  In theory, the
value-box can be cast to something else at some point

5 months agomove finalize out of tokenize expression internal
Alan T. DeKok [Sun, 16 Mar 2025 17:12:36 +0000 (00:12 +0700)] 
move finalize out of tokenize expression internal

so that the internal function can hoist %{%{%{foo}}}

5 months agoadd [*] as per warning in debug mode
Alan T. DeKok [Sun, 16 Mar 2025 17:10:10 +0000 (00:10 +0700)] 
add [*] as per warning in debug mode

5 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/der.tar
github-actions[bot] [Sun, 16 Mar 2025 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/der.tar

5 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar
github-actions[bot] [Sun, 16 Mar 2025 09:34:41 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar

5 months agoRemove & from the reference directory docs (manual change)
nolade [Thu, 13 Mar 2025 20:09:18 +0000 (16:09 -0400)] 
Remove & from the reference directory docs (manual change)

5 months agofix table and remove accidentally committed file
Alan T. DeKok [Sat, 15 Mar 2025 13:15:08 +0000 (15:15 +0200)] 
fix table and remove accidentally committed file

5 months agoRemove & and incorporate PR edits from Alan/Arran
nolade [Thu, 13 Mar 2025 21:06:00 +0000 (17:06 -0400)] 
Remove & and incorporate PR edits from Alan/Arran

5 months agoRemove & from howto directory docs (manual change)
nolade [Thu, 13 Mar 2025 19:14:46 +0000 (15:14 -0400)] 
Remove & from howto directory docs (manual change)

5 months agoRemove & from &Tmp
nolade [Thu, 13 Mar 2025 18:15:49 +0000 (14:15 -0400)] 
Remove & from &Tmp
perl -p -i -e 's/\&Tmp/Tmp/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &Stripped
nolade [Thu, 13 Mar 2025 18:09:04 +0000 (14:09 -0400)] 
Remove & from &Stripped
perl -p -i -e 's/\&Stripped/Stripped/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from NAS
nolade [Thu, 13 Mar 2025 17:59:57 +0000 (13:59 -0400)] 
Remove & from NAS
perl -p -i -e 's/\&NAS/NAS/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from Filter attribute
nolade [Thu, 13 Mar 2025 16:44:29 +0000 (12:44 -0400)] 
Remove & from Filter attribute
perl -p -i -e 's/\&Filter/Filter/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from User-Name
nolade [Thu, 13 Mar 2025 16:36:23 +0000 (12:36 -0400)] 
Remove & from User-Name
perl -p -i -e 's/\&User/User/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRegenerate from raddb source
nolade [Thu, 13 Mar 2025 16:27:05 +0000 (12:27 -0400)] 
Regenerate from raddb source
touch $(find raddb -print)
make doc.raddb

5 months agoRemove & from &parent attribute
nolade [Thu, 13 Mar 2025 16:18:37 +0000 (12:18 -0400)] 
Remove & from &parent attribute
perl -p -i -e 's/\&parent/parent/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &outer attribute
nolade [Thu, 13 Mar 2025 16:10:24 +0000 (12:10 -0400)] 
Remove & from &outer attribute
perl -p -i -e 's/\&outer/outer/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &session attribute
nolade [Thu, 13 Mar 2025 16:05:22 +0000 (12:05 -0400)] 
Remove & from &session attribute
perl -p -i -e 's/\&session/session/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &control attribute
nolade [Thu, 13 Mar 2025 15:46:20 +0000 (11:46 -0400)] 
Remove & from &control attribute
perl -p -i -e 's/\&control/control/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &request attribute
nolade [Thu, 13 Mar 2025 15:37:55 +0000 (11:37 -0400)] 
Remove & from &request attribute
perl -p -i -e 's/\&request/request/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & from &reply attribute
nolade [Thu, 13 Mar 2025 15:20:55 +0000 (11:20 -0400)] 
Remove & from &reply attribute
perl -p -i -e 's/\&reply/reply/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoRemove & where %{&foo}
nolade [Thu, 13 Mar 2025 15:08:01 +0000 (11:08 -0400)] 
Remove & where %{&foo}
perl -p -i -e 's/%{\&/%{/g' $(git grep -lE '^&|[^&]&[a-zA-Z]' doc/antora/modules | egrep -v 'raddb|developers|interpreter.adoc|assets')

5 months agoRemove & where &foo = bar &
nolade [Thu, 13 Mar 2025 15:03:26 +0000 (11:03 -0400)] 
Remove & where &foo = bar &
perl -p -i -e 's/&([^\s]+\s+(=|.=))/$1/g' $(git grep -lE '^&|[^&]&[a-zA-Z]' doc/antora/modules | egrep -v 'raddb|developers|interpreter.adoc|assets')

5 months agoRemove & from the start of a line
nolade [Thu, 13 Mar 2025 14:50:34 +0000 (10:50 -0400)] 
Remove & from the start of a line
erl -p -i -e 's/^&//' $(git grep -lE '^&|[^&]&[a-zA-Z]' doc/antora/modules | egrep -v 'raddb|developers|interpreter.adoc|assets')

5 months agoRemove & from back-tick quoted strings
nolade [Thu, 13 Mar 2025 14:32:18 +0000 (10:32 -0400)] 
Remove & from back-tick quoted strings
perl -p -i -e 's/\`&(?!\`)/\`/g' $(git grep -lE '&[a-zA-Z0-9]' doc/antora | egrep -v 'raddb|developers|interpreter|assets')

5 months agoremove unused function
Alan T. DeKok [Sat, 15 Mar 2025 10:37:43 +0000 (12:37 +0200)] 
remove unused function

now that we hoist xlat->tmpls to xlat->box much earlier, we do
not need an explicit function to do this as a post-processing
step.

5 months agocheck in more places for non-expression and EOS
Alan T. DeKok [Fri, 14 Mar 2025 16:30:40 +0000 (18:30 +0200)] 
check in more places for non-expression and EOS