]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoFinish documenting request_state_replace
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:34:08 +0000 (17:34 -0600)] 
Finish documenting request_state_replace

3 years agoUse the new state replace function for restoring state for children
Arran Cudbard-Bell [Tue, 7 Feb 2023 23:33:49 +0000 (17:33 -0600)] 
Use the new state replace function for restoring state for children

3 years agoadd "limit" configuration parsing and document it
Alan T. DeKok [Tue, 7 Feb 2023 23:20:25 +0000 (18:20 -0500)] 
add "limit" configuration parsing and document it

3 years agodon't bother setting "single connection" in listener
Alan T. DeKok [Tue, 7 Feb 2023 22:16:29 +0000 (17:16 -0500)] 
don't bother setting "single connection" in listener

it's already set by the encoder

3 years agoonly set the single connection flag on the first packet
Alan T. DeKok [Tue, 7 Feb 2023 22:08:43 +0000 (17:08 -0500)] 
only set the single connection flag on the first packet

RFC 8907 Section 4.3

3 years agomove memory allocation to outside of the mutex lock
Alan T. DeKok [Tue, 7 Feb 2023 21:54:58 +0000 (16:54 -0500)] 
move memory allocation to outside of the mutex lock

3 years agotacacs: Silence flexible array extension warnings
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:31:55 +0000 (15:31 -0600)] 
tacacs: Silence flexible array extension warnings

3 years agoFlag enums need to be marked up with flag_enum
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:27:46 +0000 (15:27 -0600)] 
Flag enums need to be marked up with flag_enum

Else the compiler gets annoyed when you try and assign flags or'd together

3 years agoFormatting
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:26:19 +0000 (15:26 -0600)] 
Formatting

3 years agotacacs: Listener is used
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:17:41 +0000 (15:17 -0600)] 
tacacs: Listener is used

3 years agoCan't embed conditions in macro args
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:10:29 +0000 (15:10 -0600)] 
Can't embed conditions in macro args

3 years agoRemove unused table lookups
Arran Cudbard-Bell [Tue, 7 Feb 2023 21:01:47 +0000 (15:01 -0600)] 
Remove unused table lookups

3 years ago< 30 instances of "???" vs > 200 instances of "<INVALID>"
Arran Cudbard-Bell [Tue, 7 Feb 2023 20:56:36 +0000 (14:56 -0600)] 
< 30 instances of "???" vs > 200 instances of "<INVALID>"

3 years agotacacs: We already have a hex printing function, and it doesn't use depricated sprint...
Arran Cudbard-Bell [Tue, 7 Feb 2023 20:53:54 +0000 (14:53 -0600)] 
tacacs: We already have a hex printing function, and it doesn't use depricated sprintf functions

3 years agodon't mangle request->session_state_ctx manually
Alan T. DeKok [Tue, 7 Feb 2023 19:46:04 +0000 (14:46 -0500)] 
don't mangle request->session_state_ctx manually

now that it's an actual list, and in the pair_root, we need to
remove it from the pair_root if it's freed, and add it to the
pair_root when it's allocated or restored.

and a check of

git grep -- 'request->session_state_ctx = '

should return only one assignment in request_state_replace().
Nothing else should muck with the state

3 years agocompile "auth-type"
Alan T. DeKok [Tue, 7 Feb 2023 17:14:41 +0000 (12:14 -0500)] 
compile "auth-type"

3 years agosession_state_ctx should always exist
Alan T. DeKok [Tue, 7 Feb 2023 17:08:51 +0000 (12:08 -0500)] 
session_state_ctx should always exist

and even if it doesn't, talloc_free() is NULL-safe

3 years agoAbandon redis tests when the cluster fails to start
Nick Porter [Tue, 7 Feb 2023 13:52:26 +0000 (13:52 +0000)] 
Abandon redis tests when the cluster fails to start

3 years agoDon't trash the data set in &control.Tmp-String-0
Nick Porter [Tue, 7 Feb 2023 13:51:22 +0000 (13:51 +0000)] 
Don't trash the data set in &control.Tmp-String-0

3 years agobe less restrictive in the decoder which helps with CI
Alan T. DeKok [Tue, 7 Feb 2023 16:15:06 +0000 (11:15 -0500)] 
be less restrictive in the decoder which helps with CI

3 years agoget the synthesized packet code from the decrypted packet #4882
Alan T. DeKok [Tue, 7 Feb 2023 15:41:12 +0000 (10:41 -0500)] 
get the synthesized packet code from the decrypted packet #4882

