]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
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
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:34:08 +0000 (17:34 -0600)]
Finish documenting request_state_replace
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:33:49 +0000 (17:33 -0600)]
Use the new state replace function for restoring state for children
Alan T. DeKok [Tue, 7 Feb 2023 23:20:25 +0000 (18:20 -0500)]
add "limit" configuration parsing and document it
Alan T. DeKok [Tue, 7 Feb 2023 22:16:29 +0000 (17:16 -0500)]
don't bother setting "single connection" in listener
it's already set by the encoder
Alan T. DeKok [Tue, 7 Feb 2023 22:08:43 +0000 (17:08 -0500)]
only set the single connection flag on the first packet
RFC 8907 Section 4.3
Alan T. DeKok [Tue, 7 Feb 2023 21:54:58 +0000 (16:54 -0500)]
move memory allocation to outside of the mutex lock
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:31:55 +0000 (15:31 -0600)]
tacacs: Silence flexible array extension warnings
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:27:46 +0000 (15:27 -0600)]
Flag enums need to be marked up with flag_enum
Else the compiler gets annoyed when you try and assign flags or'd together
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:26:19 +0000 (15:26 -0600)]
Formatting
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:17:41 +0000 (15:17 -0600)]
tacacs: Listener is used
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:10:29 +0000 (15:10 -0600)]
Can't embed conditions in macro args
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:01:47 +0000 (15:01 -0600)]
Remove unused table lookups
Arran Cudbard-Bell [Tue, 7 Feb 2023 20:56:36 +0000 (14:56 -0600)]
< 30 instances of "???" vs > 200 instances of "<INVALID>"
Arran Cudbard-Bell [Tue, 7 Feb 2023 20:53:54 +0000 (14:53 -0600)]
tacacs: We already have a hex printing function, and it doesn't use depricated sprintf functions
Alan T. DeKok [Tue, 7 Feb 2023 19:46:04 +0000 (14:46 -0500)]
don't mangle request->session_state_ctx manually
now that it's an actual list, and in the pair_root, we need to
remove it from the pair_root if it's freed, and add it to the
pair_root when it's allocated or restored.
and a check of
git grep -- 'request->session_state_ctx = '
should return only one assignment in request_state_replace().
Nothing else should muck with the state
Alan T. DeKok [Tue, 7 Feb 2023 17:14:41 +0000 (12:14 -0500)]
compile "auth-type"
Alan T. DeKok [Tue, 7 Feb 2023 17:08:51 +0000 (12:08 -0500)]
session_state_ctx should always exist
and even if it doesn't, talloc_free() is NULL-safe
Nick Porter [Tue, 7 Feb 2023 13:52:26 +0000 (13:52 +0000)]
Abandon redis tests when the cluster fails to start
Nick Porter [Tue, 7 Feb 2023 13:51:22 +0000 (13:51 +0000)]
Don't trash the data set in &control.Tmp-String-0
Alan T. DeKok [Tue, 7 Feb 2023 16:15:06 +0000 (11:15 -0500)]
be less restrictive in the decoder which helps with CI
Alan T. DeKok [Tue, 7 Feb 2023 15:41:12 +0000 (10:41 -0500)]
get the synthesized packet code from the decrypted packet #4882
not from the encrypted packet.
Alan T. DeKok [Tue, 7 Feb 2023 15:26:11 +0000 (10:26 -0500)]
don't close the socket after one reply packet on single connect
the "single connect" flag refers to a session, not to a particular
packet exchange.
Alan T. DeKok [Tue, 7 Feb 2023 15:14:01 +0000 (10:14 -0500)]
document local clients
Alan T. DeKok [Tue, 7 Feb 2023 13:54:45 +0000 (08:54 -0500)]
cleanups and more checks on corner cases
the body_xor() function just does xor, and relies on the caller
to check / set / clear the header flags
Alan T. DeKok [Tue, 7 Feb 2023 13:54:36 +0000 (08:54 -0500)]
wrap macros in more brackets and update flags for the compiler
Nick Porter [Mon, 23 Jan 2023 11:22:55 +0000 (11:22 +0000)]
Parameterise choice of raddb for debugging
Nick Porter [Thu, 19 Jan 2023 18:19:10 +0000 (18:19 +0000)]
Add launcher for EAP test debugging
Alexis La Goutte [Mon, 6 Feb 2023 22:21:17 +0000 (23:21 +0100)]
dictionary.aruba: Update dicto from ClearPass 6.11 (#4876)
Nick Porter [Mon, 6 Feb 2023 20:56:53 +0000 (20:56 +0000)]
v4: Fix up module boostrap sequence (#4883)
* Bootstrap all modules once module config parsing is complete
This allows submodules access to the fully parsed parent config data
when bootstrapping.
* Use bootstrapping for initialising SQL drivers
Moving these set up steps to bootstrap means the driver is fully set up
by the time the sql module is being instantiated and so it is safe to
start connections.
Alan T. DeKok [Mon, 6 Feb 2023 20:46:16 +0000 (15:46 -0500)]
enfore connected sockets for TCP, and check for hash table
before dereferencing it
Alan T. DeKok [Mon, 6 Feb 2023 20:38:32 +0000 (15:38 -0500)]
print the correct amount of data remaining
Nick Porter [Mon, 6 Feb 2023 16:18:48 +0000 (16:18 +0000)]
Typos
Alan T. DeKok [Mon, 6 Feb 2023 15:53:57 +0000 (10:53 -0500)]
clean up error messages, and print actual value
Alan T. DeKok [Mon, 6 Feb 2023 14:01:56 +0000 (09:01 -0500)]
"secretlen" can't be zero, either
Alan T. DeKok [Mon, 6 Feb 2023 13:47:47 +0000 (08:47 -0500)]
relax checks. it seems clients don't pay attention to this.
Alan T. DeKok [Mon, 6 Feb 2023 13:42:22 +0000 (08:42 -0500)]
use correct names
Alan T. DeKok [Mon, 6 Feb 2023 13:32:51 +0000 (08:32 -0500)]
use and look up local client in virtual server
github-actions[bot] [Mon, 6 Feb 2023 09:34:55 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:52 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:49 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:46 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:43 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:40 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:37 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:34 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
Nick Porter [Mon, 6 Feb 2023 08:25:37 +0000 (08:25 +0000)]
Ensure each LDAP test that updates the directory uses a different user
Avoids clashes when tests are run in parallel
Arran Cudbard-Bell [Sun, 5 Feb 2023 22:22:20 +0000 (16:22 -0600)]
rpm: Split smtp and imap into separate packages
This means we don't have to pull in curl or our wrapper library unless rest/curl/imap are used
Arran Cudbard-Bell [Sun, 5 Feb 2023 17:02:26 +0000 (11:02 -0600)]
rpm: Need to use %define outside of the macro files
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:41:32 +0000 (10:41 -0600)]
rpm: Typo
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:21:44 +0000 (10:21 -0600)]
rpm: Simplify specifying optional build components and libraries
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:09:47 +0000 (10:09 -0600)]
rpm: Remove lua config files if we're not building lua
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:43:24 +0000 (09:43 -0600)]
rpm: Use the RPM macros for calling utilities
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:30:33 +0000 (09:30 -0600)]
rpm: Package rlm_lua separately
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:29:08 +0000 (09:29 -0600)]
rpm: More reordering
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:17:33 +0000 (09:17 -0600)]
rpm: EAP-PWD is not experimental, and is always supported by the versions of OpenSSL we require
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:57 +0000 (09:16 -0600)]
rpm: Remove dup EAP-PWD entry
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:08 +0000 (09:16 -0600)]
rpm: Only install the mruby example scripts with mruby
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:15:41 +0000 (09:15 -0600)]
rpm: TNC got removed ages ago