]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoAdd missing header (#4332)
Terry Burton [Sun, 12 Dec 2021 22:23:06 +0000 (22:23 +0000)] 
Add missing header (#4332)

3 years agofix format
Alan T. DeKok [Sun, 12 Dec 2021 22:05:03 +0000 (17:05 -0500)] 
fix format

3 years agoadd ndebug unused
Alan T. DeKok [Sun, 12 Dec 2021 20:43:24 +0000 (15:43 -0500)] 
add ndebug unused

3 years agoallow list -= attr
Alan T. DeKok [Sun, 12 Dec 2021 18:52:50 +0000 (13:52 -0500)] 
allow list -= attr

for now, only one attr on the RHS.  But we hackily allow
&attr[0] or &attr[*]

3 years agoRHS can't be an attribute reference
Alan T. DeKok [Sun, 12 Dec 2021 17:04:50 +0000 (12:04 -0500)] 
RHS can't be an attribute reference

if you need a dynamic attribute reference, just copy the value
box, or use xlat-xlat

3 years agoadd 16-bit "safe" field
Alan T. DeKok [Sun, 12 Dec 2021 14:21:06 +0000 (09:21 -0500)] 
add 16-bit "safe" field

which marks up value boxes as being safe for particular uses

3 years agoallow &list := {} to clear the list
Alan T. DeKok [Sun, 12 Dec 2021 15:08:13 +0000 (10:08 -0500)] 
allow &list := {} to clear the list

which makes a bit more sense than the previous !*ANY

3 years agotests for new functionality
Alan T. DeKok [Sat, 11 Dec 2021 20:38:19 +0000 (15:38 -0500)] 
tests for new functionality

3 years agoand one more "shut up clang"
Alan T. DeKok [Sat, 11 Dec 2021 20:15:29 +0000 (15:15 -0500)] 
and one more "shut up clang"

it's way to dumb and complaining for it's own good

3 years agoI said SHUT THE HECK UP
Alan T. DeKok [Sat, 11 Dec 2021 18:09:20 +0000 (13:09 -0500)] 
I said SHUT THE HECK UP

3 years agoclang: shut up and stop being so stupid
Alan T. DeKok [Sat, 11 Dec 2021 17:28:58 +0000 (12:28 -0500)] 
clang: shut up and stop being so stupid

3 years agoshut up clang analyzer
Alan T. DeKok [Sat, 11 Dec 2021 15:46:41 +0000 (10:46 -0500)] 
shut up clang analyzer

3 years agomore "shut up clang analyzer"
Alan T. DeKok [Sat, 11 Dec 2021 15:02:58 +0000 (10:02 -0500)] 
more "shut up clang analyzer"

3 years agoallow assignment of strings to structural VPs
Alan T. DeKok [Sat, 11 Dec 2021 14:57:43 +0000 (09:57 -0500)] 
allow assignment of strings to structural VPs

which parses the string as VPs in the relevant context, and
creates an in-place list.  This is useful for xlat / exec
expansions, but it also allows us to assign members of a
structural pair via strings.  Which makes it easier to write
and test the new edit functionality.

3 years agoupdate parser to cast RHS as string for structural types
Alan T. DeKok [Sat, 11 Dec 2021 14:44:05 +0000 (09:44 -0500)] 
update parser to cast RHS as string for structural types

3 years agoclarify error message
Alan T. DeKok [Sat, 11 Dec 2021 14:08:52 +0000 (09:08 -0500)] 
clarify error message

3 years agoshut up clang analyzer
Alan T. DeKok [Sat, 11 Dec 2021 14:01:42 +0000 (09:01 -0500)] 
shut up clang analyzer

it doesn't look like there's a way to say "this field is always
non-null"

3 years agofr_pair_list_afrom_str() now takes a dict_attr root, not dict
Alan T. DeKok [Sat, 11 Dec 2021 13:30:58 +0000 (08:30 -0500)] 
fr_pair_list_afrom_str() now takes a dict_attr root, not dict

in preparation for allowing structural attributes to be parsed
from strings.

This helps with not only intermediate tests while the new edit
code is being developed, it allows for pairs to be assigned
as the result of xlat / exec expansions.  Which gives a fair bit
more generality to the server.

3 years ago"box" can't be NULL, either
Alan T. DeKok [Sat, 11 Dec 2021 13:12:02 +0000 (08:12 -0500)] 
"box" can't be NULL, either

3 years agodon't manually set VT_DATA everywhere
Alan T. DeKok [Sat, 11 Dec 2021 00:09:29 +0000 (19:09 -0500)] 
don't manually set VT_DATA everywhere

it should be the default, unless we add a new API to allow
fr_pair_t to contain fr_value_box_list_t

3 years agocompile regex string, not xlat input
Alan T. DeKok [Fri, 10 Dec 2021 23:54:26 +0000 (18:54 -0500)] 
compile regex string, not xlat input

there's no tests for this functionality, and looks like it
probably never worked right in v4.  It should probably just be
removed

3 years agonothing uses VT_XLAT any more
Alan T. DeKok [Fri, 10 Dec 2021 23:42:44 +0000 (18:42 -0500)] 
nothing uses VT_XLAT any more

3 years agoremove xlat_eval_pair() now that nothing sets VT_XLAT
Alan T. DeKok [Fri, 10 Dec 2021 23:40:04 +0000 (18:40 -0500)] 
remove xlat_eval_pair() now that nothing sets VT_XLAT

and update radius_pairmove() to no longer take "do_xlat" flag

3 years agorelax checks
Alan T. DeKok [Fri, 10 Dec 2021 22:49:41 +0000 (17:49 -0500)] 
relax checks

3 years agoremove fr_pair_mark_xlat(), as nothing uses it
Alan T. DeKok [Fri, 10 Dec 2021 21:35:06 +0000 (16:35 -0500)] 
remove fr_pair_mark_xlat(), as nothing uses it

3 years agoremove call to fr_pair_mark_xlat()
Alan T. DeKok [Fri, 10 Dec 2021 21:29:28 +0000 (16:29 -0500)] 
remove call to fr_pair_mark_xlat()

which only worked for strings which were in `back-quotes` ???
that's a hack left over from v3, and needs to be completely
revisited with maps

3 years agoremove "op" from fr_pair_make()
Alan T. DeKok [Fri, 10 Dec 2021 21:25:07 +0000 (16:25 -0500)] 
remove "op" from fr_pair_make()

which was only called from rlm_passwd and rlm_perl.  And those
only used it to append attributes to a list.

Also removed the call to fr_pair_mark_xlat() from fr_pair_make()
Neither module used that functionality

3 years agothese don't use (and shouldn't use) VT_XLAT
Alan T. DeKok [Fri, 10 Dec 2021 21:13:59 +0000 (16:13 -0500)] 
these don't use (and shouldn't use) VT_XLAT