not from the encrypted packet.

3 years agodon't close the socket after one reply packet on single connect
Alan T. DeKok [Tue, 7 Feb 2023 15:26:11 +0000 (10:26 -0500)] 
don't close the socket after one reply packet on single connect

the "single connect" flag refers to a session, not to a particular
packet exchange.

3 years agodocument local clients
Alan T. DeKok [Tue, 7 Feb 2023 15:14:01 +0000 (10:14 -0500)] 
document local clients

3 years agocleanups and more checks on corner cases
Alan T. DeKok [Tue, 7 Feb 2023 13:54:45 +0000 (08:54 -0500)] 
cleanups and more checks on corner cases

the body_xor() function just does xor, and relies on the caller
to check / set / clear the header flags

3 years agowrap macros in more brackets and update flags for the compiler
Alan T. DeKok [Tue, 7 Feb 2023 13:54:36 +0000 (08:54 -0500)] 
wrap macros in more brackets and update flags for the compiler

3 years agoParameterise choice of raddb for debugging
Nick Porter [Mon, 23 Jan 2023 11:22:55 +0000 (11:22 +0000)] 
Parameterise choice of raddb for debugging

3 years agoAdd launcher for EAP test debugging
Nick Porter [Thu, 19 Jan 2023 18:19:10 +0000 (18:19 +0000)] 
Add launcher for EAP test debugging

3 years agodictionary.aruba: Update dicto from ClearPass 6.11 (#4876)
Alexis La Goutte [Mon, 6 Feb 2023 22:21:17 +0000 (23:21 +0100)] 
dictionary.aruba: Update dicto from ClearPass 6.11 (#4876)

3 years agov4: Fix up module boostrap sequence (#4883)
Nick Porter [Mon, 6 Feb 2023 20:56:53 +0000 (20:56 +0000)] 
v4: Fix up module boostrap sequence (#4883)

* Bootstrap all modules once module config parsing is complete

This allows submodules access to the fully parsed parent config data
when bootstrapping.

* Use bootstrapping for initialising SQL drivers

Moving these set up steps to bootstrap means the driver is fully set up
by the time the sql module is being instantiated and so it is safe to
start connections.

3 years agoenfore connected sockets for TCP, and check for hash table
Alan T. DeKok [Mon, 6 Feb 2023 20:46:16 +0000 (15:46 -0500)] 
enfore connected sockets for TCP, and check for hash table

before dereferencing it

3 years agoprint the correct amount of data remaining
Alan T. DeKok [Mon, 6 Feb 2023 20:38:32 +0000 (15:38 -0500)] 
print the correct amount of data remaining

3 years agoTypos
Nick Porter [Mon, 6 Feb 2023 16:18:48 +0000 (16:18 +0000)] 
Typos

3 years agoclean up error messages, and print actual value
Alan T. DeKok [Mon, 6 Feb 2023 15:53:57 +0000 (10:53 -0500)] 
clean up error messages, and print actual value

3 years ago"secretlen" can't be zero, either
Alan T. DeKok [Mon, 6 Feb 2023 14:01:56 +0000 (09:01 -0500)] 
"secretlen" can't be zero, either

3 years agorelax checks. it seems clients don't pay attention to this.
Alan T. DeKok [Mon, 6 Feb 2023 13:47:47 +0000 (08:47 -0500)] 
relax checks.  it seems clients don't pay attention to this.

3 years agouse correct names
Alan T. DeKok [Mon, 6 Feb 2023 13:42:22 +0000 (08:42 -0500)] 
use correct names

3 years agouse and look up local client in virtual server
Alan T. DeKok [Mon, 6 Feb 2023 13:32:51 +0000 (08:32 -0500)] 
use and look up local client in virtual server

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:55 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Mon, 6 Feb 2023 09:34:34 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoEnsure each LDAP test that updates the directory uses a different user
Nick Porter [Mon, 6 Feb 2023 08:25:37 +0000 (08:25 +0000)] 
Ensure each LDAP test that updates the directory uses a different user

Avoids clashes when tests are run in parallel

3 years agorpm: Split smtp and imap into separate packages
Arran Cudbard-Bell [Sun, 5 Feb 2023 22:22:20 +0000 (16:22 -0600)] 
rpm:  Split smtp and imap into separate packages

This means we don't have to pull in curl or our wrapper library unless rest/curl/imap are used

3 years agorpm: Need to use %define outside of the macro files
Arran Cudbard-Bell [Sun, 5 Feb 2023 17:02:26 +0000 (11:02 -0600)] 
rpm: Need to use %define outside of the macro files

3 years agorpm: Typo
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:41:32 +0000 (10:41 -0600)] 
rpm: Typo

3 years agorpm: Simplify specifying optional build components and libraries
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:21:44 +0000 (10:21 -0600)] 
rpm: Simplify specifying optional build components and libraries

3 years agorpm: Remove lua config files if we're not building lua
Arran Cudbard-Bell [Sun, 5 Feb 2023 16:09:47 +0000 (10:09 -0600)] 
rpm: Remove lua config files if we're not building lua

3 years agorpm: Use the RPM macros for calling utilities
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:43:24 +0000 (09:43 -0600)] 
rpm: Use the RPM macros for calling utilities

3 years agorpm: Package rlm_lua separately
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:30:33 +0000 (09:30 -0600)] 
rpm: Package rlm_lua separately

