]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
10 months agoRemove needless function
Nick Porter [Tue, 22 Oct 2024 10:26:55 +0000 (11:26 +0100)] 
Remove needless function

10 months agoAdd basic test of redundant SQL modules
Nick Porter [Tue, 22 Oct 2024 08:44:29 +0000 (09:44 +0100)] 
Add basic test of redundant SQL modules

10 months agoClosed SQL connections can't be used for escaping
Nick Porter [Tue, 22 Oct 2024 08:30:17 +0000 (09:30 +0100)] 
Closed SQL connections can't be used for escaping

The handle gets freed when the connection is closed

10 months agoSet return type for escape functions to ssize_t
Nick Porter [Tue, 22 Oct 2024 08:15:08 +0000 (09:15 +0100)] 
Set return type for escape functions to ssize_t

So failures can be reported back

10 months agoMove tests to be used by all SQL flavours
Nick Porter [Tue, 22 Oct 2024 07:10:13 +0000 (08:10 +0100)] 
Move tests to be used by all SQL flavours

10 months agoSet safe_for child xlats inside a redundant xlat
Nick Porter [Tue, 22 Oct 2024 06:36:09 +0000 (07:36 +0100)] 
Set safe_for child xlats inside a redundant xlat

10 months agoCorrect comparison for end of retry period
Nick Porter [Mon, 21 Oct 2024 18:37:30 +0000 (19:37 +0100)] 
Correct comparison for end of retry period

10 months agoRevert "Don't load the RADIUS dictionary in the xlat code"
Nick Porter [Mon, 21 Oct 2024 16:44:49 +0000 (17:44 +0100)] 
Revert "Don't load the RADIUS dictionary in the xlat code"

This reverts commit 6cf9cd8db3a700b1ceb056cc14a0d03201966ed8.

Breaks CI tests of foreign protocol decoding

10 months agoUse mod_accounting in send Accounting-Response
Nick Porter [Mon, 21 Oct 2024 15:16:27 +0000 (16:16 +0100)] 
Use mod_accounting in send Accounting-Response

There's very little point in logging accouning responses in detail
files, and the sample config calls "detail" in the send
Accounting-Response section.

10 months agoAdd test of NULL SQL value handling
Nick Porter [Mon, 21 Oct 2024 14:05:03 +0000 (15:05 +0100)] 
Add test of NULL SQL value handling

10 months agoAlign Firebird results handling with that of other database drivers
Nick Porter [Mon, 21 Oct 2024 14:00:38 +0000 (15:00 +0100)] 
Align Firebird results handling with that of other database drivers

10 months agoHandle NULL return values in PostgreSQL
Nick Porter [Mon, 21 Oct 2024 12:53:37 +0000 (13:53 +0100)] 
Handle NULL return values in PostgreSQL

10 months agoHandle NULL return values in MySQL
Nick Porter [Mon, 21 Oct 2024 11:36:44 +0000 (12:36 +0100)] 
Handle NULL return values in MySQL

10 months agoHandle NULL fields returned in unixodbc
Nick Porter [Mon, 21 Oct 2024 11:35:31 +0000 (12:35 +0100)] 
Handle NULL fields returned in unixodbc

ODBC uses the data length indicator to report NULL return values.

10 months agoProtect against NULL return values from SQL queries
Nick Porter [Mon, 21 Oct 2024 11:16:09 +0000 (12:16 +0100)] 
Protect against NULL return values from SQL queries

Won't happen with the default schemas, but always possible with custom
schemas

10 months agoHandle NULL returns from SQL when parsing map values
Nick Porter [Mon, 21 Oct 2024 11:12:21 +0000 (12:12 +0100)] 
Handle NULL returns from SQL when parsing map values

10 months agoadd this, too
Alan T. DeKok [Mon, 21 Oct 2024 15:37:03 +0000 (11:37 -0400)] 
add this, too

10 months agothis is static
Alan T. DeKok [Mon, 21 Oct 2024 15:10:57 +0000 (11:10 -0400)] 
this is static

10 months agoremove call to write_flush
Alan T. DeKok [Mon, 21 Oct 2024 15:07:58 +0000 (11:07 -0400)] 
remove call to write_flush

10 months agowe don't need write_flush
Alan T. DeKok [Mon, 21 Oct 2024 13:11:25 +0000 (09:11 -0400)] 
we don't need write_flush

