]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoAdd allow_wildcard option to tmpl_attr_rules_s
Nick Porter [Mon, 23 Jan 2023 15:42:37 +0000 (15:42 +0000)] 
Add allow_wildcard option to tmpl_attr_rules_s

2 years agoAmend dcursor remove callback specification
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.

2 years agoUpdate callback for dcursor pair removal
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

2 years agoWhen resolving tmpl_attr which are children of a list attr use default dict
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.

2 years agoReset tmpl evaluation when evaluating children of groups
Arran Cudbard-Bell [Thu, 9 Feb 2023 17:00:04 +0000 (11:00 -0600)] 
Reset tmpl evaluation when evaluating children of groups

2 years agoWith list_as_attr, virtual attributes have two entries in the ar list
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

2 years agoAdd sanity to foreach - skipping structural attributes
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

2 years agoFix up tmpl_attr_print()
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:58:10 +0000 (10:58 -0600)] 
Fix up tmpl_attr_print()

2 years agoNo need for [*] on debug policies
Nick Porter [Wed, 18 Jan 2023 14:27:48 +0000 (14:27 +0000)] 
No need for [*] on debug policies

2 years agoSet the tmpl list while inserting default list ar
Nick Porter [Wed, 18 Jan 2023 19:49:37 +0000 (19:49 +0000)] 
Set the tmpl list while inserting default list ar

2 years agoFix up tmpl_attr_tail_is_unresolved()
Nick Porter [Wed, 18 Jan 2023 13:44:20 +0000 (13:44 +0000)] 
Fix up tmpl_attr_tail_is_unresolved()

2 years agoUpdate tmpl_attr_afrom_attr_substr() to handle tmpls such as &reply.
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.

2 years agoAdd tmpl_attr_tail_is_raw()
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:57:29 +0000 (10:57 -0600)] 
Add tmpl_attr_tail_is_raw()

2 years agoUse helper function to identify unknown ar
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:56:51 +0000 (10:56 -0600)] 
Use helper function to identify unknown ar

2 years agoAdd ar_is_raw() for checking for raw attr refs
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:55:59 +0000 (10:55 -0600)] 
Add ar_is_raw() for checking for raw attr refs

2 years agoFix up cond_forbid_groups()
Nick Porter [Wed, 18 Jan 2023 13:42:43 +0000 (13:42 +0000)] 
Fix up cond_forbid_groups()

2 years agoAdd tmpl_attr_is_list_attr() to check if an ar refers to a list
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

2 years agoCorrect delimiter
Nick Porter [Fri, 13 Jan 2023 16:42:50 +0000 (16:42 +0000)] 
Correct delimiter

2 years agoCorrect test for invalid list
Nick Porter [Fri, 13 Jan 2023 16:55:30 +0000 (16:55 +0000)] 
Correct test for invalid list

2 years agoEnsure request_attr_ DAs are initialised before they are referenced
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:53:44 +0000 (10:53 -0600)] 
Ensure request_attr_ DAs are initialised before they are referenced

2 years agos/tmpl_pair_list_t/fr_dict_attr_t const */
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:47:46 +0000 (10:47 -0600)] 
s/tmpl_pair_list_t/fr_dict_attr_t const */

2 years agoUse tmpl_attr_list_from_substr() to parse list names
Arran Cudbard-Bell [Thu, 9 Feb 2023 16:45:54 +0000 (10:45 -0600)] 
Use tmpl_attr_list_from_substr() to parse list names

2 years agoReplace switch statements over tmpl lists
Nick Porter [Fri, 13 Jan 2023 16:41:09 +0000 (16:41 +0000)] 
Replace switch statements over tmpl lists

2 years agoRemove pair_list_table
Nick Porter [Fri, 13 Jan 2023 16:42:20 +0000 (16:42 +0000)] 
Remove pair_list_table

2 years agoEnable visibility of request_attr_ DAs
Nick Porter [Fri, 13 Jan 2023 13:47:03 +0000 (13:47 +0000)] 
Enable visibility of request_attr_ DAs

2 years agoAdd tmpl_list_name() and use it to report list names
Nick Porter [Fri, 13 Jan 2023 15:47:27 +0000 (15:47 +0000)] 
Add tmpl_list_name() and use it to report list names

2 years agoAdd tmpl_attr_list_from_substr() to parse a list reference
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

2 years agoSet PAIR_LIST_UNKNOWN = 0 to catch where the list is not explicitly set
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

