]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
14 months agoForce use of mysql_native_password for test account
Nick Porter [Tue, 28 May 2024 11:15:06 +0000 (12:15 +0100)] 
Force use of mysql_native_password for test account

To allow older client library to authenticate against newer server.

MySQL and MariaDB have different one line syntaxes for this - the version
implemented here works with both.

14 months agoTo use the non-blocking API we can only build against libmariadb
Nick Porter [Tue, 28 May 2024 09:43:39 +0000 (10:43 +0100)] 
To use the non-blocking API we can only build against libmariadb

libmysqlclient has a different non-blocking api

14 months agoRemove lifetime timer event when setting a tconn to drain
Nick Porter [Tue, 28 May 2024 09:19:41 +0000 (10:19 +0100)] 
Remove lifetime timer event when setting a tconn to drain

14 months agoUpdate mysql driver to use trunk connections and non-blocking calls
Nick Porter [Mon, 27 May 2024 14:01:35 +0000 (15:01 +0100)] 
Update mysql driver to use trunk connections and non-blocking calls

14 months agoAdd FR_TRUNK_REQUEST_STATE_IDLE
Nick Porter [Tue, 4 Jun 2024 17:01:21 +0000 (18:01 +0100)] 
Add FR_TRUNK_REQUEST_STATE_IDLE

Used when a trunk request has been sent and the request needs to remain
valid, but no response is expected (typically where an immediate
response happened).

This is required for SQL queries where multiple exchanges on the same
connection are often required.

14 months agoAdd infrastructure for SQL drivers to use trunks
Nick Porter [Mon, 27 May 2024 12:45:17 +0000 (13:45 +0100)] 
Add infrastructure for SQL drivers to use trunks

14 months agoAmend rlm_sql mod_authorize and group membership xlat to push queries on the stack
Nick Porter [Mon, 27 May 2024 11:08:31 +0000 (12:08 +0100)] 
Amend rlm_sql mod_authorize and group membership xlat to push queries on the stack

They share a common function for retrieving group membership so have to
be amended at the same time

14 months agoAmend sqlippool mod_common to push queries on the stack
Nick Porter [Fri, 24 May 2024 16:10:25 +0000 (17:10 +0100)] 
Amend sqlippool mod_common to push queries on the stack

14 months agoAmend sqlippool mod_alloc to push queries on the stack
Nick Porter [Fri, 24 May 2024 13:54:42 +0000 (14:54 +0100)] 
Amend sqlippool mod_alloc to push queries on the stack

14 months agoOnly reserve a pool connection when not using trunks
Nick Porter [Fri, 24 May 2024 13:41:36 +0000 (14:41 +0100)] 
Only reserve a pool connection when not using trunks

14 months agoAdd a `sent` flag to trunk requests
Nick Porter [Tue, 21 May 2024 09:49:01 +0000 (10:49 +0100)] 
Add a `sent` flag to trunk requests

So that only the first time of sending a request counts towards
connection statistics.

Requests which are re-queued typically need to run on the same
connection (e.g. a series of SQL queries forming a transaction) and bad
things will happen if `max_uses` causes a connection to close part way
through such requests.

14 months agoUpdate SQL mod_map_proc to push query on stack for evaluation
Nick Porter [Tue, 21 May 2024 07:49:41 +0000 (08:49 +0100)] 
Update SQL mod_map_proc to push query on stack for evaluation

14 months agoPass fr_sql_query_t to sql_fields function
Nick Porter [Mon, 20 May 2024 18:38:30 +0000 (19:38 +0100)] 
Pass fr_sql_query_t to sql_fields function

And remove calls to sql_num_fields

14 months agosql_num_fields is not used
Nick Porter [Mon, 20 May 2024 18:22:02 +0000 (19:22 +0100)] 
sql_num_fields is not used

14 months agoDefine contexts for SQL pair and group retrieval
Nick Porter [Mon, 20 May 2024 11:11:56 +0000 (12:11 +0100)] 
Define contexts for SQL pair and group retrieval

