]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
22 months agoadd aliases for vendors
Alan T. DeKok [Tue, 3 Oct 2023 15:19:29 +0000 (11:19 -0400)] 
add aliases for vendors

22 months agoallow alias Cisco -> Vendor-Specific.Cisco
Alan T. DeKok [Tue, 3 Oct 2023 14:48:31 +0000 (10:48 -0400)] 
allow alias Cisco -> Vendor-Specific.Cisco

because we don't hate our end users enough to force them to
write huge long strings every time

22 months agosome auto-conversion
Alan T. DeKok [Tue, 3 Oct 2023 12:42:14 +0000 (08:42 -0400)] 
some auto-conversion

perl -p -i -e 's/%{([a-zA-Z0-9._-]+):([^%{}]+)}/%$1($2)/g'  $(git grep -l '%{[^:}]\+:' src/tests/keywords/)

with manual cleanups of things which don't work

22 months agohandle all types of input args
Alan T. DeKok [Tue, 3 Oct 2023 12:39:38 +0000 (08:39 -0400)] 
handle all types of input args

22 months agomore conversion to new function format
Alan T. DeKok [Tue, 3 Oct 2023 12:27:19 +0000 (08:27 -0400)] 
more conversion to new function format

22 months agonote deprecated functions
Alan T. DeKok [Tue, 3 Oct 2023 12:27:05 +0000 (08:27 -0400)] 
note deprecated functions

22 months agonote that %expr is no longer needed
Alan T. DeKok [Mon, 2 Oct 2023 19:04:22 +0000 (15:04 -0400)] 
note that %expr is no longer needed

22 months agocmp functions have required arguments
Alan T. DeKok [Mon, 2 Oct 2023 13:04:33 +0000 (09:04 -0400)] 
cmp functions have required arguments

22 months agoupdate for new behavior
Alan T. DeKok [Mon, 2 Oct 2023 12:32:48 +0000 (08:32 -0400)] 
update for new behavior

22 months agonote that these aren't for v4
Alan T. DeKok [Mon, 2 Oct 2023 12:22:43 +0000 (08:22 -0400)] 
note that these aren't for v4

22 months agodon't use (&foo || 0) for numerical types. It's now just &foo
Alan T. DeKok [Mon, 2 Oct 2023 12:17:32 +0000 (08:17 -0400)] 
don't use (&foo || 0) for numerical types.  It's now just &foo

22 months agoadd support for missing arguments to binary op
Alan T. DeKok [Mon, 2 Oct 2023 12:10:26 +0000 (08:10 -0400)] 
add support for missing arguments to binary op

at least for strings, octets, and numerical types

That way we don't need to do

&foo = &bar - (&baz || 0)

and we can instead just do

&foo = &bar - &baz

22 months agomore cleanups
Alan T. DeKok [Mon, 2 Oct 2023 11:41:22 +0000 (07:41 -0400)] 
more cleanups

22 months agoget rid of some alternation
Alan T. DeKok [Sun, 1 Oct 2023 17:45:33 +0000 (13:45 -0400)] 
get rid of some alternation

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Mon, 2 Oct 2023 09:35:07 +0000 (09:35 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:58 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:50 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:38 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:34 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

22 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Mon, 2 Oct 2023 09:34:28 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

22 months agoclean up and start removing %{expr:}
Alan T. DeKok [Sun, 1 Oct 2023 17:37:33 +0000 (13:37 -0400)] 
clean up and start removing %{expr:}

22 months agomove funtion to the only place which uses it
Alan T. DeKok [Sun, 1 Oct 2023 17:34:07 +0000 (13:34 -0400)] 
move funtion to the only place which uses it

22 months agonow that we have more fixes, use %{... expr ...} in more places
Alan T. DeKok [Sun, 1 Oct 2023 15:43:06 +0000 (11:43 -0400)] 
now that we have more fixes, use %{... expr ...} in more places

22 months agominor fixes
Alan T. DeKok [Sun, 1 Oct 2023 14:43:30 +0000 (10:43 -0400)] 
minor fixes

if we have a cast, then we don't have an enumv, and we can't
parse the data as being an enum name.

if we have a subexpression, (...), then we don't do math on
enum names, so remove the enum there, too.

Pass the resulting rules recursively to the parser

22 months agonote that %expr() has (or will be) removed
Alan T. DeKok [Sun, 1 Oct 2023 14:26:49 +0000 (10:26 -0400)] 
note that %expr() has (or will be) removed

22 months agodon't include trailing '}' in name, and be sure to set flags
Alan T. DeKok [Sun, 1 Oct 2023 14:26:31 +0000 (10:26 -0400)] 
don't include trailing '}' in name, and be sure to set flags

