]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoBad DN LDAP response is really notfound, not fail
Nick Porter [Fri, 6 Oct 2023 14:49:34 +0000 (15:49 +0100)] 
Bad DN LDAP response is really notfound, not fail

2 years agopush event list down to ephemeral expressions
Alan T. DeKok [Fri, 6 Oct 2023 12:58:25 +0000 (08:58 -0400)] 
push event list down to ephemeral expressions

2 years agoremove extraneous empty line
Alan T. DeKok [Fri, 6 Oct 2023 12:33:31 +0000 (08:33 -0400)] 
remove extraneous empty line

2 years agodon't use bare words in || expansions
Alan T. DeKok [Fri, 6 Oct 2023 12:28:30 +0000 (08:28 -0400)] 
don't use bare words in || expansions

2 years agomore move to new function syntax
Alan T. DeKok [Fri, 6 Oct 2023 12:25:41 +0000 (08:25 -0400)] 
more move to new function syntax

2 years agoget rid of old function syntax everywhere except old examples
Alan T. DeKok [Fri, 6 Oct 2023 12:16:54 +0000 (08:16 -0400)] 
get rid of old function syntax everywhere except old examples

2 years agomore remove alternation
Alan T. DeKok [Fri, 6 Oct 2023 11:50:34 +0000 (07:50 -0400)] 
more remove alternation

this time where the second argument is just a string, and not
an attribute reference

perl -p -i -e 's/%{%{([^%{}]+)}:-([^%{}]+)}/%{\&$1 || $2}/g'  $(git grep -l ':-' raddb/)

and then re-build the antora docs from the raddb sources

2 years agoremove much alternation
Alan T. DeKok [Fri, 6 Oct 2023 11:45:59 +0000 (07:45 -0400)] 
remove much alternation

perl -p -i -e 's/%{%{([^%{}]+)}:-%{([^%{}]+)}}/%{\&$1 || \&$2}/g'  $(git grep -l ':-' raddb/)

and then re-build the antora docs from the raddb sources

2 years agotypos
Alan T. DeKok [Fri, 6 Oct 2023 11:43:17 +0000 (07:43 -0400)] 
typos

2 years agototp: The fr_totp_cmp() expects token in call_env 'user_password'
Jorge Pereira [Wed, 4 Oct 2023 16:43:11 +0000 (13:43 -0300)] 
totp: The fr_totp_cmp() expects token in call_env 'user_password'

Which is taken from control.TOTP.From-User

2 years agototp: Fix call_env setting
Jorge Pereira [Wed, 4 Oct 2023 16:42:09 +0000 (13:42 -0300)] 
totp: Fix call_env setting

The 'nullable' field should be true.

2 years agonote that you don't always have to use %concat()
Alan T. DeKok [Thu, 5 Oct 2023 19:46:20 +0000 (15:46 -0400)] 
note that you don't always have to use %concat()

"+" is usually better.

2 years agoadd more tests
Alan T. DeKok [Thu, 5 Oct 2023 19:46:12 +0000 (15:46 -0400)] 
add more tests

