]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
21 months agoldap: Check for the presence of cache_da
Arran Cudbard-Bell [Wed, 23 Oct 2024 16:47:00 +0000 (10:47 -0600)] 
ldap: Check for the presence of cache_da

21 months agoFix clang scan errors
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:27:06 +0000 (00:27 -0600)] 
Fix clang scan errors

21 months agoRework flag, ref, and alias parsing
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:12:54 +0000 (00:12 -0600)] 
Rework flag, ref, and alias parsing

Move duplicates to aliases, and disallow duplicate attribute names and numbers

21 months agoBreak up attribute initialisation into phases
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:10:03 +0000 (00:10 -0600)] 
Break up attribute initialisation into phases

21 months agofr_dict_attr_by_name_substr sets its own errors
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:08:43 +0000 (00:08 -0600)] 
fr_dict_attr_by_name_substr sets its own errors

21 months agoCheck we didn't run out of parents
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:08:17 +0000 (00:08 -0600)] 
Check we didn't run out of parents

21 months agoAdd fields to store attribute location
Arran Cudbard-Bell [Wed, 23 Oct 2024 06:08:00 +0000 (00:08 -0600)] 
Add fields to store attribute location

21 months agoRework protocol flag types
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:58:46 +0000 (23:58 -0600)] 
Rework protocol flag types

21 months agoCan't produce errors using name beause it might not be set yet
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:57:12 +0000 (23:57 -0600)] 
Can't produce errors using name beause it might not be set yet

21 months agoFormatting
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:54:33 +0000 (23:54 -0600)] 
Formatting

21 months agoUse "namespace" consistently
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:54:01 +0000 (23:54 -0600)] 
Use "namespace" consistently

21 months agoAdd utility functions for applying alias fixups
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:37:35 +0000 (23:37 -0600)] 
Add utility functions for applying alias fixups

21 months agoExplicitly mark up attributes as name only instead of using magic numbers
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:30:52 +0000 (23:30 -0600)] 
Explicitly mark up attributes as name only instead of using magic numbers

21 months agoAlias the "Compatible" vendor to cisco.vpn5000 to avoid conflicts
Arran Cudbard-Bell [Wed, 23 Oct 2024 05:28:24 +0000 (23:28 -0600)] 
Alias the "Compatible" vendor to cisco.vpn5000 to avoid conflicts

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

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

21 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

21 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

21 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

21 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

21 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

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

21 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

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

21 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

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

21 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

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

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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

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

21 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

21 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

21 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

21 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

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

21 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

21 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

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

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

21 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

21 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

21 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

21 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

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

21 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

21 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

21 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

21 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

21 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

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

21 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

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

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

21 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

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

21 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

21 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

21 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

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

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

21 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

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

21 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

21 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

21 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

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

21 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

21 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

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

21 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

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

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

21 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

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

21 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

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

21 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

21 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

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

21 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

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

21 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

21 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

21 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

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

21 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