22 months agobe more careful about parsing %{1}
Alan T. DeKok [Sun, 1 Oct 2023 14:26:11 +0000 (10:26 -0400)] 
be more careful about parsing %{1}

22 months agowe can't in general copy xlats.
Alan T. DeKok [Sun, 1 Oct 2023 14:25:26 +0000 (10:25 -0400)] 
we can't in general copy xlats.

because they need resolving.  And copying an xlat means that
the xlat does not appear in the instance tree

22 months agoadd CC_HINT
Alan T. DeKok [Sun, 1 Oct 2023 14:24:49 +0000 (10:24 -0400)] 
add CC_HINT

22 months agodon't copy arguments, just talloc_steal() them
Alan T. DeKok [Sun, 1 Oct 2023 14:20:33 +0000 (10:20 -0400)] 
don't copy arguments, just talloc_steal() them

because copying could require lots of memory allocations.
So even if talloc_steal() is inefficient, it's likely not much
worse than allocating and copying entire data structures

22 months agomore notes on local variables
Alan T. DeKok [Sun, 1 Oct 2023 13:37:13 +0000 (09:37 -0400)] 
more notes on local variables

22 months agoallow expressions in %{...} xlats
Alan T. DeKok [Sun, 1 Oct 2023 12:54:20 +0000 (08:54 -0400)] 
allow expressions in %{...} xlats

22 months agoRevert "move to new function syntax"
Alan T. DeKok [Sat, 30 Sep 2023 23:44:01 +0000 (19:44 -0400)] 
Revert "move to new function syntax"

This reverts commit 8486d69f44cd6ac200617b103feb9a0d5c512fd0.

rever this until we update alternation syntax, too.