10 months agoadd and use explicit verify_ctx for BIO
Alan T. DeKok [Thu, 17 Oct 2024 13:34:08 +0000 (09:34 -0400)] 
add and use explicit verify_ctx for BIO

so that bio->ctx can always be application data

10 months agoDon't load the RADIUS dictionary in the xlat code
Arran Cudbard-Bell [Sat, 19 Oct 2024 16:35:08 +0000 (10:35 -0600)] 
Don't load the RADIUS dictionary in the xlat code

We're not a RADIUS server... and this appears to be unused

10 months agoCompiler is correct... if bio is nonnull, this should be do {} while ()
Arran Cudbard-Bell [Sat, 19 Oct 2024 02:24:25 +0000 (20:24 -0600)] 
Compiler is correct... if bio is nonnull, this should be do {} while ()

10 months agoSupport resetting the dictionary root
Arran Cudbard-Bell [Sat, 19 Oct 2024 01:49:35 +0000 (19:49 -0600)] 
Support resetting the dictionary root

10 months agoDon't automatically mark up defines as internal, as this breaks the DER encoder
Arran Cudbard-Bell [Sat, 19 Oct 2024 01:42:35 +0000 (19:42 -0600)] 
Don't automatically mark up defines as internal, as this breaks the DER encoder

10 months agoTrunk "request specific" settings go in request, not requests
Nick Porter [Thu, 17 Oct 2024 08:03:54 +0000 (09:03 +0100)] 
Trunk "request specific" settings go in request, not requests

10 months agorename "activate" to "connected"
Alan T. DeKok [Wed, 16 Oct 2024 17:22:54 +0000 (13:22 -0400)] 
rename "activate" to "connected"

to match the connection / trunk API

10 months agoas taken from PR #5428, with edits for v4
Alan T. DeKok [Wed, 16 Oct 2024 17:04:19 +0000 (13:04 -0400)] 
as taken from PR #5428, with edits for v4

10 months agoadd fr_bio_flush() API.
Alan T. DeKok [Wed, 16 Oct 2024 16:29:04 +0000 (12:29 -0400)] 
add fr_bio_flush() API.

which returns whether or not the BIO was flushed.

Ideally the write callbacks will also be signalled if the write
was blocked, too.

10 months agoallow RADIUS clients without retries
Alan T. DeKok [Tue, 15 Oct 2024 19:41:57 +0000 (15:41 -0400)] 
allow RADIUS clients without retries

10 months agodocument more authorization replies
Alan T. DeKok [Tue, 15 Oct 2024 18:44:15 +0000 (14:44 -0400)] 
document more authorization replies

10 months agoadd API to allow signals to run retries
Alan T. DeKok [Tue, 15 Oct 2024 14:40:09 +0000 (10:40 -0400)] 
add API to allow signals to run retries

i.e. on DUP signal.  We don't want to have a separate code path,
we just want to run the normal retry mechanism.

10 months agoremove unlang_module_timeout_add()
Alan T. DeKok [Mon, 14 Oct 2024 18:59:09 +0000 (14:59 -0400)] 
remove unlang_module_timeout_add()

and clean up the API for module timeouts / retries

10 months agoadd unlang_module_yield_to_retry()
Alan T. DeKok [Mon, 14 Oct 2024 15:55:33 +0000 (11:55 -0400)] 
add unlang_module_yield_to_retry()

10 months agohoist module timeout into main module state
Alan T. DeKok [Sun, 13 Oct 2024 15:56:55 +0000 (11:56 -0400)] 
hoist module timeout into main module state

10 months agothe yielded ptr is associated with the stack frame, not the request
Alan T. DeKok [Sun, 13 Oct 2024 15:38:26 +0000 (11:38 -0400)] 
the yielded ptr is associated with the stack frame, not the request

10 months agomore cleanups on delete timers
Alan T. DeKok [Sun, 13 Oct 2024 15:31:56 +0000 (11:31 -0400)] 
more cleanups on delete timers

10 months agoparent the timeout from the frame state
Alan T. DeKok [Sun, 13 Oct 2024 15:21:55 +0000 (11:21 -0400)] 
parent the timeout from the frame state

so it is automatically cleaned up when the module exits.

10 months agoremove unused code
Alan T. DeKok [Sun, 13 Oct 2024 15:12:59 +0000 (11:12 -0400)] 
remove unused code

