]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Tue, 23 Feb 2021 16:53:23 +0000 (11:53 -0500)]
cross-check name / number for attributes
we previously looked up (and checked) duplicate attributes by name.
We now check if attributes of the same number are compatible.
If not, error out.
As a result, a number of dictionaries have to be updated in order
to have compatible types. Mostly by commenting out one of the
incompatible types.
Alan T. DeKok [Tue, 23 Feb 2021 16:13:18 +0000 (11:13 -0500)]
fix typo
Arran Cudbard-Bell [Tue, 23 Feb 2021 16:37:27 +0000 (16:37 +0000)]
Try and track down issue with redis cache driver
Nick Porter [Tue, 23 Feb 2021 16:30:44 +0000 (16:30 +0000)]
Don't add conf pairs to sections twice. (#3955)
Alan T. DeKok [Tue, 23 Feb 2021 15:30:05 +0000 (10:30 -0500)]
control sockets don't have dictionaries
Alan T. DeKok [Tue, 23 Feb 2021 15:15:31 +0000 (10:15 -0500)]
add NDEBUG to shut up compiler
Arran Cudbard-Bell [Tue, 23 Feb 2021 14:55:26 +0000 (14:55 +0000)]
Quiet GCC
Alan T. DeKok [Tue, 23 Feb 2021 14:02:16 +0000 (09:02 -0500)]
use new names
Alan T. DeKok [Tue, 23 Feb 2021 13:17:14 +0000 (08:17 -0500)]
rework arp to use process_foo methods
it still uses the entry_point_set() method until such time as
all of the other protocols are cleaned up
Alan T. DeKok [Tue, 23 Feb 2021 13:16:47 +0000 (08:16 -0500)]
add provisions to load process_foo OR proto_foo_bar
Alan T. DeKok [Tue, 23 Feb 2021 13:16:00 +0000 (08:16 -0500)]
add bootstrap and instantiate methods
Alan T. DeKok [Mon, 22 Feb 2021 17:19:10 +0000 (12:19 -0500)]
lowercase field names
it's 2021. "foo.bar" is much easier to read than "Foo.Bar".
Random Shouting Is Bad.
Alan T. DeKok [Mon, 22 Feb 2021 17:00:41 +0000 (12:00 -0500)]
rename and use new structures
Alan T. DeKok [Mon, 22 Feb 2021 17:00:19 +0000 (12:00 -0500)]
start of new process state machines
Alan T. DeKok [Mon, 22 Feb 2021 16:58:20 +0000 (11:58 -0500)]
update to new standards
Alan T. DeKok [Mon, 22 Feb 2021 15:48:27 +0000 (10:48 -0500)]
we don't always need a "set priority" function
Alan T. DeKok [Mon, 22 Feb 2021 13:44:58 +0000 (08:44 -0500)]
re-run EAP tests after re-building server / util libraries
Alan T. DeKok [Sun, 21 Feb 2021 13:17:29 +0000 (08:17 -0500)]
regenerate from the source
Alan T. DeKok [Sat, 20 Feb 2021 21:40:00 +0000 (16:40 -0500)]
more cleanups
remove "load dictionary" code from bootstrap phase.
Replace it with an assert that the dictionary exists.
move the "compile" function back to the instantiate phase.
it was erroneously moved to the bootstrap phase a few commits ago.
if there is a compile function, assert that the dictionary it uses
is the same as the dictionary used for the namespace.
load the compiler function by namespace, not by server second
name.
Arran Cudbard-Bell [Mon, 22 Feb 2021 12:25:37 +0000 (12:25 +0000)]
Fix documentation flag and re-enable -Wall for GCC
Arran Cudbard-Bell [Sun, 21 Feb 2021 10:20:39 +0000 (10:20 +0000)]
Reorder warning args
Arran Cudbard-Bell [Sat, 20 Feb 2021 23:48:25 +0000 (23:48 +0000)]
Fix other warnings
Arran Cudbard-Bell [Sat, 20 Feb 2021 23:26:43 +0000 (23:26 +0000)]
Disable -Wpoison-system-directories
Arran Cudbard-Bell [Sat, 20 Feb 2021 23:24:28 +0000 (23:24 +0000)]
Fix pedantic warning
Arran Cudbard-Bell [Sat, 20 Feb 2021 23:22:43 +0000 (23:22 +0000)]
Fix -Weverything check
Alan T. DeKok [Sat, 20 Feb 2021 20:33:13 +0000 (15:33 -0500)]
add const
Alan T. DeKok [Sat, 20 Feb 2021 18:11:11 +0000 (13:11 -0500)]
remove unused assignment
Alan T. DeKok [Sat, 20 Feb 2021 17:58:01 +0000 (12:58 -0500)]
call cf_section_has_parent
Alan T. DeKok [Sat, 20 Feb 2021 17:57:12 +0000 (12:57 -0500)]
add cf_section_has_parent()
Alan T. DeKok [Sat, 20 Feb 2021 14:29:39 +0000 (09:29 -0500)]
hard-code some dictionary rules
which makes the rest of the code much simpler, during the cleanup
process.
the "control" server has no dictionary.
eap-aka-prime, eap-aka, and eap-sim all have the same root
dictionary.
James Jones [Sat, 20 Feb 2021 17:08:38 +0000 (11:08 -0600)]
Restrict deletion during iteration to in-order. (#3952)
This requires different iterator structures for inorder traversal,
but it does enforce the constraint at compile time.
rbtree_iter_done() is now a macro using _Generic(), so at least that
doesn't have to change.
Arran Cudbard-Bell [Sat, 20 Feb 2021 14:26:53 +0000 (14:26 +0000)]
Relax asserts if we're in a policy section
Alan T. DeKok [Sat, 20 Feb 2021 14:20:25 +0000 (09:20 -0500)]
all foreign attributes should be qualified by full path
Alan T. DeKok [Sat, 20 Feb 2021 13:17:09 +0000 (08:17 -0500)]
add namespace_on_read() callback
which loads the dictionaries VERY early in the process
Arran Cudbard-Bell [Sat, 20 Feb 2021 00:33:09 +0000 (00:33 +0000)]
Be more explicit about failing when the dictionary isn't set
Alan T. DeKok [Sat, 20 Feb 2021 12:10:28 +0000 (07:10 -0500)]
push the SUB section rules, not the PARENT section rules
This bug has been the bane of my existence for quite a while now.
Alan T. DeKok [Sat, 20 Feb 2021 11:45:39 +0000 (06:45 -0500)]
move namespace_config around, and rename things
Alan T. DeKok [Sat, 20 Feb 2021 11:35:00 +0000 (06:35 -0500)]
remove FR_TYPE_ON_READ
Alan T. DeKok [Sat, 20 Feb 2021 11:25:33 +0000 (06:25 -0500)]
minor rearrangement
Alan T. DeKok [Sat, 20 Feb 2021 11:24:22 +0000 (06:24 -0500)]
update comments
Alan T. DeKok [Sat, 20 Feb 2021 02:15:20 +0000 (21:15 -0500)]
add back code
Arran Cudbard-Bell [Fri, 19 Feb 2021 23:58:47 +0000 (23:58 +0000)]
Init ctrl
Arran Cudbard-Bell [Fri, 19 Feb 2021 22:51:53 +0000 (22:51 +0000)]
Add TLS engine configuration code
Arran Cudbard-Bell [Fri, 19 Feb 2021 22:50:52 +0000 (22:50 +0000)]
Indent
Alan T. DeKok [Fri, 19 Feb 2021 18:05:06 +0000 (13:05 -0500)]
remove unused assignment
James Jones [Fri, 19 Feb 2021 19:28:25 +0000 (13:28 -0600)]
Add rbtree_iter_delete() and corresponding test. (#3949)
rbtree_iter_delete() deletes the current node in an iterator
and remembers the next one; rbtree_iter_next_inorder() notices
when that's happened and uses the saved node, otherwise it
behaves as usual.
James Jones [Fri, 19 Feb 2021 19:26:32 +0000 (13:26 -0600)]
Correct typo (#3951)
Arran Cudbard-Bell [Fri, 19 Feb 2021 16:01:01 +0000 (16:01 +0000)]
Double semi-colon
Arran Cudbard-Bell [Fri, 19 Feb 2021 15:36:16 +0000 (15:36 +0000)]
Fix cf_remove to auto covert input args
Alan T. DeKok [Fri, 19 Feb 2021 15:05:12 +0000 (10:05 -0500)]
remove unused assignments
Alan T. DeKok [Fri, 19 Feb 2021 14:34:30 +0000 (09:34 -0500)]
remove unused variable
Alan T. DeKok [Fri, 19 Feb 2021 14:34:15 +0000 (09:34 -0500)]
remove FR_TYPE_ON_READ and rename function
Alan T. DeKok [Fri, 19 Feb 2021 14:29:48 +0000 (09:29 -0500)]
rely on rule->on_read, instead of type flag
Alan T. DeKok [Fri, 19 Feb 2021 14:26:48 +0000 (09:26 -0500)]
move on_read callback to separate struct element
in preparation for getting rid of FR_TYPE_ON_READ
Alan T. DeKok [Fri, 19 Feb 2021 14:12:53 +0000 (09:12 -0500)]
add section / pair / data in alloc functions, not elsewhere
on review, most of the calls to cf_section_add() were wrong.
the child section was already added to the parent section by
_cf_section_alloc(). There were many, many, calls to
cf_item_add() or cf_section_add() which resulted in the
section being added twice.
However, cf_pair_alloc() and cf_data_alloc() did not add the item
to the parent.
In the interest of less code and fewer errors, we've removed
cf_section_add() and cf_pair_add(). The calls to cf_item_add()
are now done only from the alloc functions.
We still have many calls to cf_data_add(), because that function
is in fact allocating *and* adding the CONF_DATA items.
Alan T. DeKok [Fri, 19 Feb 2021 13:44:42 +0000 (08:44 -0500)]
remove crap code
it makes no sense to look up the parents name in the parent
CONF_PARSER?
Also add the new section to the parent AFTER the callback is done
James Jones [Fri, 19 Feb 2021 12:32:08 +0000 (06:32 -0600)]
Add pre-order and post-order rbtree iterators. (#3945)
The test we have is based on static test data with the values
appropriate for pre and post iterators determined by hand. We
can generate additional test cases as desired.
Nick Porter [Fri, 19 Feb 2021 12:30:44 +0000 (12:30 +0000)]
Fix rlm_couchbase to match new dlists of map_t (#3947)
plus correct definition of list parameter in mod_json_object_to_map()
Nick Porter [Fri, 19 Feb 2021 12:30:28 +0000 (12:30 +0000)]
Extend timeout on SMTP delivery tests to allow for slower exim performance (#3948)
Nick Porter [Thu, 18 Feb 2021 19:44:18 +0000 (19:44 +0000)]
v4: Change lists of CONF_ITEM to be dlists (#3946)
* Replace next and child pointers in CONF_ITEM with dlist entries
* Initialise dlists
* Use fr_dlist_empty() to identify empty children lists
* Replace uses of ->next pointers with dlist functions
* Don't add a section to it's parent twice
It's already added by _cf_section_alloc()
* _cf_item_add() only adds single items to the parent's children list
* Replace uses of cursor with dlist functions
* Remove cursor from CONF_ITEM structure
* Correct __cplusplus wrapper
Arran Cudbard-Bell [Wed, 17 Feb 2021 20:59:02 +0000 (20:59 +0000)]
Have the config file parser check if the files exist
Arran Cudbard-Bell [Wed, 17 Feb 2021 19:53:35 +0000 (19:53 +0000)]
Print extra operand information when debugging
Arran Cudbard-Bell [Wed, 17 Feb 2021 19:09:35 +0000 (19:09 +0000)]
Revert "disable a number of raw tests until we fix the underlying issue"
This reverts commit
1a0623b0cff8691551dcb701d22d2896c207e3a1 .
We must parse the namespace before allowing the rest of the virtual server to be parsed.
Alan T. DeKok [Wed, 17 Feb 2021 17:25:12 +0000 (12:25 -0500)]
disable a number of raw tests until we fix the underlying issue
So that we don't block others who wish to do work.
It seems that commit
a6055f25e52 changed various assumptions
throughout the code, which has these side effects. We need to
track down the root cause, and fix the assumptions. Then
re-enable the tests
Alan T. DeKok [Wed, 17 Feb 2021 16:16:54 +0000 (11:16 -0500)]
set dictionary namespace in bootstrap
so that when we compile X that calls Y, both X and Y have
their default dictionaries set
Alan T. DeKok [Wed, 17 Feb 2021 16:11:01 +0000 (11:11 -0500)]
print out virtual server name, not dictionary name
Alan T. DeKok [Wed, 17 Feb 2021 16:05:49 +0000 (11:05 -0500)]
no need for duplicate checks
Arran Cudbard-Bell [Wed, 17 Feb 2021 15:48:01 +0000 (15:48 +0000)]
Revert "Fix sign comparison"
This reverts commit
72fd3fbc45a2600a89be9a8eb9b7c472d6f27ea5 .
Arran Cudbard-Bell [Wed, 17 Feb 2021 15:41:51 +0000 (15:41 +0000)]
Fix sign comparison
Alan T. DeKok [Wed, 17 Feb 2021 14:56:54 +0000 (09:56 -0500)]
add cast
Arran Cudbard-Bell [Wed, 17 Feb 2021 14:41:10 +0000 (14:41 +0000)]
Free the child's session-state ctx if the state_child_entry_t is freed
Alan T. DeKok [Wed, 17 Feb 2021 14:21:22 +0000 (09:21 -0500)]
remove extraneous copy
v3 puts the certificates into FR_EX_TLS_INDEX_CERTS. v4 doesn't.
so there's no need to create the certs in the wrong context,
then copy them to the correct context, then delete the certs.
We can just create them in the correct context.
Move cert_vps variable into the condition in order to highlight
the fact that it's a temporary variable, used only to limit the
list of certificates being printed.
This change doesn't affect the current issues of EAP-TLS not
caching certs in session state, or it leaking the certs. But
this change is not wrong.
Alan T. DeKok [Wed, 17 Feb 2021 14:20:35 +0000 (09:20 -0500)]
use the ctx passed in, not hard-coded request_ctx
Alan T. DeKok [Wed, 17 Feb 2021 13:58:22 +0000 (08:58 -0500)]
use parent sequence number in child name
so that we don't have multiple children labelled with the same
name
Alan T. DeKok [Wed, 17 Feb 2021 13:44:31 +0000 (08:44 -0500)]
vp_date is fr_unix_time_t, not fr_time_t
unfortunately the C compiler checks on underlying data types
(uint64_t), and doesn't give warnings about typedefs.
We might want to have automated tests which check the code
for these kind of errors.
Alan T. DeKok [Wed, 17 Feb 2021 12:44:49 +0000 (07:44 -0500)]
vp_date is unix time, not fr_time_t
Alan T. DeKok [Tue, 16 Feb 2021 21:11:13 +0000 (16:11 -0500)]
clean up old code
after some inspection, the code was left over from other things.
Before we go crazy adding new features, let's clean things up
first.
Alan T. DeKok [Tue, 16 Feb 2021 20:59:34 +0000 (15:59 -0500)]
added enum / name for process_foo
so we can have processing modules for each protocol
Nick Porter [Wed, 17 Feb 2021 12:09:37 +0000 (12:09 +0000)]
Move fr_pair_list_sort() to use fr_dlist_sort() (#3943)
Nick Porter [Tue, 16 Feb 2021 18:56:04 +0000 (18:56 +0000)]
Convert lists of map_t to doubly linked lists (#3913)
* Define header of list of map_t
* Add dlist pointers to map_t structure and add macros to simplify calls
fr_map_list_init() - consistent way to initialise a dlist of map_t
fr_map_list_head() - return head of list cast to map_t * - simplifies
code when accessing elements of the head item in the list.
* Set child of map_t to be a list header and initialise list on allocation.
* Alter structures that contain lists of maps to use fr_map_list_t
* Operate directly on list head in gext
* Use fr_dlist_empty() to test for empty lists of maps
* Pass fr_map_list_t * between functions
* Use dlist functions for traversing lists rather than ->next or cursors
* Ensure all new fr_map_list_t are correctly initialised
* New version of map_sort() for fr_map_list_t
* Use dcursors in place of cursors for tracking in fr_map_list_t
* Amend calls to map_afrom_cs to pass fr_map_list_t *
* Use fr_dlist_insert_tail() to add a map_t to fr_map_list_t
* Ensure fr_map_list_t is initialised when allocating vp_list_mod_t
* Correct calls to functions which want a fr_map_list_t *
* Handle references to the first (only?) map in a structure.
* Cannot just point two map items at the start of a list now
* Correct way to remove an item from the start of fr_map_list_t
James Jones [Tue, 16 Feb 2021 18:54:21 +0000 (12:54 -0600)]
Make dbuff usage more idiomatic (#3940)
Nick Porter [Tue, 16 Feb 2021 15:15:55 +0000 (15:15 +0000)]
Only set TEST_SERVER variables for feature tests (#3938)
Prevents builds without the feature test servers from attempting to test
against servers that don't exist.
Arran Cudbard-Bell [Mon, 15 Feb 2021 21:27:39 +0000 (21:27 +0000)]
rbtree: Add inorder iterator
Arran Cudbard-Bell [Mon, 15 Feb 2021 21:26:47 +0000 (21:26 +0000)]
rbtree: Parent should be NIL not NULL
Seems like we have a mixture of comparisons. Some areas compared parent to NIL and some to NULL.
Alan T. DeKok [Mon, 15 Feb 2021 21:00:53 +0000 (16:00 -0500)]
move detail to the new location
for now, proto_detail_process is in src/listen/detail,
as a reminder that it will go away as soon as possible.
Alan T. DeKok [Mon, 15 Feb 2021 20:59:35 +0000 (15:59 -0500)]
move arp to new location
Alan T. DeKok [Mon, 15 Feb 2021 20:47:53 +0000 (15:47 -0500)]
move control socket to new location
Alan T. DeKok [Mon, 15 Feb 2021 20:45:03 +0000 (15:45 -0500)]
move dhcpclient to the "bin" directory
there's no longer any other good place for it.
Alan T. DeKok [Mon, 15 Feb 2021 20:40:33 +0000 (15:40 -0500)]
move DHCPv6 to new location
Alan T. DeKok [Mon, 15 Feb 2021 20:18:49 +0000 (15:18 -0500)]
move TACACS+ to new location
Alan T. DeKok [Mon, 15 Feb 2021 20:11:58 +0000 (15:11 -0500)]
move VMPS to new location
Alan T. DeKok [Mon, 15 Feb 2021 19:57:31 +0000 (14:57 -0500)]
move dhcpv4 to new layout
Alan T. DeKok [Mon, 15 Feb 2021 19:49:37 +0000 (14:49 -0500)]
move to new location
in preparation for better separating process state machines
from the front-end listeners
Arran Cudbard-Bell [Mon, 15 Feb 2021 17:32:52 +0000 (17:32 +0000)]
...and some more
Nick Porter [Mon, 15 Feb 2021 17:28:18 +0000 (17:28 +0000)]
v4: Change fr_pair_list_afrom_box() to work on externally created list head (#3931)
fr_pair_list_afrom_box() was previously allocating a list head and
returning that, even though the use cases were only temporary lists.
James Jones [Mon, 15 Feb 2021 17:27:44 +0000 (11:27 -0600)]
Clean up vmps dbuff usage (#3914)
James Jones [Mon, 15 Feb 2021 17:27:07 +0000 (11:27 -0600)]
Modernize radius encode use of dbuffs (#3926)
Arran Cudbard-Bell [Mon, 15 Feb 2021 17:06:23 +0000 (17:06 +0000)]
Pedantic code re-arrangement
Nick Porter [Mon, 15 Feb 2021 16:40:45 +0000 (16:40 +0000)]
Change lists in dl.c to be doubly linked lists (#3934)
Replacing the use of fr_cursor with fr_dcursor
Jorge Pereira [Mon, 15 Feb 2021 15:13:10 +0000 (12:13 -0300)]
rlm_redis: Fix configuration settings (#3936)