3 years agorpm: More reordering
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:29:08 +0000 (09:29 -0600)] 
rpm: More reordering

3 years agorpm: EAP-PWD is not experimental, and is always supported by the versions of OpenSSL...
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:17:33 +0000 (09:17 -0600)] 
rpm: EAP-PWD is not experimental, and is always supported by the versions of OpenSSL we require

3 years agorpm: Remove dup EAP-PWD entry
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:57 +0000 (09:16 -0600)] 
rpm: Remove dup EAP-PWD entry

3 years agorpm: Only install the mruby example scripts with mruby
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:16:08 +0000 (09:16 -0600)] 
rpm: Only install the mruby example scripts with mruby

3 years agorpm: TNC got removed ages ago
Arran Cudbard-Bell [Sun, 5 Feb 2023 15:15:41 +0000 (09:15 -0600)] 
rpm: TNC got removed ages ago

3 years agorpm: List each .so individually as this appears to be the only way to fix the duplicates
Arran Cudbard-Bell [Sun, 5 Feb 2023 03:37:12 +0000 (21:37 -0600)] 
rpm: List each .so individually as this appears to be the only way to fix the duplicates

We were seeing the SQL and LDAP .so files being included in both the main package and SQL/LDAP packages, which was adding incorrect dependencies for MySQL/openldap to the main FreeRADIUS RPM

3 years agorpm: Use defattr to specify default dir permissions so we don't need to manually...
Arran Cudbard-Bell [Sun, 5 Feb 2023 03:33:17 +0000 (21:33 -0600)] 
rpm: Use defattr to specify default dir permissions so we don't need to manually set permissions on each %dir

The vast majority of config files have the same permissions (640) so just set that as the default

3 years agorpm: Add support back for symas flavoured openldap
Arran Cudbard-Bell [Sun, 5 Feb 2023 01:19:19 +0000 (19:19 -0600)] 
rpm: Add support back for symas flavoured openldap

3 years agorpm: Just use the standard with/without macros
Arran Cudbard-Bell [Sun, 5 Feb 2023 01:16:11 +0000 (19:16 -0600)] 
rpm:  Just use the standard with/without macros

3 years agofree the filter on error path. Fixes #4881
Alan T. DeKok [Fri, 3 Feb 2023 13:11:10 +0000 (08:11 -0500)] 
free the filter on error path.  Fixes #4881

3 years agoremove unnecessary restriction
Alan T. DeKok [Fri, 3 Feb 2023 13:00:05 +0000 (08:00 -0500)] 
remove unnecessary restriction