The parser keys off of %{ or %( for expansions, and does not
like the new function syntax

22 months agomove to new function syntax
Alan T. DeKok [Sat, 30 Sep 2023 20:25:16 +0000 (16:25 -0400)] 
move to new function syntax

22 months agomove more to new function syntax
Alan T. DeKok [Sat, 30 Sep 2023 20:14:25 +0000 (16:14 -0400)] 
move more to new function syntax

22 months agomove policies to new function syntax
Alan T. DeKok [Sat, 30 Sep 2023 20:12:33 +0000 (16:12 -0400)] 
move policies to new function syntax

22 months agomore move docs and examples to new function syntax
Alan T. DeKok [Sat, 30 Sep 2023 16:49:06 +0000 (12:49 -0400)] 
more move docs and examples to new function syntax

22 months agonote on assigning to a list
Alan T. DeKok [Sat, 30 Sep 2023 16:39:28 +0000 (12:39 -0400)] 
note on assigning to a list

22 months agomove docs and examples to new function syntax
Alan T. DeKok [Sat, 30 Sep 2023 14:15:25 +0000 (10:15 -0400)] 
move docs and examples to new function syntax

22 months agoparse pairs from a string
Alan T. DeKok [Sat, 30 Sep 2023 14:08:16 +0000 (10:08 -0400)] 
parse pairs from a string

22 months agomore cast fixes
Alan T. DeKok [Sat, 30 Sep 2023 13:28:49 +0000 (09:28 -0400)] 
more cast fixes

22 months agomore cast fixes
Alan T. DeKok [Sat, 30 Sep 2023 12:27:11 +0000 (08:27 -0400)] 
more cast fixes

22 months agoupdate tag line
Alan T. DeKok [Sat, 30 Sep 2023 12:10:54 +0000 (08:10 -0400)] 
update tag line

22 months agomove casting to new syntax.
Alan T. DeKok [Sat, 30 Sep 2023 12:09:18 +0000 (08:09 -0400)] 
move casting to new syntax.

the old syntax will now cause an error

22 months agomove documentation to new syntax
Alan T. DeKok [Sat, 30 Sep 2023 12:08:54 +0000 (08:08 -0400)] 
move documentation to new syntax

22 months agoclean up and rework casting in xlat expressions
Alan T. DeKok [Fri, 29 Sep 2023 22:42:48 +0000 (18:42 -0400)] 
clean up and rework casting in xlat expressions

nothing changes except for a few corner cases which didn't work
before.

22 months agonote that %integer()... is no longer needed. Casting works fine
Alan T. DeKok [Fri, 29 Sep 2023 18:42:25 +0000 (14:42 -0400)] 
note that %integer()... is no longer needed.  Casting works fine

22 months agomore tests for cast
Alan T. DeKok [Fri, 29 Sep 2023 17:46:55 +0000 (13:46 -0400)] 
more tests for cast

(uint32) &Service-Type

has the cast omitted, as Service-Type is already uint32

However, the cast is still useful, as we may want to print the
integer value of Service-Type!

So we have to do:

(uint32) (&Service-Type)

which is a bit stupid

22 months agoallow ::NAME for enum names
Alan T. DeKok [Fri, 29 Sep 2023 17:09:05 +0000 (13:09 -0400)] 
allow ::NAME for enum names

22 months agoprint out the correct command string
Alan T. DeKok [Fri, 29 Sep 2023 16:55:41 +0000 (12:55 -0400)] 
print out the correct command string

22 months agolocal variables can't be named for data types
Alan T. DeKok [Fri, 29 Sep 2023 16:18:47 +0000 (12:18 -0400)] 
local variables can't be named for data types

string string

is bad.

22 months agostart moving to the new function call syntax
Alan T. DeKok [Fri, 29 Sep 2023 16:13:03 +0000 (12:13 -0400)] 
start moving to the new function call syntax

22 months agoSplit out thread instantiation into its own function
Arran Cudbard-Bell [Fri, 29 Sep 2023 21:13:05 +0000 (15:13 -0600)] 
Split out thread instantiation into its own function

22 months agoAdd comments on how to verify poimters. (#5196)
James Jones [Fri, 29 Sep 2023 20:55:12 +0000 (15:55 -0500)] 
Add comments on how to verify poimters. (#5196)

22 months agojust key on '%' for in-place xlats
Alan T. DeKok [Fri, 29 Sep 2023 15:11:47 +0000 (11:11 -0400)] 
just key on '%' for in-place xlats

no module name will start with '%', so that's fine

22 months agowrap tests in group { ... } so the tests can declare local variables
Alan T. DeKok [Fri, 29 Sep 2023 14:26:06 +0000 (10:26 -0400)] 
wrap tests in group { ... } so the tests can declare local variables

22 months agoadd comment on "massive" "use" of "quotes"
Alan T. DeKok [Fri, 29 Sep 2023 14:01:31 +0000 (10:01 -0400)] 
add comment on "massive" "use" of "quotes"

22 months agostart of documentation on new function syntax
Alan T. DeKok [Fri, 29 Sep 2023 13:59:36 +0000 (09:59 -0400)] 
start of documentation on new function syntax

22 months agoupdate preparse functions for new xlat syntax
Alan T. DeKok [Fri, 29 Sep 2023 12:43:50 +0000 (08:43 -0400)] 
update preparse functions for new xlat syntax

22 months agoremove debug
Alan T. DeKok [Fri, 29 Sep 2023 12:34:58 +0000 (08:34 -0400)] 
remove debug

22 months agoremove unused assignment
Alan T. DeKok [Fri, 29 Sep 2023 12:10:20 +0000 (08:10 -0400)] 
remove unused assignment

22 months agoFix rlm_perl configure script under clang
Arran Cudbard-Bell [Fri, 29 Sep 2023 05:22:51 +0000 (23:22 -0600)] 
Fix rlm_perl configure script under clang

22 months agocatch more edge cases for new functions and single-letter expansions
Alan T. DeKok [Thu, 28 Sep 2023 22:01:39 +0000 (18:01 -0400)] 
catch more edge cases for new functions and single-letter expansions

so that we just skip the new function parser in more cases, which
makes the new function parser a bit simpler.

22 months agoallow &Attr references in function mono
Alan T. DeKok [Thu, 28 Sep 2023 21:30:17 +0000 (17:30 -0400)] 
allow &Attr references in function mono

not in other ones, as the rest of the functions expect to see
an input argument which is a string, and they convert that to
a tmpl.

The tokenize / eval framework likely needs to be updated to
allow for something like &%{...}, which would create the tmpl
name at run time.  And then the function can get passed a tmpl
(in a value-box?) and not a raw value-box.

22 months agouse correct macro
Alan T. DeKok [Thu, 28 Sep 2023 21:03:23 +0000 (17:03 -0400)] 
use correct macro

22 months agoallow input packet for test.xlat
Alan T. DeKok [Thu, 28 Sep 2023 20:46:53 +0000 (16:46 -0400)] 
allow input packet for test.xlat

22 months agoremove redundant line
Alan T. DeKok [Thu, 28 Sep 2023 20:46:36 +0000 (16:46 -0400)] 
remove redundant line

22 months agofix assertions
Alan T. DeKok [Thu, 28 Sep 2023 16:59:42 +0000 (12:59 -0400)] 
fix assertions

22 months agominor tweaks
Alan T. DeKok [Thu, 28 Sep 2023 15:10:28 +0000 (11:10 -0400)] 
minor tweaks

22 months agonote filter changes
Alan T. DeKok [Thu, 28 Sep 2023 14:55:51 +0000 (10:55 -0400)] 
note filter changes

22 months agoCast sbuff write calls in fr_vlog_perror() to void (CID #1533664) (#5158)
James Jones [Thu, 28 Sep 2023 16:35:34 +0000 (11:35 -0500)] 
Cast sbuff write calls in fr_vlog_perror() to void (CID #1533664) (#5158)

fr_vlog_perror() returns void, so one can't use FR_SBUFF_FOO_RETURN();
the function must always do something reasonable. The possible
errors are invalid format strings or running out of space, and
here rather than a fixed local buffer, the buffer can grow to 16K.
Errors are printed one at a time rather than accumulating them all
in the buffer, so such an event is highly unlikely. We thus cast
the calls to void.

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
22 months agoComment on trunk test annotations (CID #1469174) (#5188)
James Jones [Thu, 28 Sep 2023 16:32:18 +0000 (11:32 -0500)] 
Comment on trunk test annotations (CID #1469174) (#5188)

Coverity doesn't recognize the validation of the read treq pointer
that text_demux() does, which, aside from signaling complete or
cancel complete, is the majority of the loop body.

22 months agoComment on annotations in pair_init_from_da() (CID #1517674) (#5186)
James Jones [Thu, 28 Sep 2023 16:31:53 +0000 (11:31 -0500)] 
Comment on annotations in pair_init_from_da() (CID #1517674) (#5186)

22 months agoComment annnotation in fr_value_box_init() (CID #1543214) (#5185)
James Jones [Thu, 28 Sep 2023 16:31:32 +0000 (11:31 -0500)] 
Comment annnotation in fr_value_box_init() (CID #1543214) (#5185)

22 months agoAdd comment explaining annotation (CID #1414431) (#5184)
James Jones [Thu, 28 Sep 2023 16:31:02 +0000 (11:31 -0500)] 
Add comment explaining annotation (CID #1414431) (#5184)

22 months agoTypos, grammar fixes, cutting back on verbosity. (#5178)
James Jones [Thu, 28 Sep 2023 16:30:45 +0000 (11:30 -0500)] 
Typos, grammar fixes, cutting back on verbosity. (#5178)

22 months agoAvoid what coverity calls "downcasting" (CID #1542293) (#5170)
James Jones [Thu, 28 Sep 2023 16:30:16 +0000 (11:30 -0500)] 
Avoid what coverity calls "downcasting" (CID #1542293) (#5170)

packet->data is a uint8_t * formerly cast to dhcp_packet_t const *
to be passed to fr_dhcpv4_packet_get_option(). dhcp_packet_t is
more strictly aligned than uint8_t, so coverity considers this a
"tainted_data_downcast" and infers that the pointed-at data is
tainted.

To avoid the issue, the talloc_memdup() result is assigned first
to a dhcp_packet_t * to pass to fr_dhcpv4_packet_get_option(),
and cast to (uint8_t *) to assign to packet->data.

22 months agoPlacate coverity CID #1542424, #152423, #152422) (#5168)
James Jones [Thu, 28 Sep 2023 16:29:07 +0000 (11:29 -0500)] 
Placate coverity CID #1542424, #152423, #152422) (#5168)

Currently, three functions mark requests as fake. That involves
calling fr_pair_value_from_str() with the string being "127.0.0.1".
Coverity notices that fr_pair_value_from_str() returns a value
that isn't checked.

 * setup_fake_request() nominally returns an int, but it always
   returns zero, and no caller actuallly checks its return value.
 * The other functions, chbind_process() and eap_fast_eap_payload(),
   return fr_radius_packet_code_t, and it's not clear which
   fr_radius_packet_code_t makes sense in this case.

So... we cast the fr_pair_value_from_str() calls to void.

22 months agoFix od_mschap_auth() call in rlm_mschap (#5192)
Jorge Pereira [Thu, 28 Sep 2023 16:20:13 +0000 (13:20 -0300)] 
Fix od_mschap_auth() call in rlm_mschap (#5192)

When build against the OSX

22 months agoadd, document, and test filtering operators
Alan T. DeKok [Thu, 28 Sep 2023 14:49:56 +0000 (10:49 -0400)] 
add, document, and test filtering operators

22 months agoallow multiple local variables to be defined
Alan T. DeKok [Thu, 28 Sep 2023 12:36:28 +0000 (08:36 -0400)] 
allow multiple local variables to be defined

22 months agodon't smash operator before printing it in error message
Alan T. DeKok [Thu, 28 Sep 2023 12:33:04 +0000 (08:33 -0400)] 
don't smash operator before printing it in error message

22 months agoremove policies which aren't really correct
Alan T. DeKok [Thu, 28 Sep 2023 02:32:51 +0000 (22:32 -0400)] 
remove policies which aren't really correct

they use old %C.%c, instead of just relying on the new fr_time_t
and fr_time_delta_t

22 months agotest function call inside of function argument
Alan T. DeKok [Wed, 27 Sep 2023 23:45:47 +0000 (19:45 -0400)] 
test function call inside of function argument

22 months agoadd test for condition / edit of %func(args)
Alan T. DeKok [Wed, 27 Sep 2023 23:42:47 +0000 (19:42 -0400)] 
add test for condition / edit of %func(args)

22 months agouse input ctx, as output value-box may be on the stack
Alan T. DeKok [Wed, 27 Sep 2023 23:42:30 +0000 (19:42 -0400)] 
use input ctx, as output value-box may be on the stack

22 months agonote new function syntax
Alan T. DeKok [Wed, 27 Sep 2023 20:08:40 +0000 (16:08 -0400)] 
note new function syntax

22 months agofix debugging error message
Alan T. DeKok [Wed, 27 Sep 2023 20:01:57 +0000 (16:01 -0400)] 
fix debugging error message

22 months agobe more careful about one-letter expansions
Alan T. DeKok [Wed, 27 Sep 2023 19:56:32 +0000 (15:56 -0400)] 
be more careful about one-letter expansions

22 months agodon't allow registrations of one-letter overlaps with %Y etc.
Alan T. DeKok [Wed, 27 Sep 2023 18:58:28 +0000 (14:58 -0400)] 
don't allow registrations of one-letter overlaps with %Y etc.

22 months agoalways support new function syntax
Alan T. DeKok [Wed, 27 Sep 2023 18:52:05 +0000 (14:52 -0400)] 
always support new function syntax

and put in hacks to allow %Y to work.

22 months agomake new function parsing work
Alan T. DeKok [Wed, 27 Sep 2023 17:36:58 +0000 (13:36 -0400)] 
make new function parsing work

%foo(bar, baz)

Something something miracle.

22 months ago$INCLUDE does not yet support file globbing
Alan T. DeKok [Wed, 27 Sep 2023 15:04:36 +0000 (11:04 -0400)] 
$INCLUDE does not yet support file globbing

22 months agoshut up compiler
Alan T. DeKok [Wed, 27 Sep 2023 15:00:53 +0000 (11:00 -0400)] 
shut up compiler

22 months agomove process $INCLUDE to its own function
Alan T. DeKok [Wed, 27 Sep 2023 14:51:11 +0000 (10:51 -0400)] 
move process $INCLUDE to its own function

22 months agomove testing code to totp.c
Alan T. DeKok [Wed, 27 Sep 2023 13:49:55 +0000 (09:49 -0400)] 
move testing code to totp.c

22 months agoMake rlm_totp use the API in libfreeradius-totp
Alan T. DeKok [Wed, 27 Sep 2023 13:26:04 +0000 (09:26 -0400)] 
Make rlm_totp use the API in libfreeradius-totp

and do some more cleanups