]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
14 months agoWe don't need the length passed to dict_fixup_clone
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:18:53 +0000 (23:18 -0600)] 
We don't need the length passed to dict_fixup_clone

14 months agoRemove double declaration of KDF
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:16:40 +0000 (23:16 -0600)] 
Remove double declaration of KDF

14 months agoHave the tests load their own custom dictionaries
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:13:08 +0000 (23:13 -0600)] 
Have the tests load their own custom dictionaries

14 months agoFormatting and minor fixups in unit_test_attribute
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:07:45 +0000 (23:07 -0600)] 
Formatting and minor fixups in unit_test_attribute

14 months agoFix obvious, yet hidden, numbering error in dictionary.h3c
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:04:51 +0000 (23:04 -0600)] 
Fix obvious, yet hidden, numbering error in dictionary.h3c

14 months agoAlias Vendor-Discrimination-Str to Ethernet-Interface... they're both octets types
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:03:37 +0000 (23:03 -0600)] 
Alias Vendor-Discrimination-Str to Ethernet-Interface... they're both octets types

14 months agoFix obvious error in Site-Specific numbered attributes
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:03:02 +0000 (23:03 -0600)] 
Fix obvious error in Site-Specific numbered attributes

...which was hidden previously by the fact we allowed numbering conflicts

14 months agoFor why not can sentence sense make
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:01:20 +0000 (23:01 -0600)] 
For why not can sentence sense make

14 months agoWS
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:00:19 +0000 (23:00 -0600)] 
WS

14 months agointernal encoder: ACTUALLY skip name only attributes, instead of just infinitely...
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:00:11 +0000 (23:00 -0600)] 
internal encoder: ACTUALLY skip name only attributes, instead of just infinitely looping

14 months agoIf the input arguments were invalid... error out, don't just fail silently
Arran Cudbard-Bell [Wed, 23 Oct 2024 04:55:36 +0000 (22:55 -0600)] 
If the input arguments were invalid... error out, don't just fail silently

14 months agoeap-aka: Use enumv values from KDF instead of definitions
Arran Cudbard-Bell [Sun, 20 Oct 2024 02:42:40 +0000 (20:42 -0600)] 
eap-aka: Use enumv values from KDF instead of definitions

14 months agotimeouts are perhaps not quite errors
Alan T. DeKok [Thu, 24 Oct 2024 20:24:00 +0000 (16:24 -0400)] 
timeouts are perhaps not quite errors

14 months agoMRC of 1 is really MRD
Alan T. DeKok [Thu, 24 Oct 2024 20:23:39 +0000 (16:23 -0400)] 
MRC of 1 is really MRD

i.e. a simple duration, and not a repeated count

14 months agoBetter handling of SQL rcodes in xlats
Nick Porter [Thu, 24 Oct 2024 07:59:40 +0000 (08:59 +0100)] 
Better handling of SQL rcodes in xlats

If RLM_SQL_ALT_QUERY is treated as an error, then redundant SQL xlats
will try the same query again on each database host (with the same
result).

To handle switching to a different query if an INSERT fails due to key
contraints, then the return value of the xlat, which is the number of
affected rows should be checked instead.

14 months agoNo data returned is not a failure
Nick Porter [Wed, 23 Oct 2024 08:55:59 +0000 (09:55 +0100)] 
No data returned is not a failure

14 months agoUpdate MS SQL default schema
Nick Porter [Wed, 23 Oct 2024 08:32:47 +0000 (09:32 +0100)] 
Update MS SQL default schema

When using FreeTDS driver, `char` fields are returned with trailing
spaces, which causes "=" in the [op] field to become "= " - which fails
to parse.
Using `varchar` ensures only the real data length is returned.

14 months agoAlign rlm_sql_freetds NULL behaviour with other drivers
Nick Porter [Tue, 22 Oct 2024 16:54:06 +0000 (17:54 +0100)] 
Align rlm_sql_freetds NULL behaviour with other drivers

14 months agoRemove unused function
Nick Porter [Tue, 22 Oct 2024 16:53:11 +0000 (17:53 +0100)] 
Remove unused function

14 months agoFreeTDS doesn't return the number of rows from a SELECT
Nick Porter [Tue, 22 Oct 2024 16:28:41 +0000 (17:28 +0100)] 
FreeTDS doesn't return the number of rows from a SELECT

14 months agoUpdate rlm_sql_freetds to use trunk connections
Nick Porter [Tue, 22 Oct 2024 14:09:37 +0000 (15:09 +0100)] 
Update rlm_sql_freetds to use trunk connections

Unfortunately FreeTDS doesn't have the Async support that the Sybase
client library does.

14 months agoRemove needless function
Nick Porter [Tue, 22 Oct 2024 10:26:55 +0000 (11:26 +0100)] 
Remove needless function

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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.

14 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

14 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

14 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

14 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

14 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.

14 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

14 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

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

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

14 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

14 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

14 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

14 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

14 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 ()

14 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

14 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

14 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

15 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

15 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

15 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.

15 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

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

15 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.

15 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

15 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()

15 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

15 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

15 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

15 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.

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

15 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

15 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"

15 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

15 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

15 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

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

15 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

15 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

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

15 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

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

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

15 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

15 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.

15 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

15 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"

15 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

15 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

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

15 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

15 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.

15 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

15 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

15 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

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

15 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

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

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

15 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

15 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

15 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

15 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.

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

15 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

15 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

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

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

15 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 ")

15 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

15 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