14 months agoAmend sql_mod_redundant to push SQL call on the stack
Nick Porter [Mon, 20 May 2024 11:22:53 +0000 (12:22 +0100)] 
Amend sql_mod_redundant to push SQL call on the stack

14 months agoUpdate rlm_sql_fetch_row to allow for trunk connections
Nick Porter [Mon, 20 May 2024 10:41:43 +0000 (11:41 +0100)] 
Update rlm_sql_fetch_row to allow for trunk connections

14 months agoRework SQL xlat to push SQL query function on the stack
Nick Porter [Mon, 20 May 2024 10:35:37 +0000 (11:35 +0100)] 
Rework SQL xlat to push SQL query function on the stack

14 months agoPass fr_sql_query_t to sql_error functions
Nick Porter [Mon, 13 May 2024 14:48:07 +0000 (15:48 +0100)] 
Pass fr_sql_query_t to sql_error functions

14 months agoMove SQL results row to query_ctx
Nick Porter [Fri, 10 May 2024 14:57:50 +0000 (15:57 +0100)] 
Move SQL results row to query_ctx

14 months agoPass fr_sql_query_t to SQL free result functions
Nick Porter [Fri, 10 May 2024 14:26:23 +0000 (15:26 +0100)] 
Pass fr_sql_query_t to SQL free result functions

14 months agoPass fr_sql_query_t to SQL finish functions
Nick Porter [Wed, 8 May 2024 15:08:13 +0000 (16:08 +0100)] 
Pass fr_sql_query_t to SQL finish functions

In preparation for moving from pool connections to trunk connections.

14 months agoPass fr_sql_query_t to num_rows and affected_rows
Nick Porter [Wed, 8 May 2024 11:12:23 +0000 (12:12 +0100)] 
Pass fr_sql_query_t to num_rows and affected_rows

In preparation for moving from pool connections to trunk connections.

14 months agoAdd request to fr_sql_query_t
Nick Porter [Wed, 8 May 2024 09:54:18 +0000 (10:54 +0100)] 
Add request to fr_sql_query_t

So the correct request can be resumed once a query has run.

14 months agoAdd alloc / free methods for SQL driver specific escape arg
Nick Porter [Tue, 7 May 2024 09:52:39 +0000 (10:52 +0100)] 
Add alloc / free methods for SQL driver specific escape arg

14 months agoUse request attributes in sql xlat test
Nick Porter [Mon, 6 May 2024 14:31:38 +0000 (15:31 +0100)] 
Use request attributes in sql xlat test

To ensure escaping code is called.

14 months agoAllow for differing arguments to sql escape function
Nick Porter [Mon, 6 May 2024 14:29:51 +0000 (15:29 +0100)] 
Allow for differing arguments to sql escape function

Drivers using the builtin escape function just need the SQL instance for
access to the allowed chars.
Those using connection pools will use a pool connection.
Those using trunks will use a per thread fr_connection_t - no actual data
is transferred, but the driver escaping functions refer to server side
data such as character sets.

14 months agoAdd SQL driver options for trunks
Nick Porter [Fri, 3 May 2024 11:20:41 +0000 (12:20 +0100)] 
Add SQL driver options for trunks

Allowing for one driver at a time to be converted to trunks

14 months agoAdd trunk to SQL query ctx
Nick Porter [Fri, 3 May 2024 11:01:35 +0000 (12:01 +0100)] 
Add trunk to SQL query ctx

And populate from module thread data

14 months agoAdd per thread SQL module data
Nick Porter [Fri, 3 May 2024 08:50:28 +0000 (09:50 +0100)] 
Add per thread SQL module data

For holding trunk connection

14 months agoAdd module_instance_t to rlm_sql_t
Nick Porter [Fri, 17 May 2024 08:45:43 +0000 (09:45 +0100)] 
Add module_instance_t to rlm_sql_t

For thread data lookup

14 months agoUse instance methods for calling SQL functions
Nick Porter [Fri, 3 May 2024 07:54:30 +0000 (08:54 +0100)] 
Use instance methods for calling SQL functions

Preparation so we can switch functions as drivers move to use trunk code