in preparation for simply removing it entirely.

3 years agoone more fix for fr_map_list_t
Alan T. DeKok [Fri, 10 Dec 2021 21:09:08 +0000 (16:09 -0500)] 
one more fix for fr_map_list_t

3 years agothis has been unused for a long time
Alan T. DeKok [Fri, 10 Dec 2021 19:43:44 +0000 (14:43 -0500)] 
this has been unused for a long time

3 years agodisallow "list := xlat / exec"
Alan T. DeKok [Fri, 10 Dec 2021 19:23:49 +0000 (14:23 -0500)] 
disallow "list := xlat / exec"

it will likely be useful later, but for now nothing in the
code supports it

3 years agomore fr_map_list fixes
Alan T. DeKok [Fri, 10 Dec 2021 19:03:16 +0000 (14:03 -0500)] 
more fr_map_list fixes

3 years agofix this, too
Alan T. DeKok [Fri, 10 Dec 2021 18:01:52 +0000 (13:01 -0500)] 
fix this, too

3 years agoonly include the headers we need
Alan T. DeKok [Fri, 10 Dec 2021 17:13:23 +0000 (12:13 -0500)] 
only include the headers we need

3 years agoclean up random formatting
Alan T. DeKok [Fri, 10 Dec 2021 17:13:08 +0000 (12:13 -0500)] 
clean up random formatting

3 years agouse new dlist macros for fr_map_list_t
Alan T. DeKok [Fri, 10 Dec 2021 16:51:53 +0000 (11:51 -0500)] 
use new dlist macros for fr_map_list_t

3 years agoadd one more function
Alan T. DeKok [Fri, 10 Dec 2021 16:34:08 +0000 (11:34 -0500)] 
add one more function

3 years agono need to use dcursors here
Alan T. DeKok [Fri, 10 Dec 2021 16:22:02 +0000 (11:22 -0500)] 
no need to use dcursors here

in preparation for allowing recursive expansion of maps

3 years agoone more try
Alan T. DeKok [Fri, 10 Dec 2021 14:16:12 +0000 (09:16 -0500)] 
one more try

3 years agoclean up templatize_rhs to be a bit faster and more forgiving
Alan T. DeKok [Thu, 9 Dec 2021 22:14:52 +0000 (17:14 -0500)] 
clean up templatize_rhs to be a bit faster and more forgiving

3 years agounify some data structures
Alan T. DeKok [Thu, 9 Dec 2021 21:41:32 +0000 (16:41 -0500)] 
unify some data structures

3 years agoremove unused fields
Alan T. DeKok [Thu, 9 Dec 2021 20:21:53 +0000 (15:21 -0500)] 
remove unused fields

