]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Sat, 11 Feb 2023 14:54:12 +0000 (09:54 -0500)]
comment out checks until we have fully nested VPs
Alan T. DeKok [Sat, 11 Feb 2023 14:01:12 +0000 (09:01 -0500)]
fix "can contain" for structs && key fields
Alan T. DeKok [Sat, 11 Feb 2023 13:42:05 +0000 (08:42 -0500)]
make TACACS+ PAP CHAP. and (maybe) MS-CHAP work
now that the namespaces are parsed correctly for subrequests,
we can make more things work automagically
Alan T. DeKok [Sat, 11 Feb 2023 00:29:05 +0000 (19:29 -0500)]
TACACS+ is TCP, and we don't do dedup checking
Alan T. DeKok [Fri, 10 Feb 2023 23:55:04 +0000 (18:55 -0500)]
if there's no Auth-Type, use TACACS.Packet.Authen-Type
Alan T. DeKok [Fri, 10 Feb 2023 23:54:44 +0000 (18:54 -0500)]
set inst->server_cs from parent, not from finding any server
Alan T. DeKok [Fri, 10 Feb 2023 23:47:12 +0000 (18:47 -0500)]
no need to use "-Reply-" in all of the reply names
Alan T. DeKok [Fri, 10 Feb 2023 22:32:54 +0000 (17:32 -0500)]
allow parsing of namespace
Alan T. DeKok [Fri, 10 Feb 2023 20:34:00 +0000 (15:34 -0500)]
add function to check for "da can contain other da"
really for fr_pair_t validation, but it's still useful to have a
sanity check function in the dictionary code.
Arran Cudbard-Bell [Sat, 11 Feb 2023 03:00:15 +0000 (21:00 -0600)]
json: Fix typo... Don't mis-cast integers
Arran Cudbard-Bell [Sat, 11 Feb 2023 02:13:33 +0000 (20:13 -0600)]
rest: Always emit data
Arran Cudbard-Bell [Sat, 11 Feb 2023 02:13:19 +0000 (20:13 -0600)]
Don't crash when the first component is a HTTP method
Alan T. DeKok [Fri, 10 Feb 2023 13:07:08 +0000 (08:07 -0500)]
just set "*leftover" always
no need to check for conditions, because the previous check
for "smaller than one packet" takes care of what we need.
Alan T. DeKok [Fri, 10 Feb 2023 11:23:26 +0000 (06:23 -0500)]
set leftover to 0 when we have a full packet
Alan T. DeKok [Thu, 9 Feb 2023 22:14:35 +0000 (17:14 -0500)]
don't change tmpl_rules_t parent
that's used for changing dictionaries, and nothing else tracks
or uses it.
Alan T. DeKok [Thu, 9 Feb 2023 21:30:21 +0000 (16:30 -0500)]
use "namespace" instead of "parent".
There are too many things called "parent" already
Arran Cudbard-Bell [Fri, 10 Feb 2023 03:17:10 +0000 (21:17 -0600)]
tacacs: Clear leftover when we decode a complete packet and no data is left in the buffer
This caused a spurious read, which lead to the socket being destroyed and no data being returned to the TACACS client when the initial request was fragmented
Arran Cudbard-Bell [Fri, 10 Feb 2023 03:16:17 +0000 (21:16 -0600)]
tacacs: Comments for mortals
Arran Cudbard-Bell [Thu, 9 Feb 2023 22:41:03 +0000 (16:41 -0600)]
tacacs: Print the error
Alan T. DeKok [Thu, 9 Feb 2023 21:10:04 +0000 (16:10 -0500)]
all TCP sockets are non-blocking
Alan T. DeKok [Thu, 9 Feb 2023 20:34:38 +0000 (15:34 -0500)]
remove last two arguments from tmpl_request_ref_list_from_substr()
the only two public users are the "update" code, and unit_test_attribute
we need to change the internal API to fix some other issues,
so rather than changing the public API, we just clean it up
Nick Porter [Wed, 8 Feb 2023 15:05:59 +0000 (15:05 +0000)]
json_object_afrom_pair_list only operates on leaf values
Nick Porter [Wed, 8 Feb 2023 15:06:51 +0000 (15:06 +0000)]
Replace != with !( == ) in json tests
Nick Porter [Tue, 7 Feb 2023 14:22:42 +0000 (14:22 +0000)]
Don't allow filters on list attr refs
By definition there will only ever be one instance of each list, so
filters are meaningless.
Nick Porter [Wed, 8 Feb 2023 13:42:08 +0000 (13:42 +0000)]
Convert input_list and output_list to tmpl_t
Nick Porter [Wed, 8 Feb 2023 13:45:05 +0000 (13:45 +0000)]
Remove unused tmpl_pair_list_name()
Nick Porter [Fri, 3 Feb 2023 15:48:11 +0000 (15:48 +0000)]
Remove meaninless test
Having tested the value of various attributes in the reply list, it
can't be empty
Nick Porter [Fri, 3 Feb 2023 15:50:06 +0000 (15:50 +0000)]
Correct docs and examples for %(pairs:) and %(concat:)
Nick Porter [Fri, 3 Feb 2023 15:50:49 +0000 (15:50 +0000)]
Tidy and expand pairs keyword test
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:41:40 +0000 (12:41 -0600)]
Remove final instance of tmpl_pair_list_t
Nick Porter [Thu, 2 Feb 2023 17:35:13 +0000 (17:35 +0000)]
Set missing list_def
Nick Porter [Thu, 2 Feb 2023 20:50:25 +0000 (20:50 +0000)]
Pass a ctx to cache_verify
Ensures that unlang_fixup_update() does not replace NUM_UNSPEC with
NUM_ALL
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:40:09 +0000 (12:40 -0600)]
Add tmpl_attr_head_is_list()
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:38:15 +0000 (12:38 -0600)]
Remove tmpl_s.data.attribute.list
The list is now identified by the first attr ref
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:39:28 +0000 (12:39 -0600)]
s/PAIR_LIST_<list>/request_attr_<list>/
and remove PAIR_LIST_<list> macros
Nick Porter [Thu, 26 Jan 2023 17:44:18 +0000 (17:44 +0000)]
Copy filter_type when copying tmpl attr refs
Nick Porter [Thu, 26 Jan 2023 17:50:16 +0000 (17:50 +0000)]
Update tmpl_attr_afrom_list() to work with list_as_attr
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:41:06 +0000 (12:41 -0600)]
Remove list_as_attr from tmpl_rules_t
Nick Porter [Thu, 26 Jan 2023 17:15:29 +0000 (17:15 +0000)]
List tmpls should not be NUM_ALL
There is only ever one instance of each list pair.
Nick Porter [Fri, 27 Jan 2023 08:54:45 +0000 (08:54 +0000)]
Add skip_list option to pair_append_by_tmpl_parent
With all attr tmpls having a list as the first ar, need to be able to
skip that when building into temporary lists rather than into
request->pair_root
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:40:35 +0000 (12:40 -0600)]
Remove code paths for list_as_attr != true
Nick Porter [Thu, 26 Jan 2023 17:42:18 +0000 (17:42 +0000)]
Remove unused tmpl_get_list()
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:35:45 +0000 (12:35 -0600)]
Remove TMPL_TYPE_LIST
Nick Porter [Thu, 26 Jan 2023 11:56:22 +0000 (11:56 +0000)]
Remove un-needed uses of tmpl_is_list()
Nick Porter [Thu, 26 Jan 2023 11:57:31 +0000 (11:57 +0000)]
Logic corrections
Nick Porter [Thu, 26 Jan 2023 08:14:36 +0000 (08:14 +0000)]
Correct references to "all children of a list" in tests
Nick Porter [Tue, 24 Jan 2023 11:26:44 +0000 (11:26 +0000)]
Change &list !* ANY to &list.[*] != ANY in update tests
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:37:27 +0000 (12:37 -0600)]
Define new tmpl_is_list()
Using the attr ref rather than TMPL_TYPE_LIST
Nick Porter [Wed, 25 Jan 2023 19:29:16 +0000 (19:29 +0000)]
Only check for cast if lhs is a leaf da
Nick Porter [Wed, 25 Jan 2023 19:30:29 +0000 (19:30 +0000)]
Add support for list_as_attr to cache map building
Nick Porter [Wed, 18 Jan 2023 14:15:15 +0000 (14:15 +0000)]
Minor changes in test output with list_as_attr = true
Nick Porter [Tue, 24 Jan 2023 11:27:43 +0000 (11:27 +0000)]
update-list-error works with update to edit code
Nick Porter [Tue, 24 Jan 2023 16:29:19 +0000 (16:29 +0000)]
Ensure list ar is updated by tmpl_attr_set_list()
Nick Porter [Wed, 25 Jan 2023 13:29:07 +0000 (13:29 +0000)]
Set attr ref parents when copying tmpl_attr
Nick Porter [Wed, 25 Jan 2023 19:28:22 +0000 (19:28 +0000)]
Allow for list_as_attr when maps are list to list
Nick Porter [Mon, 23 Jan 2023 15:43:43 +0000 (15:43 +0000)]
Allow &list.[*] for selected tmpl parsing
Arran Cudbard-Bell [Thu, 9 Feb 2023 17:01:08 +0000 (11:01 -0600)]
Add tmpl_attr_tail_da_is_leaf() and tmpl_attr_tail_da_is_structural()
Nick Porter [Fri, 27 Jan 2023 11:05:47 +0000 (11:05 +0000)]
Update map_to_list_mod() list to list detection
Will handle any structural to structural copy
Nick Porter [Mon, 23 Jan 2023 15:42:37 +0000 (15:42 +0000)]
Add allow_wildcard option to tmpl_attr_rules_s
Nick Porter [Tue, 24 Jan 2023 11:24:01 +0000 (11:24 +0000)]
Amend dcursor remove callback specification
Allowing the callback to do the actual list removal.
This overcomes issues with tmpl_dcursor operations where the dcursor
refers to the top level list whilst the entries need to be removed from
a child list.
Nick Porter [Tue, 24 Jan 2023 11:25:04 +0000 (11:25 +0000)]
Update callback for dcursor pair removal
To handle removing pairs from child lists
Nick Porter [Thu, 19 Jan 2023 10:49:29 +0000 (10:49 +0000)]
When resolving tmpl_attr which are children of a list attr use default dict
List attributes are in the internal dictionary rather than in a protocol
dictionary.
Arran Cudbard-Bell [Thu, 9 Feb 2023 17:00:04 +0000 (11:00 -0600)]
Reset tmpl evaluation when evaluating children of groups
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:59:23 +0000 (10:59 -0600)]
With list_as_attr, virtual attributes have two entries in the ar list
Nick Porter [Mon, 23 Jan 2023 15:35:04 +0000 (15:35 +0000)]
Add sanity to foreach - skipping structural attributes
Allows for
foreach &request.[*] { ... }
to process safely
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:58:10 +0000 (10:58 -0600)]
Fix up tmpl_attr_print()
Nick Porter [Wed, 18 Jan 2023 14:27:48 +0000 (14:27 +0000)]
No need for [*] on debug policies
Nick Porter [Wed, 18 Jan 2023 19:49:37 +0000 (19:49 +0000)]
Set the tmpl list while inserting default list ar
Nick Porter [Wed, 18 Jan 2023 13:44:20 +0000 (13:44 +0000)]
Fix up tmpl_attr_tail_is_unresolved()
Nick Porter [Thu, 19 Jan 2023 18:41:57 +0000 (18:41 +0000)]
Update tmpl_attr_afrom_attr_substr() to handle tmpls such as &reply.
&reply refers to the existence of the list, &reply. refers to the
presence of children in the list.
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:57:29 +0000 (10:57 -0600)]
Add tmpl_attr_tail_is_raw()
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:56:51 +0000 (10:56 -0600)]
Use helper function to identify unknown ar
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:55:59 +0000 (10:55 -0600)]
Add ar_is_raw() for checking for raw attr refs
Nick Porter [Wed, 18 Jan 2023 13:42:43 +0000 (13:42 +0000)]
Fix up cond_forbid_groups()
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:55:08 +0000 (10:55 -0600)]
Add tmpl_attr_is_list_attr() to check if an ar refers to a list
Nick Porter [Fri, 13 Jan 2023 16:42:50 +0000 (16:42 +0000)]
Correct delimiter
Nick Porter [Fri, 13 Jan 2023 16:55:30 +0000 (16:55 +0000)]
Correct test for invalid list
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:53:44 +0000 (10:53 -0600)]
Ensure request_attr_ DAs are initialised before they are referenced
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:47:46 +0000 (10:47 -0600)]
s/tmpl_pair_list_t/fr_dict_attr_t const */
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:45:54 +0000 (10:45 -0600)]
Use tmpl_attr_list_from_substr() to parse list names
Nick Porter [Fri, 13 Jan 2023 16:41:09 +0000 (16:41 +0000)]
Replace switch statements over tmpl lists
Nick Porter [Fri, 13 Jan 2023 16:42:20 +0000 (16:42 +0000)]
Remove pair_list_table
Nick Porter [Fri, 13 Jan 2023 13:47:03 +0000 (13:47 +0000)]
Enable visibility of request_attr_ DAs
Nick Porter [Fri, 13 Jan 2023 15:47:27 +0000 (15:47 +0000)]
Add tmpl_list_name() and use it to report list names
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:44:57 +0000 (10:44 -0600)]
Add tmpl_attr_list_from_substr() to parse a list reference
Nick Porter [Thu, 12 Jan 2023 10:00:41 +0000 (10:00 +0000)]
Set PAIR_LIST_UNKNOWN = 0 to catch where the list is not explicitly set
Nick Porter [Fri, 13 Jan 2023 13:46:09 +0000 (13:46 +0000)]
Convert PAIR_LIST_ enums to defines referencing DAs
James Jones [Thu, 9 Feb 2023 15:15:27 +0000 (09:15 -0600)]
Allow using clang 15 with -Werror and -Wunreachable-code-generic-assoc (#4884)
Pre C17, there was ambiguity about the type of the controlling expression
in __Generic(). C17 explicitly states that it is subject to rvalue
promotions, which removes qualification from the outermost (or is that
deepest?) type modifier (or the base type if there are no modifiers).
(To clarify with an example, a FOO const * const will become FOO const *
as far as __Generic() is concerned.)
clang 15, perhaps anticipating C17, has -Wunreachabale-code-generic-assoc,
which warns if a __Generic() alternative type is unreachable, e.g.
FOO const * const. This change gets rid of such alternatives in a couple
of macros.
This builds and passes such tests as I can do compiling with gcc, clang 14,
and clang 15.
Nick Porter [Tue, 7 Feb 2023 12:16:29 +0000 (12:16 +0000)]
Pacify clang scan in slab tests
Nick Porter [Fri, 3 Feb 2023 17:29:07 +0000 (17:29 +0000)]
Add reserve callback to slab allocator
Allow for differentiation between alloc callback (just used on first
allocation) and reserve (used each time an element is reserved)
Nick Porter [Mon, 30 Jan 2023 13:31:58 +0000 (13:31 +0000)]
Set talloc type of slab elements
So that doing talloc_get_type_abort() on the entries returned by the
reserve function will work.
Nick Porter [Mon, 30 Jan 2023 13:17:08 +0000 (13:17 +0000)]
Move slab cleanup interval to be initialisation function parameter
Allows it to be sourced from a config option rather than hard coded in
function definition macro
Arran Cudbard-Bell [Thu, 9 Feb 2023 03:01:09 +0000 (21:01 -0600)]
Should be a case insensitive match too
Arran Cudbard-Bell [Thu, 9 Feb 2023 02:53:26 +0000 (20:53 -0600)]
Don't assert if no virtual servers are configured
Print a nice error message instead
Jorge Pereira [Wed, 8 Feb 2023 15:56:57 +0000 (12:56 -0300)]
tacacs: let's avoid _magic_ values (#4886)
Jorge Pereira [Wed, 8 Feb 2023 15:50:53 +0000 (12:50 -0300)]
Don't leak memory on invalid packet code (#4887)
Alan T. DeKok [Wed, 8 Feb 2023 14:42:13 +0000 (09:42 -0500)]
remove state tracking
the configuration isn't exposed, and even if it was, the code
doesn't do anything other than track state. Nothing uses that
state for anything.
If we want to use State to direct EAP packets to the same back-end,
the correct place to put that is likely in the fr_io_track_t
structure. Which has to be written to in the "encode" or "write"
routine, and then also in the "read" routine.
The network side can then use that field to have a centralized
tracking structure of state -> worker. Even if this state
is probabilistic, at 64 bits (and a reasonable hash function),
the odds of a packet going wrong are tiny. If it's an issue,
we could just change the state to a talloc ptr, and use memcmp()
to compare states.
That also lets us put anything into the state, which is flexible.
Nick Porter [Wed, 8 Feb 2023 12:06:11 +0000 (12:06 +0000)]
Simplify use of Python version check
Arran Cudbard-Bell [Wed, 8 Feb 2023 03:26:47 +0000 (21:26 -0600)]
new conflicts with C++
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:53:32 +0000 (17:53 -0600)]
Gcc fixes