14 months agoChange function signature of SQL driver sql_fetch_row() to unlang_function_t
Nick Porter [Thu, 2 May 2024 13:44:27 +0000 (14:44 +0100)] 
Change function signature of SQL driver sql_fetch_row() to unlang_function_t

14 months agoRemove SQL driver store_result method
Nick Porter [Thu, 2 May 2024 08:39:46 +0000 (09:39 +0100)] 
Remove SQL driver store_result method

Only defined for MySQL and never used outside the driver.

14 months agoChange function signature of SQL driver query functions to unlang_function_t
Nick Porter [Thu, 2 May 2024 08:00:52 +0000 (09:00 +0100)] 
Change function signature of SQL driver query functions to unlang_function_t

14 months agoChange function signature of rlm_sql_fetch_row() to be unlang_function_t
Nick Porter [Tue, 30 Apr 2024 10:26:35 +0000 (11:26 +0100)] 
Change function signature of rlm_sql_fetch_row() to be unlang_function_t

14 months agoChange function signature of rlm_sql_select_query() to be unlang_function_t
Nick Porter [Mon, 29 Apr 2024 15:47:05 +0000 (16:47 +0100)] 
Change function signature of rlm_sql_select_query() to be unlang_function_t

14 months agoSQL connect_query is not expected to return data
Nick Porter [Mon, 29 Apr 2024 15:42:59 +0000 (16:42 +0100)] 
SQL connect_query is not expected to return data

So run with `rlm_sql_query()` rather than `rlm_sql_select_query()`

14 months agoChange function signature of rlm_sql_query() to be unlang_function_t
Nick Porter [Fri, 26 Apr 2024 15:12:52 +0000 (16:12 +0100)] 
Change function signature of rlm_sql_query() to be unlang_function_t

14 months agoDefine an SQL query context
Nick Porter [Fri, 26 Apr 2024 15:01:33 +0000 (16:01 +0100)] 
Define an SQL query context

And allocation / free routines

14 months agofix issues found by coverity
Alan T. DeKok [Thu, 6 Jun 2024 20:44:12 +0000 (16:44 -0400)] 
fix issues found by coverity

don't reset connection->parent, as we can't do that safely.

Instead, just set a variable saying whether or not the connection
is in the parent hash, and therefore has to be deleted (or not)

14 months agounlink connection from parent before cleaning it up
Alan T. DeKok [Thu, 6 Jun 2024 18:36:19 +0000 (14:36 -0400)] 
unlink connection from parent before cleaning it up

to prevent repeated deletes

14 months agoadd notes
Alan T. DeKok [Thu, 6 Jun 2024 16:45:04 +0000 (12:45 -0400)] 
add notes

14 months agoauto-add all known VENDORs to all known VSAs
Alan T. DeKok [Thu, 6 Jun 2024 16:42:45 +0000 (12:42 -0400)] 
auto-add all known VENDORs to all known VSAs

14 months agomore gluing in of EOF callbacks
Alan T. DeKok [Thu, 6 Jun 2024 13:43:58 +0000 (09:43 -0400)] 
more gluing in of EOF callbacks

14 months agotell the iterator that we're deleting this node
Alan T. DeKok [Thu, 6 Jun 2024 13:43:09 +0000 (09:43 -0400)] 
tell the iterator that we're deleting this node

14 months agodocument xlat for delay
Alan T. DeKok [Thu, 6 Jun 2024 13:21:33 +0000 (09:21 -0400)] 
document xlat for delay

14 months agomove to EOF callbacks
Alan T. DeKok [Thu, 6 Jun 2024 11:37:52 +0000 (07:37 -0400)] 
move to EOF callbacks

14 months agoactivate / shutdown don't return anything
Alan T. DeKok [Wed, 5 Jun 2024 15:49:23 +0000 (11:49 -0400)] 
activate / shutdown don't return anything

and add provisions for EOF callbacks

14 months agocatch more corner cases
Alan T. DeKok [Wed, 5 Jun 2024 01:44:17 +0000 (21:44 -0400)] 
catch more corner cases

14 months agotypos
Alan T. DeKok [Mon, 3 Jun 2024 18:18:47 +0000 (14:18 -0400)] 
typos

