]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Thu, 20 Jul 2023 17:48:40 +0000 (13:48 -0400)]
remove all tests we don't want, instead of using elsif
Alan T. DeKok [Thu, 20 Jul 2023 13:17:01 +0000 (09:17 -0400)]
add and use "safe" fields for LDAP and SQL
which means that if we escape data once, it is not escaped again.
For SQL, the escape function is tracked per driver. So you can't
escape something for MySQL, and then later use it for PostgreSQL
without that _also_ being escaped.
Alan T. DeKok [Thu, 20 Jul 2023 12:50:06 +0000 (08:50 -0400)]
define macro for automatically setting "safe" values
Alan T. DeKok [Thu, 20 Jul 2023 12:39:50 +0000 (08:39 -0400)]
"safe" values can still be tainted.
Users of that data who understand this particular value of the "safe"
flagmar can then ignore the "tainted" flag, and use the value as if it
was untainted. Every other user of the data must still treat it as
tainted.
Alan T. DeKok [Thu, 20 Jul 2023 12:13:03 +0000 (08:13 -0400)]
fr_value_box_alloc() does not need to take a "tainted" flag
a bare box is not tainted. In the few cases where the data is
tainted, it is copied from a tainted source via fr_value_box_copy(),
which also copies the tainted flag
Alan T. DeKok [Thu, 20 Jul 2023 11:52:00 +0000 (07:52 -0400)]
ancestors must be structural
Alan T. DeKok [Thu, 20 Jul 2023 11:51:43 +0000 (07:51 -0400)]
member_num starts at 1, not 0
Alan T. DeKok [Thu, 20 Jul 2023 11:49:41 +0000 (07:49 -0400)]
add fr_box() generic
which only works for some leaf types, as there string / octets
types need also to deal with length and talloc issues. Other types
like ipaddr need to check the contents of the source.
Alan T. DeKok [Mon, 17 Jul 2023 19:28:12 +0000 (15:28 -0400)]
start setting migration flags
Alan T. DeKok [Mon, 17 Jul 2023 18:48:37 +0000 (14:48 -0400)]
more change vp->da->type to vp->vp_type
Alan T. DeKok [Mon, 17 Jul 2023 18:47:43 +0000 (14:47 -0400)]
vp_type and da->type are allowed to be different for COMBO_IP
Alan T. DeKok [Mon, 17 Jul 2023 18:47:08 +0000 (14:47 -0400)]
ensure that vp->vp_data is initialized correctly
Alan T. DeKok [Mon, 17 Jul 2023 18:25:04 +0000 (14:25 -0400)]
remove unused function
Alan T. DeKok [Mon, 17 Jul 2023 18:13:16 +0000 (14:13 -0400)]
change vp->da->type to vp->vp_type
not only is it friendlier to cache locality, it's more correct
because of things like FR_TYPE_COMBO_IPADDR, where the realized
vp->vp_type is different from the theoretical da->type
Nick Porter [Mon, 17 Jul 2023 15:37:52 +0000 (16:37 +0100)]
Make debug_ policies a little simpler
Removes some noise from the debug output
Nick Porter [Mon, 17 Jul 2023 15:35:31 +0000 (16:35 +0100)]
There is no coa list anymore
Alan T. DeKok [Mon, 17 Jul 2023 12:50:35 +0000 (08:50 -0400)]
clean up
delete advice and descriptions which are ancient and out of date
Alan T. DeKok [Mon, 17 Jul 2023 12:28:42 +0000 (08:28 -0400)]
make fr_tacacs_packet_log_hex() take and check a length field
Nick Porter [Mon, 17 Jul 2023 10:31:18 +0000 (11:31 +0100)]
Clarify "session" section in TACACS virtual server
Nick Porter [Mon, 17 Jul 2023 10:08:13 +0000 (11:08 +0100)]
Update password attribute references to use Password.xxx format
Alan T. DeKok [Sun, 16 Jul 2023 11:27:10 +0000 (07:27 -0400)]
add macros fror pair_nested_tests
Alan T. DeKok [Sun, 16 Jul 2023 02:00:29 +0000 (22:00 -0400)]
move switch to array lookup
Alan T. DeKok [Sun, 16 Jul 2023 01:55:35 +0000 (21:55 -0400)]
more checks
seems like a heisenbug?
Alan T. DeKok [Sun, 16 Jul 2023 01:24:28 +0000 (21:24 -0400)]
remove update
and re-enable additional check, as the APIs have been updated
as per the comment which disabled the test
Alan T. DeKok [Sun, 16 Jul 2023 01:22:03 +0000 (21:22 -0400)]
remove update
Alan T. DeKok [Sun, 16 Jul 2023 01:18:18 +0000 (21:18 -0400)]
simplify test_fr_pair_list_copy_by_ancestor
Alan T. DeKok [Fri, 14 Jul 2023 20:56:24 +0000 (16:56 -0400)]
note migration flags for tests
Alan T. DeKok [Fri, 14 Jul 2023 20:52:38 +0000 (16:52 -0400)]
re-enable test which over-writes default list
Alan T. DeKok [Fri, 14 Jul 2023 20:50:09 +0000 (16:50 -0400)]
don't use "update"
Alan T. DeKok [Fri, 14 Jul 2023 20:37:13 +0000 (16:37 -0400)]
don't automatically create the key field for nested structs.
The old code didn't do it, so we shouldn't do it either.
Alan T. DeKok [Fri, 14 Jul 2023 20:24:35 +0000 (16:24 -0400)]
update fr_pair_list_copy_by_ancestor()
if we see a TLV, we just copy that. The function can then work
both with nested and non-nested attributes.
we don't need to pass "count", as the only caller always says
"copy all of them"
Arran Cudbard-Bell [Fri, 14 Jul 2023 14:18:36 +0000 (08:18 -0600)]
Fix auto-added strerror header
Arran Cudbard-Bell [Fri, 14 Jul 2023 14:13:06 +0000 (08:13 -0600)]
Revert "assert that the channel has no running requests before ACK close"
This reverts commit
bdec27409cda11b9432c583748bfac69241a118b .
Alan T. DeKok [Fri, 14 Jul 2023 13:30:12 +0000 (09:30 -0400)]
assert that the channel has no running requests before ACK close
and cancel all of the related requests when the worker is signalled
to exit.
Alan T. DeKok [Fri, 14 Jul 2023 13:27:36 +0000 (09:27 -0400)]
add parse_new_conditions migration flag
and set it to "true" by default. So that the condition tests
will all be run through both the old fr_cond_tokenize() function,
and the new xlat_tokenize_condition() function.
Alan T. DeKok [Fri, 14 Jul 2023 13:01:51 +0000 (09:01 -0400)]
mdd migration flag for nested pairs, and test it
Nick Porter [Fri, 14 Jul 2023 09:46:26 +0000 (10:46 +0100)]
Pacify Coverity (CID #
1506302 )
Nick Porter [Fri, 14 Jul 2023 09:11:29 +0000 (10:11 +0100)]
Extract packet code even if body is not encrypted
Alan T. DeKok [Thu, 13 Jul 2023 18:35:20 +0000 (14:35 -0400)]
Revert "revert DHCPv6 struct_nested patch"
This reverts commit
500ee71862765d26694e52b41169958406347334 .
Alan T. DeKok [Thu, 13 Jul 2023 18:35:10 +0000 (14:35 -0400)]
it helps to initialize fields
Arran Cudbard-Bell [Thu, 13 Jul 2023 22:04:47 +0000 (16:04 -0600)]
Fix hangs/crashes on exit if thread instantiation fails
Arran Cudbard-Bell [Thu, 13 Jul 2023 21:17:50 +0000 (15:17 -0600)]
network: Use an explicit exiting flag instead of a started flag
Arran Cudbard-Bell [Thu, 13 Jul 2023 21:15:15 +0000 (15:15 -0600)]
atexit: Support checking if the thread is exiting
Nick Porter [Thu, 13 Jul 2023 18:24:35 +0000 (19:24 +0100)]
Use filename from PAIR_LIST in debug output
Gives the correct file that the entry was originally read from
Nick Porter [Thu, 13 Jul 2023 18:22:07 +0000 (19:22 +0100)]
More user name -> key in rlm_files debug output
Nick Porter [Thu, 13 Jul 2023 18:21:10 +0000 (19:21 +0100)]
Add tests of < and > comparison in rlm_files
And exercise use of $INCLUDE
Alan T. DeKok [Thu, 13 Jul 2023 18:26:41 +0000 (14:26 -0400)]
revert DHCPv6 struct_nested patch
It seems to randomly set the flag to "true" locally and in CI.
even though ASAN doesn't complain
Alan T. DeKok [Thu, 13 Jul 2023 17:26:12 +0000 (13:26 -0400)]
add decode flags for nested structs
nothing uses them right now, but it's a good way to track what
needs to be changed.
Alan T. DeKok [Thu, 13 Jul 2023 16:12:16 +0000 (12:12 -0400)]
add -S pair_legacy_nested=true
and set it for keyword tests.
Except for map-xlat-struct, which calls fr_pair_afrom_da_depth_nested()
with a struct that has a "key" field.
update pair.c to correctly create and auto-populate the key field,
and create the child struct correctly.
map-xlat-struct fails because the output now contains a key field,
and is nested. But that is easy enough to fix when we move over
to fully nested.
Nick Porter [Thu, 13 Jul 2023 15:48:02 +0000 (16:48 +0100)]
rlm_files are not just keyed off user names
Nick Porter [Thu, 13 Jul 2023 15:47:26 +0000 (16:47 +0100)]
Cast pointer to correct type
Nick Porter [Thu, 13 Jul 2023 15:21:54 +0000 (16:21 +0100)]
Reference the correct list for comparisons in rlm_files data
If it's internal attriubtes - stay with the control list
Protocol attributes are compared in the request list
Alan T. DeKok [Thu, 13 Jul 2023 15:33:10 +0000 (11:33 -0400)]
add and export migration flag for pair_legacy_nested
Alan T. DeKok [Thu, 13 Jul 2023 14:52:10 +0000 (10:52 -0400)]
more debugging
James Jones [Tue, 11 Jul 2023 20:42:13 +0000 (15:42 -0500)]
Check for error return from fr_sbuff_in_bstrncpy() (CID #
1503901 )
Alan T. DeKok [Thu, 13 Jul 2023 14:36:45 +0000 (10:36 -0400)]
more debug output
James Jones [Thu, 13 Jul 2023 13:49:11 +0000 (08:49 -0500)]
Rewrite length check so coverity will recognize it (CID #
1445221 )
As the result of byte-swapping, coverity considers it tainted. It
appears that coverity only recognizes comparisons with the alleged
tainted value on the LHS as validation, so we rewrite the check
as an equivalent chack that coverity wil recognize.
Alan T. DeKok [Thu, 13 Jul 2023 14:23:32 +0000 (10:23 -0400)]
add tests for DEFAULT and User-Name==
The == comparison doesn't work. :(
Alan T. DeKok [Thu, 13 Jul 2023 13:50:07 +0000 (09:50 -0400)]
clean up fr_pair_list_move_op() and uses
some users didn't free the source list. But it should really have
been freed. So we move the free into fr_pair_list_move_op()
and do other minor cleanups of the function and users
Nick Porter [Thu, 13 Jul 2023 08:48:26 +0000 (09:48 +0100)]
If parsing attributes fails, discard temporary list
Nick Porter [Thu, 13 Jul 2023 07:35:23 +0000 (08:35 +0100)]
Pacify Coverity (CID #
1538294 and #
1538293 )
Alan T. DeKok [Wed, 12 Jul 2023 19:11:51 +0000 (15:11 -0400)]
add missing file
Nick Porter [Wed, 12 Jul 2023 18:38:52 +0000 (19:38 +0100)]
Minor debug message improvements
Alan T. DeKok [Wed, 12 Jul 2023 18:05:34 +0000 (14:05 -0400)]
update for tested VPs
if we set the nested flag "true" and edit the tests, they should
all now pass.
Alan T. DeKok [Wed, 12 Jul 2023 18:04:54 +0000 (14:04 -0400)]
split out separate function
so we can create nested VPs, starting from an intermediate point
Alan T. DeKok [Wed, 12 Jul 2023 13:38:02 +0000 (09:38 -0400)]
move tmp_list to caller
because the fr_pair_list_afrom_file() function already created
a temporary list. So there isn't much point in creating an
additional one.
Nick Porter [Wed, 12 Jul 2023 14:29:25 +0000 (15:29 +0100)]
Quiet both Coverity and clang scan
Nick Porter [Wed, 12 Jul 2023 14:21:58 +0000 (15:21 +0100)]
The xlat is %{urlquote: } not %{urlencode: }
James Jones [Wed, 12 Jul 2023 13:13:04 +0000 (08:13 -0500)]
Pull side effects out of TEST_CHECK() (CID #
1538288 )
Alan T. DeKok [Wed, 12 Jul 2023 12:45:02 +0000 (08:45 -0400)]
use correct number
Alan T. DeKok [Wed, 12 Jul 2023 12:22:51 +0000 (08:22 -0400)]
parse conditional filters in attributes
&Foo[&bar == baz]
None of this works for a bunch of reason. See filter.txt for a
discussion.
* filtering on leaf attributes needs to be double-checked for
good and bad things
ok: &User-Name[&User-Name == 'bar']
better: &USer-Name[=='bar']
bad: &User-Name[&Filter-Id == 'bar]
It's probably simplest to just allow the first syntax. It's
redundant, but not wrong.
We then need to update the tokenizer to walk over the condition,
and ensure that the only attribute used in the condition is the
leaf attribute which we are checking.
* the tests are for conditions, but we do want to allow filtering
on group attributes:
&TLS-Certificate[&Common-Name == 'foo']
but the conditions don't allow comparisons on groups:
&TLS-Certificate == ...
So it makes sense to forbid
&TLS-Certificate[&Common-Name == 'foo'] == ...
until such time as we do allow conditions on groups.
* tmpl_dcursor now has an assertion if you try to use conditions
in filters. We still need to write the run-time evaluation code
which checks if the condition matches.
Nick Porter [Wed, 12 Jul 2023 10:56:01 +0000 (11:56 +0100)]
Add missing libraries to libfreeradius4 deb package
And sort into alphabetical sequence
Alan T. DeKok [Wed, 12 Jul 2023 02:59:43 +0000 (22:59 -0400)]
add tests for fr_pair_list_afrom_file()
and update the code to produce more descriptive error messages
Alan T. DeKok [Wed, 12 Jul 2023 02:03:01 +0000 (22:03 -0400)]
framework for allowing nested attributes via internal flag
which is always set to 'false' for now.
Alan T. DeKok [Wed, 12 Jul 2023 01:16:20 +0000 (21:16 -0400)]
clean up and regularize messages
Alan T. DeKok [Tue, 11 Jul 2023 20:32:04 +0000 (16:32 -0400)]
quiet coverity
Alan T. DeKok [Tue, 11 Jul 2023 18:35:36 +0000 (14:35 -0400)]
check returns. CID #
1503939 Fixes #5103
Alan T. DeKok [Tue, 11 Jul 2023 18:32:38 +0000 (14:32 -0400)]
use patsubst instead of foreach / eval
eval requires more layers of indirection
Jorge Pereira [Tue, 11 Jul 2023 17:10:49 +0000 (14:10 -0300)]
Fix 'process' dict setup by protocols
Alan T. DeKok [Tue, 11 Jul 2023 16:28:53 +0000 (12:28 -0400)]
process tests don't need to listen on the network
Alan T. DeKok [Tue, 11 Jul 2023 16:28:10 +0000 (12:28 -0400)]
add support for test.process.dhcpv4, etc
Alan T. DeKok [Tue, 11 Jul 2023 16:23:02 +0000 (12:23 -0400)]
remove debugging information
Jorge Pereira [Wed, 28 Jun 2023 15:11:35 +0000 (12:11 -0300)]
tests: Add process tests for dhcpv6
Jorge Pereira [Tue, 4 Jul 2023 01:33:55 +0000 (22:33 -0300)]
tests: Add process tests for dhcpv4
Nick Porter [Tue, 11 Jul 2023 14:59:08 +0000 (15:59 +0100)]
The automatic state machine is now working correctly for ASCII auth
Nick Porter [Tue, 11 Jul 2023 14:44:49 +0000 (15:44 +0100)]
Add TACACS authentication type to cached attriubtes
It is not in Authentication-Continue packets and caching it helps with
automatic selection of Auth-Type
Nick Porter [Tue, 11 Jul 2023 13:52:49 +0000 (14:52 +0100)]
Check TACACS authentication type using pair
The packet available here has an encrypted body - so
packet->authen_start does not point at the bytes that make up the start
of an authentication packet body.
Nick Porter [Tue, 11 Jul 2023 13:39:07 +0000 (14:39 +0100)]
Copy additional attributes into the session cache on multi packet auth
Nick Porter [Tue, 11 Jul 2023 12:27:56 +0000 (13:27 +0100)]
Add debugging to session caching and restoring
Nick Porter [Tue, 11 Jul 2023 12:27:02 +0000 (13:27 +0100)]
Populate appropirate attribute from user_message
We requested either user name or password with an appropriate "get"
reply - so put the replied data in where it makes sense.
Nick Porter [Tue, 11 Jul 2023 12:23:37 +0000 (13:23 +0100)]
Use correct code to test for "get username" reply
Nick Porter [Tue, 11 Jul 2023 12:22:51 +0000 (13:22 +0100)]
Don't decode optional attributes
Certain attributes are defined as optional, and will have zero length if
they are not present.
Alan T. DeKok [Tue, 11 Jul 2023 14:43:55 +0000 (10:43 -0400)]
stupid gnu make
Alan T. DeKok [Tue, 11 Jul 2023 14:26:41 +0000 (10:26 -0400)]
filter based on test existence, not one process_foo modules
Jorge Pereira [Fri, 30 Jun 2023 21:51:32 +0000 (18:51 -0300)]
tests: Let's use $(Q) instead of @
It's helpful to troubleshoot.
Jorge Pereira [Wed, 28 Jun 2023 15:11:26 +0000 (12:11 -0300)]
tests: Print out the module and test name
Jorge Pereira [Tue, 4 Jul 2023 01:07:10 +0000 (22:07 -0300)]
whitespace and formatting
Arran Cudbard-Bell [Tue, 11 Jul 2023 07:10:20 +0000 (01:10 -0600)]
Add comment about LDAP failing if identity is specified
Alan T. DeKok [Mon, 10 Jul 2023 20:39:01 +0000 (16:39 -0400)]
switch to assert
Alan T. DeKok [Mon, 10 Jul 2023 20:19:34 +0000 (16:19 -0400)]
remove unused assignment