2 years agomove to %func(args) everywhere in raddb/*
Jorge Pereira [Wed, 4 Oct 2023 22:10:31 +0000 (19:10 -0300)] 
move to %func(args) everywhere in raddb/*

2 years agoxlat cmp requires both arguments
Nick Porter [Fri, 6 Oct 2023 08:22:53 +0000 (09:22 +0100)] 
xlat cmp requires both arguments

2 years agohandle multiple values better with list on the RHS
Alan T. DeKok [Thu, 5 Oct 2023 19:08:27 +0000 (15:08 -0400)] 
handle multiple values better with list on the RHS

If we have :=, then create multiple values.

if we have other operators, then only create the first one,
and then apply the operations to it

don't create multiple copies of local variables

2 years agosplit out comparison from binary ops
Alan T. DeKok [Thu, 5 Oct 2023 18:48:56 +0000 (14:48 -0400)] 
split out comparison from binary ops

there's no real reason for them to be the same

2 years agoallow n-ary operations for time delta, too
Alan T. DeKok [Thu, 5 Oct 2023 18:48:39 +0000 (14:48 -0400)] 
allow n-ary operations for time delta, too

2 years agoadd calc n-ary op, for add, or, and, xor, etc.
Alan T. DeKok [Thu, 5 Oct 2023 14:09:12 +0000 (10:09 -0400)] 
add calc n-ary op, for add, or, and, xor, etc.

This should make expressions a bit more efficient, as there will
be fewer intermediate nodes, and more work will be done at parse
time.

The expr wrappers aren't done, so that needs adding.  We will have
to do some cleanups of the resolve, etc. code for that to be best.

The logical operators || and && aren't implemented in calc.c,
because they are short-circuit operators, and calc.c gets a fully
evaluated list of value-boxes.

That being said, it's likely not much work to add short-circuit
operators to the calc.c code.

2 years agoRevert to real dictionary if that's where the attribute is found
Nick Porter [Thu, 5 Oct 2023 18:33:58 +0000 (19:33 +0100)] 
Revert to real dictionary if that's where the attribute is found

2 years agohoist the attr ref fixups to be more specific
Alan T. DeKok [Wed, 4 Oct 2023 15:15:35 +0000 (11:15 -0400)] 
hoist the attr ref fixups to be more specific

2 years agoone more case of fill in attribute ref for aliases
Alan T. DeKok [Wed, 4 Oct 2023 15:10:00 +0000 (11:10 -0400)] 
one more case of fill in attribute ref for aliases

2 years agodon't use `...`, in preparation for moving to %exec()
Alan T. DeKok [Wed, 4 Oct 2023 14:50:43 +0000 (10:50 -0400)] 
don't use `...`, in preparation for moving to %exec()

2 years agoclean up after other fix
Alan T. DeKok [Wed, 4 Oct 2023 14:48:49 +0000 (10:48 -0400)] 
clean up after other fix

using

if (&reply.WiMAX.Capability.Release == "foo")

will now parse correctly, but will fail at run time.  The
Release attribute should be parented by Capability, but it is not.

So we need more tests for aliases :(

2 years agoallow lists to be updated from exec
Alan T. DeKok [Wed, 4 Oct 2023 14:34:32 +0000 (10:34 -0400)] 
allow lists to be updated from exec

2 years agoremove old expansions from docs and tests
Alan T. DeKok [Wed, 4 Oct 2023 12:31:40 +0000 (08:31 -0400)] 
remove old expansions from docs and tests

2 years agoremove final reference to string: expansion
Alan T. DeKok [Wed, 4 Oct 2023 12:22:57 +0000 (08:22 -0400)] 
remove final reference to string: expansion

2 years agomore formatting
Alan T. DeKok [Wed, 4 Oct 2023 00:55:24 +0000 (20:55 -0400)] 
more formatting

2 years agowe don't support vendor name as a flag.
Alan T. DeKok [Wed, 4 Oct 2023 00:54:13 +0000 (20:54 -0400)] 
we don't support vendor name as a flag.

2 years agorun through the formatter
Alan T. DeKok [Wed, 4 Oct 2023 00:49:04 +0000 (20:49 -0400)] 
run through the formatter

2 years agoallow "parent = ..." in extended attribute vendor format
Alan T. DeKok [Wed, 4 Oct 2023 00:48:30 +0000 (20:48 -0400)] 
allow "parent = ..." in extended attribute vendor format

2 years agoAdd validation for attrlen (CID #504038)
James Jones [Tue, 3 Oct 2023 19:52:37 +0000 (14:52 -0500)] 
Add validation for attrlen (CID #504038)

To satisfy coverity that attrlen is validated, insist that the
sum of the attrlen values doesn't exceed what's left of the
packet length after the header. It's done inside the loop so
each new attrlen value is checked to make coverity happy.

2 years agoswitch over the correct type
Alan T. DeKok [Tue, 3 Oct 2023 20:14:54 +0000 (16:14 -0400)] 
switch over the correct type

2 years agouse correct API
Alan T. DeKok [Tue, 3 Oct 2023 19:32:50 +0000 (15:32 -0400)] 
use correct API

2 years agouse correct API
Alan T. DeKok [Tue, 3 Oct 2023 19:32:50 +0000 (15:32 -0400)] 
use correct API

2 years agopeople shouldn't use common names
Alan T. DeKok [Tue, 3 Oct 2023 16:26:31 +0000 (12:26 -0400)] 
people shouldn't use common names

2 years agoUpdate comment on reference for VLAN Query Protocol (#5198)
James Jones [Tue, 3 Oct 2023 16:09:30 +0000 (11:09 -0500)] 
Update comment on reference for VLAN Query Protocol (#5198)

http://www.hackingciscoexposed.com/pdf/chapter12.pdf gives a 404,
and isn't in the Wayback Machine, so we replace it with title,
authors, publisher and date of the book.

2 years agoquiet compiler
Alan T. DeKok [Tue, 3 Oct 2023 15:58:26 +0000 (11:58 -0400)] 
quiet compiler

2 years agoensure strings and octets are initialized
Alan T. DeKok [Tue, 3 Oct 2023 15:51:25 +0000 (11:51 -0400)] 
ensure strings and octets are initialized

2 years agoadd alias for IP-Port-*
Alan T. DeKok [Tue, 3 Oct 2023 15:45:37 +0000 (11:45 -0400)] 
add alias for IP-Port-*

2 years agoadd aliases for vendors
Alan T. DeKok [Tue, 3 Oct 2023 15:19:29 +0000 (11:19 -0400)] 
add aliases for vendors

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

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

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

2 years 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

2 years 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

2 years 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

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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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:}

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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}

2 years 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

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

2 years 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

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

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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

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

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

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

2 years 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

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

2 years 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.

2 years 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

2 years 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

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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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"