14 months agolet's use a modern version of OpenSSL
Alan T. DeKok [Mon, 3 Jun 2024 17:56:05 +0000 (13:56 -0400)] 
let's use a modern version of OpenSSL

14 months agoTell vscode to use configured includePath
Nick Porter [Thu, 2 May 2024 08:18:07 +0000 (09:18 +0100)] 
Tell vscode to use configured includePath

14 months agoMake DEBUG3 less noisy
Nick Porter [Wed, 29 May 2024 07:31:31 +0000 (08:31 +0100)] 
Make DEBUG3 less noisy

14 months agoRemove defunct config from tests
Nick Porter [Mon, 27 May 2024 08:50:41 +0000 (09:50 +0100)] 
Remove defunct config from tests

14 months agoCorrect test data
Nick Porter [Tue, 21 May 2024 08:13:32 +0000 (09:13 +0100)] 
Correct test data

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:34 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:28 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

14 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 6 Jun 2024 09:34:26 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

14 months agoIf it's unused... remove it...
Arran Cudbard-Bell [Thu, 6 Jun 2024 00:02:44 +0000 (20:02 -0400)] 
If it's unused... remove it...

14 months agoGet the dictionary direct from the virtual server
Arran Cudbard-Bell [Wed, 5 Jun 2024 20:18:04 +0000 (16:18 -0400)] 
Get the dictionary direct from the virtual server

14 months agoCentOS Stream 8 is EoL
Nick Porter [Wed, 5 Jun 2024 07:39:36 +0000 (08:39 +0100)] 
CentOS Stream 8 is EoL

14 months agoBuild warning fix
Jiayu Hu [Mon, 3 Jun 2024 18:06:12 +0000 (14:06 -0400)] 
Build warning fix

14 months agoresolved missing previous extern declaration for fr_table_num_sorted_t by declaring...
ethan-thompson [Mon, 3 Jun 2024 18:54:13 +0000 (14:54 -0400)] 
resolved missing previous extern declaration for fr_table_num_sorted_t by declaring it as static

14 months agowe now need the async version of the MySQL APIs
Alan T. DeKok [Mon, 3 Jun 2024 17:46:36 +0000 (13:46 -0400)] 
we now need the async version of the MySQL APIs

14 months agoadd missing CR
Alan T. DeKok [Mon, 3 Jun 2024 17:28:58 +0000 (13:28 -0400)] 
add missing CR

14 months agomore OSX bootstrapping
Alan T. DeKok [Mon, 3 Jun 2024 17:24:02 +0000 (13:24 -0400)] 
more OSX bootstrapping

14 months agorearrange to put reference docs at the start
Alan T. DeKok [Mon, 3 Jun 2024 15:37:40 +0000 (11:37 -0400)] 
rearrange to put reference docs at the start

and add some text in the main reference page

14 months agoremove unused assigmnet
Alan T. DeKok [Mon, 3 Jun 2024 12:54:49 +0000 (08:54 -0400)] 
remove unused assigmnet

14 months agocleanups and corner cases for retry code
Alan T. DeKok [Fri, 31 May 2024 15:42:50 +0000 (11:42 -0400)] 
cleanups and corner cases for retry code

rename timer_tree to next_retry_tree

add a call to blocked / resume when we run out of free entries

14 months agoregenerate from source
Alan T. DeKok [Fri, 31 May 2024 12:06:34 +0000 (08:06 -0400)] 
regenerate from source

14 months agoupdate docs on "suppress_secrets"
Alan T. DeKok [Fri, 31 May 2024 11:54:21 +0000 (07:54 -0400)] 
update docs on "suppress_secrets"

14 months agomore tests and notes on what we want to do
Alan T. DeKok [Tue, 28 May 2024 12:23:52 +0000 (08:23 -0400)] 
more tests and notes on what we want to do

14 months agoglue in activation routines
Alan T. DeKok [Sat, 25 May 2024 19:11:06 +0000 (15:11 -0400)] 
glue in activation routines

14 months agoactivate returns a value
Alan T. DeKok [Sat, 25 May 2024 18:36:14 +0000 (14:36 -0400)] 
activate returns a value

