]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Nick Porter [Tue, 22 Oct 2024 10:26:55 +0000 (11:26 +0100)]
Remove needless function
Nick Porter [Tue, 22 Oct 2024 08:44:29 +0000 (09:44 +0100)]
Add basic test of redundant SQL modules
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
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
Nick Porter [Tue, 22 Oct 2024 07:10:13 +0000 (08:10 +0100)]
Move tests to be used by all SQL flavours
Nick Porter [Tue, 22 Oct 2024 06:36:09 +0000 (07:36 +0100)]
Set safe_for child xlats inside a redundant xlat
Nick Porter [Mon, 21 Oct 2024 18:37:30 +0000 (19:37 +0100)]
Correct comparison for end of retry period
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
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.
Nick Porter [Mon, 21 Oct 2024 14:05:03 +0000 (15:05 +0100)]
Add test of NULL SQL value handling
Nick Porter [Mon, 21 Oct 2024 14:00:38 +0000 (15:00 +0100)]
Align Firebird results handling with that of other database drivers
Nick Porter [Mon, 21 Oct 2024 12:53:37 +0000 (13:53 +0100)]
Handle NULL return values in PostgreSQL
Nick Porter [Mon, 21 Oct 2024 11:36:44 +0000 (12:36 +0100)]
Handle NULL return values in MySQL
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.
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
Nick Porter [Mon, 21 Oct 2024 11:12:21 +0000 (12:12 +0100)]
Handle NULL returns from SQL when parsing map values
Alan T. DeKok [Mon, 21 Oct 2024 15:37:03 +0000 (11:37 -0400)]
add this, too
Alan T. DeKok [Mon, 21 Oct 2024 15:10:57 +0000 (11:10 -0400)]
this is static
Alan T. DeKok [Mon, 21 Oct 2024 15:07:58 +0000 (11:07 -0400)]
remove call to write_flush
Alan T. DeKok [Mon, 21 Oct 2024 13:11:25 +0000 (09:11 -0400)]
we don't need write_flush
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
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
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 ()
Arran Cudbard-Bell [Sat, 19 Oct 2024 01:49:35 +0000 (19:49 -0600)]
Support resetting the dictionary root
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
Nick Porter [Thu, 17 Oct 2024 08:03:54 +0000 (09:03 +0100)]
Trunk "request specific" settings go in request, not requests
Alan T. DeKok [Wed, 16 Oct 2024 17:22:54 +0000 (13:22 -0400)]
rename "activate" to "connected"
to match the connection / trunk API
Alan T. DeKok [Wed, 16 Oct 2024 17:04:19 +0000 (13:04 -0400)]
as taken from PR #5428, with edits for v4
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.
Alan T. DeKok [Tue, 15 Oct 2024 19:41:57 +0000 (15:41 -0400)]
allow RADIUS clients without retries
Alan T. DeKok [Tue, 15 Oct 2024 18:44:15 +0000 (14:44 -0400)]
document more authorization replies
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.
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
Alan T. DeKok [Mon, 14 Oct 2024 15:55:33 +0000 (11:55 -0400)]
add unlang_module_yield_to_retry()
Alan T. DeKok [Sun, 13 Oct 2024 15:56:55 +0000 (11:56 -0400)]
hoist module timeout into main module state
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
Alan T. DeKok [Sun, 13 Oct 2024 15:31:56 +0000 (11:31 -0400)]
more cleanups on delete timers
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.
Alan T. DeKok [Sun, 13 Oct 2024 15:12:59 +0000 (11:12 -0400)]
remove unused code
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
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"
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
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
Alan T. DeKok [Thu, 10 Oct 2024 15:30:18 +0000 (11:30 -0400)]
add tracking for timers to the radius client bio
Nick Porter [Tue, 15 Oct 2024 14:49:56 +0000 (15:49 +0100)]
Correct comparison of module xlats
Nick Porter [Mon, 14 Oct 2024 18:44:01 +0000 (19:44 +0100)]
Add Firebird mods-config to RHEL packaging
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
Nick Porter [Mon, 14 Oct 2024 17:02:35 +0000 (18:02 +0100)]
Remove vague comment
Nick Porter [Mon, 14 Oct 2024 17:02:15 +0000 (18:02 +0100)]
Report what we're connecting to
Nick Porter [Mon, 14 Oct 2024 17:01:59 +0000 (18:01 +0100)]
Set Firebird connection timeout
Nick Porter [Mon, 14 Oct 2024 17:00:31 +0000 (18:00 +0100)]
Firebird can detect key conflicts
Nick Porter [Mon, 14 Oct 2024 16:59:33 +0000 (17:59 +0100)]
Update rlm_sql_firebird to use trunk connections
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.
Nick Porter [Mon, 14 Oct 2024 16:39:53 +0000 (17:39 +0100)]
Set new allocated results size after allocation
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"
Nick Porter [Mon, 14 Oct 2024 09:06:27 +0000 (10:06 +0100)]
SQL driver specific config is driver not dialect related
Nick Porter [Mon, 14 Oct 2024 09:05:25 +0000 (10:05 +0100)]
Firebird doesn't return the row count for SELECT
Nick Porter [Mon, 14 Oct 2024 07:41:04 +0000 (08:41 +0100)]
Formatting tidy ups
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
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.
Nick Porter [Mon, 14 Oct 2024 07:18:48 +0000 (08:18 +0100)]
Use talloc rather than malloc in rlm_sql_firebird
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
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
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:41:32 +0000 (21:41 -0400)]
Field not used
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:41:09 +0000 (21:41 -0400)]
Corrections to new table macros
Arran Cudbard-Bell [Mon, 14 Oct 2024 01:36:07 +0000 (21:36 -0400)]
Minor error message fixes
Nick Porter [Fri, 11 Oct 2024 21:17:13 +0000 (22:17 +0100)]
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
Nick Porter [Fri, 11 Oct 2024 13:52:19 +0000 (14:52 +0100)]
Only set rcode if it's currently OK
Nick Porter [Fri, 11 Oct 2024 12:13:12 +0000 (13:13 +0100)]
Don't attempt to close connections which never opened
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.
Nick Porter [Mon, 7 Oct 2024 09:15:50 +0000 (10:15 +0100)]
Remove unused argument
Nick Porter [Wed, 9 Oct 2024 18:09:52 +0000 (19:09 +0100)]
Fix up MS SQL ippool queries
Nick Porter [Wed, 9 Oct 2024 13:01:57 +0000 (14:01 +0100)]
Make field name comparisons case insensitive for SQL maps
Nick Porter [Wed, 9 Oct 2024 11:40:54 +0000 (12:40 +0100)]
Correct group attribute queries
Nick Porter [Mon, 7 Oct 2024 08:45:36 +0000 (09:45 +0100)]
Use macros to reduce boilerplate
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 ")
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
Arran Cudbard-Bell [Thu, 10 Oct 2024 21:11:11 +0000 (17:11 -0400)]
Use common talloc_bstr_tolower function
Arran Cudbard-Bell [Thu, 10 Oct 2024 19:15:29 +0000 (15:15 -0400)]
struct fr_dict should be fr_dict_s
Arran Cudbard-Bell [Thu, 10 Oct 2024 19:14:42 +0000 (15:14 -0400)]
Whitespace
Alan T. DeKok [Thu, 10 Oct 2024 15:02:28 +0000 (11:02 -0400)]
and more "shut up static analyzer"
Alan T. DeKok [Thu, 10 Oct 2024 14:54:26 +0000 (10:54 -0400)]
save reason for stopping in the fr_retry_t
Alan T. DeKok [Thu, 10 Oct 2024 14:44:15 +0000 (10:44 -0400)]
more "quiet clang scan"
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.
Alan T. DeKok [Thu, 10 Oct 2024 14:10:07 +0000 (10:10 -0400)]
compiler warning cleanups
Alan T. DeKok [Thu, 10 Oct 2024 13:33:43 +0000 (09:33 -0400)]
try this instead to make it build without OpenSSL
Alan T. DeKok [Thu, 10 Oct 2024 13:30:34 +0000 (09:30 -0400)]
Revert "add more OpenSSL magic"
This reverts commit
801ae0311868e6e26688db856d432313aa56894e .
Alan T. DeKok [Thu, 10 Oct 2024 13:07:31 +0000 (09:07 -0400)]
add more OpenSSL magic
Alan T. DeKok [Thu, 10 Oct 2024 12:18:58 +0000 (08:18 -0400)]
always build radclient-ng
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
Alan T. DeKok [Wed, 9 Oct 2024 19:52:08 +0000 (15:52 -0400)]
add radius-bio library
Alan T. DeKok [Wed, 9 Oct 2024 19:24:47 +0000 (15:24 -0400)]
remove unnecessary defines
Alan T. DeKok [Wed, 9 Oct 2024 19:08:04 +0000 (15:08 -0400)]
move bio to separate makefile
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
Nick Porter [Wed, 9 Oct 2024 09:21:04 +0000 (10:21 +0100)]
This can be simplified now attribute lists are nested
Nick Porter [Wed, 9 Oct 2024 08:12:56 +0000 (09:12 +0100)]
If attr > 255 then it can't be 82
Nick Porter [Wed, 9 Oct 2024 08:11:19 +0000 (09:11 +0100)]
Don't print error when skipping Message-Type
Nick Porter [Wed, 9 Oct 2024 07:59:51 +0000 (08:59 +0100)]
Simplify and add comment
Nick Porter [Tue, 8 Oct 2024 17:14:19 +0000 (18:14 +0100)]
Correct query