2 years agoConvert PAIR_LIST_ enums to defines referencing DAs
Nick Porter [Fri, 13 Jan 2023 13:46:09 +0000 (13:46 +0000)] 
Convert PAIR_LIST_ enums to defines referencing DAs

2 years agoAllow using clang 15 with -Werror and -Wunreachable-code-generic-assoc (#4884)
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.

2 years agoPacify clang scan in slab tests
Nick Porter [Tue, 7 Feb 2023 12:16:29 +0000 (12:16 +0000)] 
Pacify clang scan in slab tests

2 years agoAdd reserve callback to slab allocator
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)

2 years agoSet talloc type of slab elements
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.

2 years agoMove slab cleanup interval to be initialisation function parameter
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

2 years agoShould be a case insensitive match too
Arran Cudbard-Bell [Thu, 9 Feb 2023 03:01:09 +0000 (21:01 -0600)] 
Should be a case insensitive match too

2 years agoDon't assert if no virtual servers are configured
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

2 years agotacacs: let's avoid _magic_ values (#4886)
Jorge Pereira [Wed, 8 Feb 2023 15:56:57 +0000 (12:56 -0300)] 
tacacs: let's avoid _magic_ values (#4886)

2 years agoDon't leak memory on invalid packet code (#4887)
Jorge Pereira [Wed, 8 Feb 2023 15:50:53 +0000 (12:50 -0300)] 
Don't leak memory on invalid packet code (#4887)

2 years agoremove state tracking
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.

2 years agoSimplify use of Python version check
Nick Porter [Wed, 8 Feb 2023 12:06:11 +0000 (12:06 +0000)] 
Simplify use of Python version check

2 years agonew conflicts with C++
Arran Cudbard-Bell [Wed, 8 Feb 2023 03:26:47 +0000 (21:26 -0600)] 
new conflicts with C++

2 years agoGcc fixes
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:53:32 +0000 (17:53 -0600)] 
Gcc fixes

2 years agoFinish documenting request_state_replace
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:34:08 +0000 (17:34 -0600)] 
Finish documenting request_state_replace

2 years agoUse the new state replace function for restoring state for children
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

2 years agoadd "limit" configuration parsing and document it
Alan T. DeKok [Tue, 7 Feb 2023 23:20:25 +0000 (18:20 -0500)] 
add "limit" configuration parsing and document it

2 years agodon't bother setting "single connection" in listener
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

2 years agoonly set the single connection flag on the first packet
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

2 years agomove memory allocation to outside of the mutex lock
Alan T. DeKok [Tue, 7 Feb 2023 21:54:58 +0000 (16:54 -0500)] 
move memory allocation to outside of the mutex lock

2 years agotacacs: Silence flexible array extension warnings
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:31:55 +0000 (15:31 -0600)] 
tacacs: Silence flexible array extension warnings

2 years agoFlag enums need to be marked up with flag_enum
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

2 years agoFormatting
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:26:19 +0000 (15:26 -0600)] 
Formatting

2 years agotacacs: Listener is used
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:17:41 +0000 (15:17 -0600)] 
tacacs: Listener is used

2 years agoCan't embed conditions in macro args
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:10:29 +0000 (15:10 -0600)] 
Can't embed conditions in macro args

2 years agoRemove unused table lookups
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:01:47 +0000 (15:01 -0600)] 
Remove unused table lookups

2 years ago< 30 instances of "???" vs > 200 instances of "<INVALID>"
Arran Cudbard-Bell [Tue, 7 Feb 2023 20:56:36 +0000 (14:56 -0600)] 
< 30 instances of "???" vs > 200 instances of "<INVALID>"

2 years agotacacs: We already have a hex printing function, and it doesn't use depricated sprint...
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

2 years agodon't mangle request->session_state_ctx manually
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

2 years agocompile "auth-type"
Alan T. DeKok [Tue, 7 Feb 2023 17:14:41 +0000 (12:14 -0500)] 
compile "auth-type"

2 years agosession_state_ctx should always exist
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

2 years agoAbandon redis tests when the cluster fails to start
Nick Porter [Tue, 7 Feb 2023 13:52:26 +0000 (13:52 +0000)] 
Abandon redis tests when the cluster fails to start

2 years agoDon't trash the data set in &control.Tmp-String-0
Nick Porter [Tue, 7 Feb 2023 13:51:22 +0000 (13:51 +0000)] 
Don't trash the data set in &control.Tmp-String-0