14 months agoremove unused function
Alan T. DeKok [Sat, 25 May 2024 18:31:37 +0000 (14:31 -0400)] 
remove unused function

14 months agoclean up callbacks
Alan T. DeKok [Sat, 25 May 2024 18:26:04 +0000 (14:26 -0400)] 
clean up callbacks

and "set cb" functions can't error, so they return void

14 months agoswitch to using the expiry tree when writes are blocked
Alan T. DeKok [Fri, 24 May 2024 17:04:06 +0000 (13:04 -0400)] 
switch to using the expiry tree when writes are blocked

which lets us expire items in the tree while we're waiting for the
socket to become writable

14 months agorename for clarity
Alan T. DeKok [Fri, 24 May 2024 17:03:45 +0000 (13:03 -0400)] 
rename for clarity

14 months agoglue in expiry tree
Alan T. DeKok [Fri, 24 May 2024 16:51:14 +0000 (12:51 -0400)] 
glue in expiry tree

14 months agoclarifications
Alan T. DeKok [Fri, 24 May 2024 14:27:26 +0000 (10:27 -0400)] 
clarifications

and glue in write blocked / resume

14 months agoadd "end" to retry structure
Alan T. DeKok [Fri, 24 May 2024 14:26:24 +0000 (10:26 -0400)] 
add "end" to retry structure

so that we know when the timers will end.

for MDR==0, we forcibly set "end" to one day.  There are very,
very, few reasons for anything to be operating for that long.

14 months agomultiple time deltas by numbers
Alan T. DeKok [Fri, 24 May 2024 12:59:33 +0000 (08:59 -0400)] 
multiple time deltas by numbers

it doesn't make much sense to multiple two time deltas together.

14 months agocatch divide by zero at run time
Alan T. DeKok [Fri, 24 May 2024 12:53:27 +0000 (08:53 -0400)] 
catch divide by zero at run time

14 months agorename in preparation for adding timer tree
Alan T. DeKok [Fri, 24 May 2024 12:32:23 +0000 (08:32 -0400)] 
rename in preparation for adding timer tree

14 months agoplumb in more write blocked / resume
Alan T. DeKok [Fri, 24 May 2024 11:50:08 +0000 (07:50 -0400)] 
plumb in more write blocked / resume

the functions now return values, so that the BIOs can return
errors on failed write blocked / resume.

Added blocked / resume calls to mem and retry BIOs.

Call those from the RADIUS client code

14 months agoclarifications
Alan T. DeKok [Thu, 23 May 2024 22:54:38 +0000 (18:54 -0400)] 
clarifications

14 months agorename function for clarity
Alan T. DeKok [Thu, 23 May 2024 17:10:08 +0000 (13:10 -0400)] 
rename function for clarity

14 months agopreliminary support for reserved items
Alan T. DeKok [Thu, 23 May 2024 16:25:19 +0000 (12:25 -0400)] 
preliminary support for reserved items

in order to implement application-layer watchdog packets

14 months agoif retries are 1, timeout is IRT, not MRD
Alan T. DeKok [Thu, 23 May 2024 11:46:04 +0000 (07:46 -0400)] 
if retries are 1, timeout is IRT, not MRD

14 months agomove to struct initialization
Alan T. DeKok [Thu, 23 May 2024 11:45:43 +0000 (07:45 -0400)] 
move to struct initialization

to ensure that all fields are initialized

14 months agoAdd missing quotes
Tim van Dijen [Tue, 28 May 2024 14:51:31 +0000 (16:51 +0200)] 
Add missing quotes

15 months agoAdd str.printable to check if a string only consists of printable i.e. non-whitespace...
Arran Cudbard-Bell [Mon, 27 May 2024 23:23:24 +0000 (19:23 -0400)] 
Add str.printable to check if a string only consists of printable i.e. non-whitespace, non-control chars, and valid utf8 sequences

15 months agoReduce iterations
Arran Cudbard-Bell [Mon, 27 May 2024 21:35:55 +0000 (17:35 -0400)] 
Reduce iterations