]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Nick Porter [Thu, 24 Aug 2023 10:33:46 +0000 (11:33 +0100)]
Tidy up
Nick Porter [Thu, 24 Aug 2023 10:23:36 +0000 (11:23 +0100)]
Add regex to allow ldapi:// peercred admin binds in tests
Nick Porter [Thu, 24 Aug 2023 10:22:45 +0000 (11:22 +0100)]
Allow Symas LDAP packages for test server and add ldapi:// listener
Nick Porter [Wed, 23 Aug 2023 18:34:08 +0000 (19:34 +0100)]
Rework LDAP xlat timeout / cancel callbacks
To handle the case where the request has returned but the query has not
yet resumed.
In this case there is no outstanding request to cancel.
Nick Porter [Wed, 23 Aug 2023 18:28:57 +0000 (19:28 +0100)]
Use boolean enum in ldap group membership xlat
To be consistent with SQL group membership xlat
James Jones [Wed, 23 Aug 2023 18:50:32 +0000 (13:50 -0500)]
Rename fr_dhcv4_raw_packet_recv() as fr_dhcpv4_raw_packet_recv()
Nick Porter [Wed, 23 Aug 2023 16:26:38 +0000 (17:26 +0100)]
Correct tests where xlat outputs boolean
Nick Porter [Wed, 23 Aug 2023 15:00:53 +0000 (16:00 +0100)]
Pay attention to return value of fr_trunk_request_enqueue
Nick Porter [Wed, 23 Aug 2023 15:00:02 +0000 (16:00 +0100)]
Re-work failure paths to ensure correct cleanups
Alan T. DeKok [Wed, 23 Aug 2023 17:43:06 +0000 (13:43 -0400)]
typo
Alan T. DeKok [Wed, 23 Aug 2023 16:56:37 +0000 (12:56 -0400)]
we don't need to rename the SQL-Group attribute
Alan T. DeKok [Wed, 23 Aug 2023 15:09:08 +0000 (11:09 -0400)]
the register function automatically adds our instance name
Alan T. DeKok [Wed, 23 Aug 2023 14:23:09 +0000 (10:23 -0400)]
respect group_attribute and update it to sql.group
Alan T. DeKok [Wed, 23 Aug 2023 14:19:24 +0000 (10:19 -0400)]
print error and fail if registration fails
Alan T. DeKok [Wed, 23 Aug 2023 14:16:09 +0000 (10:16 -0400)]
remove logintime module
and all references to it, and the attributes it uses
Alan T. DeKok [Wed, 23 Aug 2023 14:15:29 +0000 (10:15 -0400)]
add rule to make adoc file from configuration
Alan T. DeKok [Wed, 23 Aug 2023 13:50:57 +0000 (09:50 -0400)]
move SQL-Group ==... to %{sql.group:...}
Alan T. DeKok [Wed, 23 Aug 2023 13:12:41 +0000 (09:12 -0400)]
no escaping is done, so we don't need func _or_ uctx
Nick Porter [Wed, 23 Aug 2023 09:15:25 +0000 (10:15 +0100)]
Use a dummy escape function to satisfy xlat arg validation
Alan T. DeKok [Wed, 23 Aug 2023 01:36:04 +0000 (21:36 -0400)]
add %{sql.group:name}
to replace SQL-Group == ...
which was misleading because it didn't allow !=, or =~, etc.
Alan T. DeKok [Wed, 23 Aug 2023 01:18:45 +0000 (21:18 -0400)]
move group check to stand-alone function
in preparation for adding %{sql.group:name}
Alan T. DeKok [Tue, 22 Aug 2023 19:55:01 +0000 (15:55 -0400)]
warn on not removing immutable attribute
Jorge Pereira [Wed, 23 Aug 2023 01:08:11 +0000 (22:08 -0300)]
Fix missing \n (#5155)
Arran Cudbard-Bell [Tue, 22 Aug 2023 21:46:17 +0000 (15:46 -0600)]
Make the configure scripts work better on macOS
Alan T. DeKok [Tue, 22 Aug 2023 14:39:10 +0000 (10:39 -0400)]
cleanups as per unit tests
Alan T. DeKok [Tue, 22 Aug 2023 14:11:59 +0000 (10:11 -0400)]
force these flags, too
Alan T. DeKok [Tue, 22 Aug 2023 13:01:55 +0000 (09:01 -0400)]
don't sort if the list is already flat.
That breaks things due to key fields + child structs
Alan T. DeKok [Tue, 22 Aug 2023 12:57:28 +0000 (08:57 -0400)]
make sorting a bit better
like attributes are now sorted together
Alan T. DeKok [Tue, 22 Aug 2023 12:43:48 +0000 (08:43 -0400)]
also print out offset if the input is long
Alan T. DeKok [Tue, 22 Aug 2023 12:43:28 +0000 (08:43 -0400)]
show which attribute had the issue
Arran Cudbard-Bell [Tue, 22 Aug 2023 02:03:52 +0000 (20:03 -0600)]
Have struct encoder return the PAIR_ENCODE_FATAL_ERROR constant
Arran Cudbard-Bell [Mon, 21 Aug 2023 23:40:44 +0000 (17:40 -0600)]
ldap: Typo
Arran Cudbard-Bell [Mon, 21 Aug 2023 22:58:16 +0000 (16:58 -0600)]
xlat: Fix xlat alternations that use functions
Arran Cudbard-Bell [Thu, 17 Aug 2023 21:17:13 +0000 (15:17 -0600)]
ldap: Print why URI parsing failed
Alan T. DeKok [Mon, 21 Aug 2023 22:19:46 +0000 (18:19 -0400)]
let's make tests pass
Alan T. DeKok [Mon, 21 Aug 2023 21:58:41 +0000 (17:58 -0400)]
+= also means "create if it doesn't exist"
at least for operations where "+=" is meaningful
We probably want to do something similar for union, merge, etc.
if the LHS doesn't exist.
Alan T. DeKok [Mon, 21 Aug 2023 21:37:44 +0000 (17:37 -0400)]
update for new behavior of :=
Alan T. DeKok [Mon, 21 Aug 2023 21:19:58 +0000 (17:19 -0400)]
hoist checks to be more consistent
Alan T. DeKok [Mon, 21 Aug 2023 21:15:19 +0000 (17:15 -0400)]
update behavior of :=
if RHS expansion fails, it still nukes all of the LHS
James Jones [Mon, 21 Aug 2023 19:02:21 +0000 (14:02 -0500)]
Reassure coverity (CID #
1504052 ) (#5152)
Non-group structural type attributes may always have a namespace
hash table, but coverity can't figure that out.
Alan T. DeKok [Mon, 21 Aug 2023 16:22:39 +0000 (12:22 -0400)]
force flatten unless migration flags are set
this means we can safely update all of the decoders to create
nested attributes
Alan T. DeKok [Mon, 21 Aug 2023 16:16:54 +0000 (12:16 -0400)]
add flatten migration configuration
it turns out "unflatten" is hard, so we need to find a better way
to deal with things
Alan T. DeKok [Mon, 21 Aug 2023 15:18:45 +0000 (11:18 -0400)]
print out more text around mismatch so we can better find it
Alan T. DeKok [Mon, 21 Aug 2023 15:18:27 +0000 (11:18 -0400)]
add unflatten_after_encode for test API
Alan T. DeKok [Mon, 21 Aug 2023 15:17:18 +0000 (11:17 -0400)]
handle key fields in unflatten
Alan T. DeKok [Mon, 21 Aug 2023 14:41:15 +0000 (10:41 -0400)]
if there's no "next", then we don't need a comma
Alan T. DeKok [Mon, 21 Aug 2023 12:38:58 +0000 (08:38 -0400)]
use correct name
Alan T. DeKok [Mon, 21 Aug 2023 01:06:05 +0000 (21:06 -0400)]
clean up and comments
Alan T. DeKok [Mon, 21 Aug 2023 00:56:49 +0000 (20:56 -0400)]
notes on immutable children of temporary attibutes
Alan T. DeKok [Mon, 21 Aug 2023 00:48:00 +0000 (20:48 -0400)]
allow operations on list which has some immutable values
Alan T. DeKok [Mon, 21 Aug 2023 00:45:31 +0000 (20:45 -0400)]
use vp_ name for immutable field
Alan T. DeKok [Sun, 20 Aug 2023 22:22:05 +0000 (18:22 -0400)]
we can copy immutable values, and the copy is mutable
Alan T. DeKok [Sun, 20 Aug 2023 15:33:40 +0000 (11:33 -0400)]
add undocumented immutable xlat, and test based on it
Alan T. DeKok [Sun, 20 Aug 2023 14:33:52 +0000 (10:33 -0400)]
add immutable flag, and check it most places
the main purpose of immutable flags is to prevent users from
modifying values that the server wants to keep around.
As a result, the main checks for immutable values are in the
various editing routines:
src/lib/util/calc.c - cannot store results to immutable leaves
src/lib/util/edit.c - cannot edit immutable values
or delete immutable leaves from lists
src/lib/unlang/edit.c - cannot store to immutable leaves
Many of the internal value box / pair APIs will ignore the
immutable flag, and happily over-write values. This behavior
is likely good enough for now. The intention is to stop admins
from doing stupid things, and not to prevent the internal code
from doing what makes sense.
There is currently no flag in structural VPs which says "contains
an immutable child". The edit code therefore has to check each
time by walking the list recursively. That's fine for now.
There is as yet no code to set the immutable flag, or unit tests.
The goal is to have the decoders set the immutable flag as necessary,
which means that they don't need to save / restore attributes with
special meaning.
Alan T. DeKok [Sun, 20 Aug 2023 13:47:49 +0000 (09:47 -0400)]
hoist the secret flag on fr_pair_value_copy() too
Alan T. DeKok [Sat, 19 Aug 2023 14:51:13 +0000 (10:51 -0400)]
copy tests from keywords/xlat-dhcpv4
Alan T. DeKok [Sat, 19 Aug 2023 12:57:20 +0000 (08:57 -0400)]
migrate more tests to new methods
Alan T. DeKok [Thu, 17 Aug 2023 20:49:24 +0000 (16:49 -0400)]
remove unused definitions
James Jones [Fri, 18 Aug 2023 13:54:39 +0000 (08:54 -0500)]
Get rid of remaining unchecked return value (CID #
1533664 , #
1524617 )
Nick Porter [Thu, 17 Aug 2023 19:10:45 +0000 (20:10 +0100)]
Tidy up on connection close
James Jones [Thu, 17 Aug 2023 19:34:23 +0000 (14:34 -0500)]
Switch from ntohs() to fr_nbo_to_uint16() (CID #
1243443 )
Takes advantage of coverity thinking fr_nbo_to_foo() taints
the passed pointer, which here is it's only use, while the
returned value is used several times.
James Jones [Thu, 17 Aug 2023 15:15:17 +0000 (10:15 -0500)]
Check returns of [sd]buff write functions (CIDs listed below)
CIDs:
1624616 ,
1524609 ,
1524611 ,
1524618 ,
1524615
Nick Porter [Thu, 17 Aug 2023 17:13:12 +0000 (18:13 +0100)]
Revert "Remove closed connections from the parent's tracking list"
This reverts commit
bac1129ed8dab05a976fd97cbcd6df98276104ff .
Nick Porter [Thu, 17 Aug 2023 17:01:14 +0000 (18:01 +0100)]
Remove closed connections from the parent's tracking list
Alan T. DeKok [Thu, 17 Aug 2023 12:46:50 +0000 (08:46 -0400)]
various coverity fixes
Alan T. DeKok [Wed, 16 Aug 2023 13:48:41 +0000 (09:48 -0400)]
allow &leaf += { list }
which applies all of the list to the first found version of "leaf"
Alan T. DeKok [Wed, 16 Aug 2023 12:26:05 +0000 (08:26 -0400)]
move "Alive" to dictionary.compat
it's not defined in any RFC
Arran Cudbard-Bell [Thu, 17 Aug 2023 04:47:02 +0000 (22:47 -0600)]
rlm_sql_mysql: Formatting
Arran Cudbard-Bell [Wed, 16 Aug 2023 22:40:41 +0000 (16:40 -0600)]
rlm_sql_mysql: Check validity of conn
If conn's magic number is still good, then there's an extremely high chance conn->sock != NULL. Closes #5144
Jorge Pereira [Tue, 15 Aug 2023 17:25:25 +0000 (14:25 -0300)]
Improve sql_pair_afrom_row() debug output
It will change the result for:
e.g:
Tue Aug 15 14:24:21 2023: (0) sql - Found row[1]: Acct-Input-Gigawords := 8192
Alan T. DeKok [Tue, 15 Aug 2023 23:56:19 +0000 (19:56 -0400)]
Use canonicalized names for Acct-Status-Type
Alive is Livingston or maybe Cistron? It's not in RFC 2059 or
RFC 2139. RFC 2866 has Interim-Update:
https://www.rfc-editor.org/rfc/rfc2866.html#section-5.1
So we change the "accounting" type to Interim-Update, and add
a unit test which verifies that any attempt to read Alive will
result in the server printing Interim-Update
James Jones [Fri, 4 Aug 2023 18:56:57 +0000 (13:56 -0500)]
Check returns (CID #
1538387 )
Humans can figure out that
FR_DBUFF_REMAINING_RETURN(&foo, bar);
implies that one can safely write bar bytes to the dbuff foo,
but coverity can't. There's another use, in fr_tacacs_encode(),
but the following operations using the dbuff are checked there.
James Jones [Thu, 10 Aug 2023 22:06:27 +0000 (17:06 -0500)]
Attempt at a simpler uninit local buffer workaround (CIDs below)
CIDs:
1506690 ,
1506689 ,
1504436 ,
1504041 ,
1504020 ,
1503918
This doesn't name the uninitialized local array, but instead
goes via the sbuff/dbuff API to get to the data.
Jorge Pereira [Thu, 13 Oct 2022 22:06:11 +0000 (19:06 -0300)]
radeapol_uat: Add new script for user tests
We need something similar to scripts/util/raduat, but instead of using radclient. it needs to be implemented in python calling the eapol_test.
the python one needs to also take an eapol_test config as part of the request
as a separate file like:
"my_peap_test", "my_peap_test_conf", "my_peap_test_expected"
"my_peap_test" contains all the attributes we want to send
"my_peap_test_conf" contains the eapol test config
"my_peap_test_expected' contains the attributes we want to see , and whether it'll be an Access-Accept or Access-Reject
the python script needs to implement something similar to raduat, with how the test files are laid out
it needs to take "my_peap_test", "my_peap_test_conf", and figure out how to pass them to eapol_test (maybe using the radict)
i.e. how to get the attributes out of "my_peap_test" and pass them in a format eapol_test wants
passing the config and when eapol_test finishes, checking to see if the attributes it returned match "my_peap_test_expected"
Arran Cudbard-Bell [Tue, 15 Aug 2023 22:48:40 +0000 (16:48 -0600)]
There's no need to load in the suppressions file
Arran Cudbard-Bell [Tue, 15 Aug 2023 22:46:35 +0000 (16:46 -0600)]
alphabetize leaks
Alan T. DeKok [Tue, 15 Aug 2023 20:33:52 +0000 (16:33 -0400)]
we only care that it doesn't crash.
We don't care what the results are
Alan T. DeKok [Tue, 15 Aug 2023 20:07:25 +0000 (16:07 -0400)]
allow '=' for list assignment to leaf types, too
Alan T. DeKok [Tue, 15 Aug 2023 12:26:07 +0000 (08:26 -0400)]
clear out old resume function and rctx
when we have two xlats in a row, the first one might need to be
resumed, so it pushes a resume ctx onto the stack. It then returns
"done", and the xlat evaluator goes to the next xlat node.
However, the next xlat node might _not_ push a resume function onto
the stack. So when the evaluator resumes, it will see the first
resume function and rctx, and call it again. Cue boom.
The solution is on DONE, replace the resume function / rctx with
a NULL one which does nothing.
Alan T. DeKok [Tue, 15 Aug 2023 12:25:38 +0000 (08:25 -0400)]
copy from v3.2.x
Jorge Pereira [Mon, 14 Aug 2023 22:49:25 +0000 (19:49 -0300)]
Fix typos
Alan T. DeKok [Mon, 14 Aug 2023 16:16:44 +0000 (12:16 -0400)]
remove diag, as some compilers don't understand it
Alan T. DeKok [Mon, 14 Aug 2023 12:41:18 +0000 (08:41 -0400)]
clean up for semicolons
Alan T. DeKok [Sat, 12 Aug 2023 13:39:24 +0000 (09:39 -0400)]
move wimax tests to new framework
Matthew Newton [Fri, 11 Aug 2023 22:35:02 +0000 (23:35 +0100)]
CI: use correct inputs
Arran Cudbard-Bell [Fri, 11 Aug 2023 20:47:27 +0000 (14:47 -0600)]
json: Another test
Alan T. DeKok [Fri, 11 Aug 2023 13:33:27 +0000 (09:33 -0400)]
delay commas until necessary
we have a host of stopping conditions, which can be nested.
As a result, a simple `next != NULL` check isn't enough to
determine if we need to write out a comma. Instead, we delay
the comma until necessary.
Alan T. DeKok [Fri, 11 Aug 2023 13:27:23 +0000 (09:27 -0400)]
remove extraneous ,
Alan T. DeKok [Thu, 10 Aug 2023 16:03:51 +0000 (12:03 -0400)]
clean up fr_pair_list_print() and make it work in more situations
Alan T. DeKok [Wed, 9 Aug 2023 17:21:32 +0000 (13:21 -0400)]
remove extraneous assert
Arran Cudbard-Bell [Wed, 9 Aug 2023 22:24:03 +0000 (16:24 -0600)]
json: various fixes
Arran Cudbard-Bell [Wed, 9 Aug 2023 21:29:38 +0000 (15:29 -0600)]
json: Modify json_quote function to be more useful
Output can now be interpolated with other JSON text and will always produce valid JSON values.
Arran Cudbard-Bell [Thu, 3 Aug 2023 21:30:53 +0000 (15:30 -0600)]
initialise with zero length strings
Alan T. DeKok [Wed, 9 Aug 2023 14:55:44 +0000 (10:55 -0400)]
it helps to parse psk_identity etc. in the client configuration
James Jones [Tue, 8 Aug 2023 19:57:23 +0000 (14:57 -0500)]
typo
Alan T. DeKok [Tue, 8 Aug 2023 19:59:20 +0000 (15:59 -0400)]
add and use fr_pair_legacy_print_nested flag
so that we can update the tests to print flat attributes as nested,
without updating all of the tests.
The next step is to set the flag in the tests, so that the tests
will parse flat attributes, but will always print nested ones.
Alan T. DeKok [Tue, 8 Aug 2023 14:30:04 +0000 (10:30 -0400)]
unify "attribute" and "pair" commands
the "attribute" command parsed a pair or a list of pairs, as did
the "pair" command. But the "pair" command did it manually, which
meant that it was unable to correctly deal with structural attributes
Alan T. DeKok [Tue, 8 Aug 2023 14:25:22 +0000 (10:25 -0400)]
this was unused by anything
Nick Porter [Tue, 8 Aug 2023 14:55:05 +0000 (15:55 +0100)]
Add Ruckus attributes from Cloudpath config
Alan T. DeKok [Tue, 8 Aug 2023 12:57:19 +0000 (08:57 -0400)]
remove stray assert