2 years agobe less restrictive in the decoder which helps with CI
Alan T. DeKok [Tue, 7 Feb 2023 16:15:06 +0000 (11:15 -0500)] 
be less restrictive in the decoder which helps with CI

2 years agoget the synthesized packet code from the decrypted packet #4882
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.

2 years agodon't close the socket after one reply packet on single connect
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.

2 years agodocument local clients
Alan T. DeKok [Tue, 7 Feb 2023 15:14:01 +0000 (10:14 -0500)] 
document local clients

2 years agocleanups and more checks on corner cases
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

2 years agowrap macros in more brackets and update flags for the compiler
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

2 years agoParameterise choice of raddb for debugging
Nick Porter [Mon, 23 Jan 2023 11:22:55 +0000 (11:22 +0000)] 
Parameterise choice of raddb for debugging

2 years agoAdd launcher for EAP test debugging
Nick Porter [Thu, 19 Jan 2023 18:19:10 +0000 (18:19 +0000)] 
Add launcher for EAP test debugging

2 years agodictionary.aruba: Update dicto from ClearPass 6.11 (#4876)
Alexis La Goutte [Mon, 6 Feb 2023 22:21:17 +0000 (23:21 +0100)] 
dictionary.aruba: Update dicto from ClearPass 6.11 (#4876)

2 years agov4: Fix up module boostrap sequence (#4883)
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.

2 years agoenfore connected sockets for TCP, and check for hash table
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

2 years agoprint the correct amount of data remaining
Alan T. DeKok [Mon, 6 Feb 2023 20:38:32 +0000 (15:38 -0500)] 
print the correct amount of data remaining

2 years agoTypos
Nick Porter [Mon, 6 Feb 2023 16:18:48 +0000 (16:18 +0000)] 
Typos

2 years agoclean up error messages, and print actual value
Alan T. DeKok [Mon, 6 Feb 2023 15:53:57 +0000 (10:53 -0500)] 
clean up error messages, and print actual value

2 years ago"secretlen" can't be zero, either
Alan T. DeKok [Mon, 6 Feb 2023 14:01:56 +0000 (09:01 -0500)] 
"secretlen" can't be zero, either

2 years agorelax checks. it seems clients don't pay attention to this.
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.

2 years agouse correct names
Alan T. DeKok [Mon, 6 Feb 2023 13:42:22 +0000 (08:42 -0500)] 
use correct names

2 years agouse and look up local client in virtual server
Alan T. DeKok [Mon, 6 Feb 2023 13:32:51 +0000 (08:32 -0500)] 
use and look up local client in virtual server

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:55 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:34 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

2 years agoEnsure each LDAP test that updates the directory uses a different user
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

2 years agorpm: Split smtp and imap into separate packages
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

2 years agorpm: Need to use %define outside of the macro files
Arran Cudbard-Bell [Sun, 5 Feb 2023 17:02:26 +0000 (11:02 -0600)] 
rpm: Need to use %define outside of the macro files

2 years agorpm: Typo
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:41:32 +0000 (10:41 -0600)] 
rpm: Typo

2 years agorpm: Simplify specifying optional build components and libraries
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:21:44 +0000 (10:21 -0600)] 
rpm: Simplify specifying optional build components and libraries

2 years agorpm: Remove lua config files if we're not building lua
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

2 years agorpm: Use the RPM macros for calling utilities
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:43:24 +0000 (09:43 -0600)] 
rpm: Use the RPM macros for calling utilities

2 years agorpm: Package rlm_lua separately
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:30:33 +0000 (09:30 -0600)] 
rpm: Package rlm_lua separately

2 years agorpm: More reordering
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:29:08 +0000 (09:29 -0600)] 
rpm: More reordering

2 years agorpm: EAP-PWD is not experimental, and is always supported by the versions of OpenSSL...
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

2 years agorpm: Remove dup EAP-PWD entry
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:57 +0000 (09:16 -0600)] 
rpm: Remove dup EAP-PWD entry

2 years agorpm: Only install the mruby example scripts with mruby
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:08 +0000 (09:16 -0600)] 
rpm: Only install the mruby example scripts with mruby

2 years agorpm: TNC got removed ages ago
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:15:41 +0000 (09:15 -0600)] 
rpm: TNC got removed ages ago