10 months agorequest_ctx is a macro used by the server for other things
Alan T. DeKok [Fri, 11 Oct 2024 17:48:47 +0000 (13:48 -0400)] 
request_ctx is a macro used by the server for other things

10 months agocap "next" at "end".
Alan T. DeKok [Fri, 11 Oct 2024 15:38:53 +0000 (11:38 -0400)] 
cap "next" at "end".

So users of the API don't have to manually check "end", they can
just look at "next"

10 months agorename to be clearer
Alan T. DeKok [Fri, 11 Oct 2024 15:28:33 +0000 (11:28 -0400)] 
rename to be clearer

and add comments about what the functions do

10 months agoensure that the retry struct is always initialized
Alan T. DeKok [Thu, 10 Oct 2024 16:19:57 +0000 (12:19 -0400)] 
ensure that the retry struct is always initialized

before calling the sent() function

10 months agoadd tracking for timers to the radius client bio
Alan T. DeKok [Thu, 10 Oct 2024 15:30:18 +0000 (11:30 -0400)] 
add tracking for timers to the radius client bio

10 months agoCorrect comparison of module xlats
Nick Porter [Tue, 15 Oct 2024 14:49:56 +0000 (15:49 +0100)] 
Correct comparison of module xlats

10 months agoAdd Firebird mods-config to RHEL packaging
Nick Porter [Mon, 14 Oct 2024 18:44:01 +0000 (19:44 +0100)] 
Add Firebird mods-config to RHEL packaging

10 months agoFirebird is not compatible with MS SQL queries
Nick Porter [Mon, 14 Oct 2024 17:14:09 +0000 (18:14 +0100)] 
Firebird is not compatible with MS SQL queries

It is a fork of InterBase rather Sybase

10 months agoRemove vague comment
Nick Porter [Mon, 14 Oct 2024 17:02:35 +0000 (18:02 +0100)] 
Remove vague comment

10 months agoReport what we're connecting to
Nick Porter [Mon, 14 Oct 2024 17:02:15 +0000 (18:02 +0100)] 
Report what we're connecting to

10 months agoSet Firebird connection timeout
Nick Porter [Mon, 14 Oct 2024 17:01:59 +0000 (18:01 +0100)] 
Set Firebird connection timeout

10 months agoFirebird can detect key conflicts
Nick Porter [Mon, 14 Oct 2024 17:00:31 +0000 (18:00 +0100)] 
Firebird can detect key conflicts

10 months agoUpdate rlm_sql_firebird to use trunk connections
Nick Porter [Mon, 14 Oct 2024 16:59:33 +0000 (17:59 +0100)] 
Update rlm_sql_firebird to use trunk connections

10 months agoAllow for Firebird UPDATE ... RETURNING behaviour
Nick Porter [Mon, 14 Oct 2024 16:51:22 +0000 (17:51 +0100)] 
Allow for Firebird UPDATE ... RETURNING behaviour

when no records are updated, UPDATE ... RETURNING returns a row with all
fields set to NULL.

10 months agoSet new allocated results size after allocation
Nick Porter [Mon, 14 Oct 2024 16:39:53 +0000 (17:39 +0100)] 
Set new allocated results size after allocation

10 months agoDon't print results in fixed width fields
Nick Porter [Mon, 14 Oct 2024 11:32:44 +0000 (12:32 +0100)] 
Don't print results in fixed width fields

No other database drivers do this - and "     1" != "1"

10 months agoSQL driver specific config is driver not dialect related
Nick Porter [Mon, 14 Oct 2024 09:06:27 +0000 (10:06 +0100)] 
SQL driver specific config is driver not dialect related

10 months agoFirebird doesn't return the row count for SELECT
Nick Porter [Mon, 14 Oct 2024 09:05:25 +0000 (10:05 +0100)] 
Firebird doesn't return the row count for SELECT

10 months agoFormatting tidy ups
Nick Porter [Mon, 14 Oct 2024 07:41:04 +0000 (08:41 +0100)] 
Formatting tidy ups

10 months agoDo clearup in finish_query
Nick Porter [Mon, 14 Oct 2024 07:39:18 +0000 (08:39 +0100)] 
Do clearup in finish_query

Rather than when preparing the next query

10 months agoNo need for a mutex
Nick Porter [Mon, 14 Oct 2024 07:29:17 +0000 (08:29 +0100)] 
No need for a mutex

Exclusive use of a connection is handled by pool / trunk connection
code.