3 years agoIndex the headers starting with 1, just like all the data. (#4880)
Mark Donnelly [Thu, 2 Feb 2023 15:07:31 +0000 (10:07 -0500)] 
Index the headers starting with 1, just like all the data. (#4880)

3 years agoAllow redis cluster time to propagate changes after failover
Nick Porter [Wed, 1 Feb 2023 20:54:02 +0000 (20:54 +0000)] 
Allow redis cluster time to propagate changes after failover

3 years agoallow a debugger via FR_DEBUGGER="lldb --" or similar
Alan T. DeKok [Wed, 1 Feb 2023 21:40:16 +0000 (16:40 -0500)] 
allow a debugger via FR_DEBUGGER="lldb --" or similar

3 years agoAnnotate remaining tainted data issues (CID #1519002, #1503896) (#4879)
James Jones [Wed, 1 Feb 2023 20:57:03 +0000 (14:57 -0600)] 
Annotate remaining tainted data issues (CID #1519002, #1503896) (#4879)

3 years agoSequence ldap tests that update the directory to avoid conflicts
Nick Porter [Wed, 1 Feb 2023 19:50:31 +0000 (19:50 +0000)] 
Sequence ldap tests that update the directory to avoid conflicts

3 years agoUse different keys in each cache test
Nick Porter [Wed, 1 Feb 2023 19:24:52 +0000 (19:24 +0000)] 
Use different keys in each cache test

Allows for parallel runs of cache tests that use redis without the tests
interfering with each other.

3 years agoSQL driver needs to be instantiated before starting connections
Nick Porter [Wed, 1 Feb 2023 09:54:22 +0000 (09:54 +0000)] 
SQL driver needs to be instantiated before starting connections

3 years agoCI: Correct REST port env variables
Nick Porter [Tue, 31 Jan 2023 17:53:24 +0000 (17:53 +0000)] 
CI: Correct REST port env variables

3 years agoVery short cache ttl can cause issues with CI
Nick Porter [Wed, 1 Feb 2023 13:39:37 +0000 (13:39 +0000)] 
Very short cache ttl can cause issues with CI

When running under memory sanitizers, tests can be slow enough for the
cache entry to expire

3 years agoEnsure cache resources are freed before returning
Nick Porter [Wed, 1 Feb 2023 12:06:11 +0000 (12:06 +0000)] 
Ensure cache resources are freed before returning

3 years agoTidy and fix up redis clust_node_fail test
Nick Porter [Tue, 31 Jan 2023 17:02:13 +0000 (17:02 +0000)] 
Tidy and fix up redis clust_node_fail test

3 years agoResequence tests so redis ones run sequentially
Nick Porter [Tue, 31 Jan 2023 16:25:39 +0000 (16:25 +0000)] 
Resequence tests so redis ones run sequentially

Redis tests all call scripts to reset the same cluster - so cannot run
in parallel

3 years agoTidy and correct redis_ippool test
Nick Porter [Tue, 31 Jan 2023 15:47:24 +0000 (15:47 +0000)] 
Tidy and correct redis_ippool test

3 years agoCI: Tests need a redis-cluster, created with cluster-create script
Nick Porter [Mon, 30 Jan 2023 17:26:00 +0000 (17:26 +0000)] 
CI: Tests need a redis-cluster, created with cluster-create script

The script creates nodes on the local host and is not designed to
operate on a remote host

3 years agoCI: Check that redis nodes are up before creating the cluster
Nick Porter [Wed, 1 Feb 2023 11:04:39 +0000 (11:04 +0000)] 
CI: Check that redis nodes are up before creating the cluster

The create-cluster script starts redis-server with the --daemonize
option and on slow CI hosts, this may not be fully ready if `start` is
immediately followed by `create`

3 years agoCI: Fix up redis create-cluster script for version on Ubuntu 20.04
Nick Porter [Mon, 30 Jan 2023 16:37:16 +0000 (16:37 +0000)] 
CI: Fix up redis create-cluster script for version on Ubuntu 20.04

3 years agoAllow for \1f style escape strings inside single quotes
Nick Porter [Tue, 31 Jan 2023 13:12:47 +0000 (13:12 +0000)] 
Allow for \1f style escape strings inside single quotes

3 years agoFixup ldap tests - missing dn doesn't actually return an LDAP error
Nick Porter [Tue, 31 Jan 2023 13:11:46 +0000 (13:11 +0000)] 
Fixup ldap tests - missing dn doesn't actually return an LDAP error

3 years agoReplace != with !( == ) in ldap module tests
Nick Porter [Tue, 31 Jan 2023 13:10:06 +0000 (13:10 +0000)] 
Replace != with !( == ) in ldap module tests

3 years agoCI: Correct test ldap data
Nick Porter [Tue, 31 Jan 2023 13:04:42 +0000 (13:04 +0000)] 
CI: Correct test ldap data

- Enums now need to be quoted strings
- Test looks for &control.Reply-Message to be set

3 years agopost-auth is now send
Nick Porter [Mon, 30 Jan 2023 17:50:26 +0000 (17:50 +0000)] 
post-auth is now send

3 years agouc is a GNU Make Standard Library function, not builtin
Nick Porter [Mon, 30 Jan 2023 15:36:37 +0000 (15:36 +0000)] 
uc is a GNU Make Standard Library function, not builtin

3 years agoDon't call xlat_process_return() with node->call.func == NULL
Nick Porter [Wed, 1 Feb 2023 16:46:24 +0000 (16:46 +0000)] 
Don't call xlat_process_return() with node->call.func == NULL

3 years agojust return
Alan T. DeKok [Wed, 1 Feb 2023 14:04:49 +0000 (09:04 -0500)] 
just return

3 years agolet's not go to "next" on pushed child or pushed unlang
Alan T. DeKok [Wed, 1 Feb 2023 13:48:05 +0000 (08:48 -0500)] 
let's not go to "next" on pushed child or pushed unlang

3 years agonot all failed expansions will produce fr_strerror()
Alan T. DeKok [Wed, 1 Feb 2023 13:47:07 +0000 (08:47 -0500)] 
not all failed expansions will produce fr_strerror()

so print them as warnings

3 years agothis should now pass
Alan T. DeKok [Wed, 1 Feb 2023 13:34:52 +0000 (08:34 -0500)] 
this should now pass

It should have been commited with "go to "next" xlat node on RESUME"

3 years agolet's not use vpt after it's been freed
Alan T. DeKok [Wed, 1 Feb 2023 13:34:07 +0000 (08:34 -0500)] 
let's not use vpt after it's been freed

and clean up some of the other code to avoid leaks on error

3 years agofix "success" policy to use new edit sections
Alan T. DeKok [Wed, 1 Feb 2023 02:56:08 +0000 (21:56 -0500)] 
fix "success" policy to use new edit sections

we don't need to do "if" checks for parent, we can just use
the "=" operator, and let that fail-safe.

We also revert the "subrequest" test to the previous version.

The next step is to figure out why changing the xlat expansions
broke the "success" policy.  But we can check that tomorrow,
once the CI tests pass again.

3 years agogo to "next" xlat node on RESUME
Alan T. DeKok [Wed, 1 Feb 2023 00:57:30 +0000 (19:57 -0500)] 
go to "next" xlat node on RESUME

previously, if an intermediate xlat node yielded, it would resume
and _not_ go to process the next sibling.  So make xlat_frame_eval_resume()
call xlat_frame_eval() when it's done, to resume.

Then fix up the xlat indentation, through the simple expedient
of saving the indent level, indenting, and restoring the indent
level on success/failure.  This is easier than trying to figure out
the proper indent/exdent macros for every possible code path.

Then also fix up the keywords.subrequest test, which returns an
extra Packet-Type attribute from inside of the subrequest.

3 years agodon't lose casts when they're explicitly given
Alan T. DeKok [Tue, 31 Jan 2023 21:45:23 +0000 (16:45 -0500)] 
don't lose casts when they're explicitly given

(foo)%{xlat..}

was being set to just

%{xlat...}

and that's wrong.  :(

3 years agoexpanding the expression may fail
Alan T. DeKok [Tue, 31 Jan 2023 15:29:37 +0000 (10:29 -0500)] 
expanding the expression may fail

3 years agosend reply if the reply is set
Alan T. DeKok [Tue, 31 Jan 2023 15:11:02 +0000 (10:11 -0500)] 
send reply if the reply is set

which can be set in a policy or in a module

3 years agoAdd -p to mkdir coverity_tool/config. (#4877)
James Jones [Tue, 31 Jan 2023 22:11:35 +0000 (16:11 -0600)] 
Add -p to mkdir coverity_tool/config. (#4877)

3 years agoHandle unchecked returns in src/protocols/dhcpv4/encode.c (CIDs below) (#4874)
James Jones [Tue, 31 Jan 2023 15:03:55 +0000 (09:03 -0600)] 
Handle unchecked returns in src/protocols/dhcpv4/encode.c (CIDs below) (#4874)

CID 1503896: change fr_dbuff_in() to FR_DBUFF_IN_RETURN()
CID 1504021: annnotate; a preceding FR_DBUFF_REMAINING_RETURN() assures
             that there's enough space for the PEN and data-len1.

3 years agoStart using modeling for Coverity (#4853)
James Jones [Tue, 31 Jan 2023 15:03:30 +0000 (09:03 -0600)] 
Start using modeling for Coverity (#4853)

This involves
* making the coverity workflow build the model
* adding model source file(s)