3 years agoclarify which attribute reference failed to paese
Alan T. DeKok [Thu, 9 Dec 2021 19:23:43 +0000 (14:23 -0500)] 
clarify which attribute reference failed to paese

3 years agoadd more functions
Alan T. DeKok [Thu, 9 Dec 2021 19:00:49 +0000 (14:00 -0500)] 
add more functions

3 years agojust access the field directly
Alan T. DeKok [Thu, 9 Dec 2021 12:46:21 +0000 (07:46 -0500)] 
just access the field directly

3 years agouse type-safe macros to access internal pair dlist things
Alan T. DeKok [Wed, 8 Dec 2021 21:14:01 +0000 (16:14 -0500)] 
use type-safe macros to access internal pair dlist things

as a bonus, it means that none of the visible code depends on
the names of the field members. Instead, the code just operates
on the parent structures

3 years agorename fr_pair_list_move() to fr_pair_list_move_op()
Alan T. DeKok [Wed, 8 Dec 2021 18:09:19 +0000 (13:09 -0500)] 
rename fr_pair_list_move() to fr_pair_list_move_op()

because it's a legacy function, and shouldn't match the new
API layout.

3 years agonew macro to generate type-safe wrappers for dlist functions
Alan T. DeKok [Wed, 8 Dec 2021 17:52:47 +0000 (12:52 -0500)] 
new macro to generate type-safe wrappers for dlist functions

3 years agoHack in default list selection when parsing in list_as_attr mode
Arran Cudbard-Bell [Wed, 8 Dec 2021 19:01:07 +0000 (14:01 -0500)] 
Hack in default list selection when parsing in list_as_attr mode

3 years agoreorganise and rename tmpl_cursor functions
Arran Cudbard-Bell [Wed, 8 Dec 2021 18:47:10 +0000 (13:47 -0500)] 
reorganise and rename tmpl_cursor functions

3 years agomore "shut up clang"
Alan T. DeKok [Wed, 8 Dec 2021 16:31:12 +0000 (11:31 -0500)] 
more "shut up clang"

3 years agoprint the correct field
Alan T. DeKok [Wed, 8 Dec 2021 16:30:04 +0000 (11:30 -0500)] 
print the correct field

3 years agocompile edit sections, too
Alan T. DeKok [Wed, 8 Dec 2021 15:20:01 +0000 (10:20 -0500)] 
compile edit sections, too

unfortunately this can't be tested much until we have the new
function which adds VPs as necessary.

3 years agorelax the checks for attributes a bit
Alan T. DeKok [Wed, 8 Dec 2021 13:33:28 +0000 (08:33 -0500)] 
relax the checks for attributes a bit

in order to allow in-place edit sections

3 years agoshut up compiler
Alan T. DeKok [Tue, 7 Dec 2021 23:56:48 +0000 (18:56 -0500)] 
shut up compiler