10 months agoUse talloc rather than malloc in rlm_sql_firebird
Nick Porter [Mon, 14 Oct 2024 07:18:48 +0000 (08:18 +0100)] 
Use talloc rather than malloc in rlm_sql_firebird

10 months agoDon't call query finish when not needed
Nick Porter [Mon, 14 Oct 2024 16:35:41 +0000 (17:35 +0100)] 
Don't call query finish when not needed

sqlippool_result_process is already calling query finish

10 months agoKeep a list of all files we saw during loading the dictionary
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:47:07 +0000 (21:47 -0400)] 
Keep a list of all files we saw during loading the dictionary

This will be used later to record the files attributes were defined in, with buffer lifetimes that are equal to the attribute lifetimes

10 months agoField not used
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:41:32 +0000 (21:41 -0400)] 
Field not used

10 months agoCorrections to new table macros
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:41:09 +0000 (21:41 -0400)] 
Corrections to new table macros

10 months agoMinor error message fixes
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:36:07 +0000 (21:36 -0400)] 
Minor error message fixes

10 months agoTypo (CID #1632387)
Nick Porter [Fri, 11 Oct 2024 21:17:13 +0000 (22:17 +0100)] 
Typo (CID #1632387)

10 months agoAdd a default for query_timeout
Nick Porter [Fri, 11 Oct 2024 13:58:33 +0000 (14:58 +0100)] 
Add a default for query_timeout

Ensures we have something set for unixodbc where this is used in
calculating the upper bound for polling intervals

10 months agoOnly set rcode if it's currently OK
Nick Porter [Fri, 11 Oct 2024 13:52:19 +0000 (14:52 +0100)] 
Only set rcode if it's currently OK

10 months agoDon't attempt to close connections which never opened
Nick Porter [Fri, 11 Oct 2024 12:13:12 +0000 (13:13 +0100)] 
Don't attempt to close connections which never opened

10 months agoUpdate rlm_sql_unixodbc to use trunk connections and async where possible
Nick Porter [Wed, 9 Oct 2024 18:13:47 +0000 (19:13 +0100)] 
Update rlm_sql_unixodbc to use trunk connections and async where possible

Async support is driver specific, so some will run synchronous and some
async.

Tested with:
 - Microsoft ODBC Driver 18 for SQL Server
 - FreeTDS driver (Sybase/MS SQL)
 - MariaDB Connector/ODBC(Unicode)
 - MySQL ODBC 9.0 Unicode Driver
 - PostgreSQL Unicode

of which only Microsoft ODBC provided async support.

10 months agoRemove unused argument
Nick Porter [Mon, 7 Oct 2024 09:15:50 +0000 (10:15 +0100)] 
Remove unused argument

10 months agoFix up MS SQL ippool queries
Nick Porter [Wed, 9 Oct 2024 18:09:52 +0000 (19:09 +0100)] 
Fix up MS SQL ippool queries

10 months agoMake field name comparisons case insensitive for SQL maps
Nick Porter [Wed, 9 Oct 2024 13:01:57 +0000 (14:01 +0100)] 
Make field name comparisons case insensitive for SQL maps

10 months agoCorrect group attribute queries
Nick Porter [Wed, 9 Oct 2024 11:40:54 +0000 (12:40 +0100)] 
Correct group attribute queries

10 months agoUse macros to reduce boilerplate
Nick Porter [Mon, 7 Oct 2024 08:45:36 +0000 (09:45 +0100)] 
Use macros to reduce boilerplate

10 months agoUse parse rules when parsing call_env data
Nick Porter [Fri, 11 Oct 2024 09:25:58 +0000 (10:25 +0100)] 
Use parse rules when parsing call_env data

Otherwise we don't properly unescape fixed values (e.g. \" in a double quoted string remains \" rather than becoming ")

10 months agoRemove level of annoying indirection and copying things from the fr_dict_protocol_t...
Arran Cudbard-Bell [Thu, 10 Oct 2024 22:24:10 +0000 (18:24 -0400)] 
Remove level of annoying indirection and copying things from the fr_dict_protocol_t to the dict

From comments this seems mostly to avoid cleaning up all the references to default_type_size and subtype_table.

Load the protocol symbol directly using dlsym, as this'll run every time the library is referenced and not just the first time.

Allocate a dictionary attribute extension for protocol specific data if requested to by the fr_dict_protocol_t

10 months agoUse common talloc_bstr_tolower function
Arran Cudbard-Bell [Thu, 10 Oct 2024 21:11:11 +0000 (17:11 -0400)] 
Use common talloc_bstr_tolower function

10 months agostruct fr_dict should be fr_dict_s
Arran Cudbard-Bell [Thu, 10 Oct 2024 19:15:29 +0000 (15:15 -0400)] 
struct fr_dict should be fr_dict_s

10 months agoWhitespace
Arran Cudbard-Bell [Thu, 10 Oct 2024 19:14:42 +0000 (15:14 -0400)] 
Whitespace

10 months agoand more "shut up static analyzer"
Alan T. DeKok [Thu, 10 Oct 2024 15:02:28 +0000 (11:02 -0400)] 
and more "shut up static analyzer"

10 months agosave reason for stopping in the fr_retry_t
Alan T. DeKok [Thu, 10 Oct 2024 14:54:26 +0000 (10:54 -0400)] 
save reason for stopping in the fr_retry_t

10 months agomore "quiet clang scan"
Alan T. DeKok [Thu, 10 Oct 2024 14:44:15 +0000 (10:44 -0400)] 
more "quiet clang scan"

10 months agomake clang scan happy
Alan T. DeKok [Thu, 10 Oct 2024 14:24:24 +0000 (10:24 -0400)] 
make clang scan happy

for some reason, it thinks that fr_fault_setup() sets its first
argument to NULL.

10 months agocompiler warning cleanups
Alan T. DeKok [Thu, 10 Oct 2024 14:10:07 +0000 (10:10 -0400)] 
compiler warning cleanups

10 months agotry this instead to make it build without OpenSSL
Alan T. DeKok [Thu, 10 Oct 2024 13:33:43 +0000 (09:33 -0400)] 
try this instead to make it build without OpenSSL

10 months agoRevert "add more OpenSSL magic"
Alan T. DeKok [Thu, 10 Oct 2024 13:30:34 +0000 (09:30 -0400)] 
Revert "add more OpenSSL magic"

This reverts commit 801ae0311868e6e26688db856d432313aa56894e.

10 months agoadd more OpenSSL magic
Alan T. DeKok [Thu, 10 Oct 2024 13:07:31 +0000 (09:07 -0400)] 
add more OpenSSL magic

10 months agoalways build radclient-ng
Alan T. DeKok [Thu, 10 Oct 2024 12:18:58 +0000 (08:18 -0400)] 
always build radclient-ng

10 months agoMove table search functions into table.h, and add new macros to return pointers to...
Arran Cudbard-Bell [Thu, 10 Oct 2024 03:20:42 +0000 (23:20 -0400)] 
Move table search functions into table.h, and add new macros to return pointers to values

This lets us create one line search function definitions for custom array types

10 months agoadd radius-bio library
Alan T. DeKok [Wed, 9 Oct 2024 19:52:08 +0000 (15:52 -0400)] 
add radius-bio library

10 months agoremove unnecessary defines
Alan T. DeKok [Wed, 9 Oct 2024 19:24:47 +0000 (15:24 -0400)] 
remove unnecessary defines

10 months agomove bio to separate makefile
Alan T. DeKok [Wed, 9 Oct 2024 19:08:04 +0000 (15:08 -0400)] 
move bio to separate makefile

10 months agoAdd test for Relay-Agent-Information encoding at the end of a packet
Nick Porter [Wed, 9 Oct 2024 09:22:44 +0000 (10:22 +0100)] 
Add test for Relay-Agent-Information encoding at the end of a packet

10 months agoThis can be simplified now attribute lists are nested
Nick Porter [Wed, 9 Oct 2024 09:21:04 +0000 (10:21 +0100)] 
This can be simplified now attribute lists are nested

10 months agoIf attr > 255 then it can't be 82
Nick Porter [Wed, 9 Oct 2024 08:12:56 +0000 (09:12 +0100)] 
If attr > 255 then it can't be 82

10 months agoDon't print error when skipping Message-Type
Nick Porter [Wed, 9 Oct 2024 08:11:19 +0000 (09:11 +0100)] 
Don't print error when skipping Message-Type

10 months agoSimplify and add comment
Nick Porter [Wed, 9 Oct 2024 07:59:51 +0000 (08:59 +0100)] 
Simplify and add comment

10 months agoCorrect query
Nick Porter [Tue, 8 Oct 2024 17:14:19 +0000 (18:14 +0100)] 
Correct query