3 years agoScheduled fuzzing: Cache merged corpus; push back only after 30 days (#4328)
Terry Burton [Tue, 7 Dec 2021 22:53:33 +0000 (22:53 +0000)] 
Scheduled fuzzing: Cache merged corpus; push back only after 30 days (#4328)

* Scheduled fuzzing: Cache merged corpus; push back only after 30 days

* Scheduled fuzzing: Skip lfs checkout - default assets are unused

* Scheduled fuzzing: Only push back when running for the main repo

3 years agotry to shut up compiler
Alan T. DeKok [Tue, 7 Dec 2021 20:44:36 +0000 (15:44 -0500)] 
try to shut up compiler

3 years agoshut up stupid compiler
Alan T. DeKok [Tue, 7 Dec 2021 20:43:52 +0000 (15:43 -0500)] 
shut up stupid compiler

3 years agominor cleanups
Alan T. DeKok [Tue, 7 Dec 2021 20:01:36 +0000 (15:01 -0500)] 
minor cleanups

3 years agohelps to set the result
Alan T. DeKok [Tue, 7 Dec 2021 19:40:56 +0000 (14:40 -0500)] 
helps to set the result

3 years agouse correct field
Alan T. DeKok [Tue, 7 Dec 2021 17:48:39 +0000 (12:48 -0500)] 
use correct field

3 years agohandle list to list edit operations
Alan T. DeKok [Tue, 7 Dec 2021 16:43:50 +0000 (11:43 -0500)] 
handle list to list edit operations

and add primitive tests.  We probably want many more tests, too

3 years agoallow new operators, too
Alan T. DeKok [Tue, 7 Dec 2021 17:13:17 +0000 (12:13 -0500)] 
allow new operators, too

3 years agohandle end of list conditions, too, and other fixes
Alan T. DeKok [Tue, 7 Dec 2021 16:43:39 +0000 (11:43 -0500)] 
handle end of list conditions, too, and other fixes

3 years agotypo
Alan T. DeKok [Tue, 7 Dec 2021 16:41:52 +0000 (11:41 -0500)] 
typo

3 years agoallow "make test.keywords.foo" to run a particular test
Alan T. DeKok [Tue, 7 Dec 2021 16:29:57 +0000 (11:29 -0500)] 
allow "make test.keywords.foo" to run a particular test

3 years agouse an intermediate box, so "dst" does not have to be initialized
Alan T. DeKok [Mon, 6 Dec 2021 21:23:09 +0000 (16:23 -0500)] 
use an intermediate box, so "dst" does not have to be initialized

3 years agoadd fr_dict_attr_compatible
Alan T. DeKok [Mon, 6 Dec 2021 21:12:53 +0000 (16:12 -0500)] 
add fr_dict_attr_compatible

for list to list copies.  Does the copy make sense?

3 years agocatch stupidities.
Alan T. DeKok [Mon, 6 Dec 2021 20:24:16 +0000 (15:24 -0500)] 
catch stupidities.

A ^= A is wrong
A .= A is wrong
A UNION A --> A
A MERGE A --> A
A := A    --> A

3 years agotype "group" can only point to TLVs
Alan T. DeKok [Mon, 6 Dec 2021 19:11:23 +0000 (14:11 -0500)] 
type "group" can only point to TLVs

so not struct, not other groups, and not leaf types
and reorder checks so that they match the existing order in
dict_fixup.c

3 years agocan't do UNION on structs
Alan T. DeKok [Mon, 6 Dec 2021 18:25:55 +0000 (13:25 -0500)] 
can't do UNION on structs

3 years agoadd t_rules flag "list_as_attr"
Alan T. DeKok [Mon, 6 Dec 2021 17:27:16 +0000 (12:27 -0500)] 
add t_rules flag "list_as_attr"

which encodes the list in the tmpl attribute reference structure

@todo - if there's no list prefix AND the flag is set, the
tokenizer should statically determine the list prefix, and set
the correct attribute reference.  This would prevent those checks
being done at run-time in tmpl_pair_cursor_init()

3 years agorework list assignment, and add UNION and MERGE
Alan T. DeKok [Sun, 5 Dec 2021 20:34:31 +0000 (15:34 -0500)] 
rework list assignment, and add UNION and MERGE

3 years agosupport "&=" and "|="
Alan T. DeKok [Sun, 5 Dec 2021 20:33:22 +0000 (15:33 -0500)] 
support "&=" and "|="

3 years agoadd function which does binary operations on lists
Alan T. DeKok [Sun, 5 Dec 2021 20:30:56 +0000 (15:30 -0500)] 
add function which does binary operations on lists

3 years agoadd "&=" and "|="
Alan T. DeKok [Sun, 5 Dec 2021 20:06:55 +0000 (15:06 -0500)] 
add "&=" and "|="

3 years agothese functions can no longer return negative numbers
Alan T. DeKok [Sun, 5 Dec 2021 19:34:51 +0000 (14:34 -0500)] 
these functions can no longer return negative numbers

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

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

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

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

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

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

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

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

3 years agoJust move the result...
Arran Cudbard-Bell [Tue, 7 Dec 2021 03:35:45 +0000 (22:35 -0500)] 
Just move the result...

3 years agoFix JSON 64bit integer tests
Arran Cudbard-Bell [Tue, 7 Dec 2021 03:23:02 +0000 (22:23 -0500)] 
Fix JSON 64bit integer tests

3 years agoFix json taint test
Arran Cudbard-Bell [Tue, 7 Dec 2021 02:51:11 +0000 (21:51 -0500)] 
Fix json taint test

3 years agoQuiet GCC
Arran Cudbard-Bell [Tue, 7 Dec 2021 02:16:38 +0000 (21:16 -0500)] 
Quiet GCC

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

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

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

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

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

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

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

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

3 years agoRevert "Use the allocation functions to allocate buffers in cal.c instead of doing...
Arran Cudbard-Bell [Sun, 5 Dec 2021 15:13:42 +0000 (10:13 -0500)] 
Revert "Use the allocation functions to allocate buffers in cal.c instead of doing it manually"

This reverts commit 0f677c5ff474e88942bf25b49aafd5b97bcdfea4.

3 years agoUse the allocation functions to allocate buffers in cal.c instead of doing it manually
Arran Cudbard-Bell [Sun, 5 Dec 2021 05:49:04 +0000 (00:49 -0500)] 
Use the allocation functions to allocate buffers in cal.c instead of doing it manually

3 years agomore / better compile-time casting
Alan T. DeKok [Sun, 5 Dec 2021 14:32:23 +0000 (09:32 -0500)] 
more / better compile-time casting