]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoforbid update in most places
Alan T. DeKok [Wed, 16 Nov 2022 12:57:40 +0000 (07:57 -0500)] 
forbid update in most places

except tests which actually use update

The bext step is to take all of the update tests, and run them
twice.  once as normal, and once with "-S rewrite_update=yes"

3 years agoadd migration configuration to forbid the use of "update"
Alan T. DeKok [Wed, 16 Nov 2022 12:57:23 +0000 (07:57 -0500)] 
add migration configuration to forbid the use of "update"

3 years agoauto-convert update sections.
Alan T. DeKok [Wed, 16 Nov 2022 12:36:12 +0000 (07:36 -0500)] 
auto-convert update sections.

via some pretty disgusting methods.  But it's not a lot of code,
and it catches the common use-cases.

3 years agobetter error messages
Alan T. DeKok [Wed, 16 Nov 2022 11:43:31 +0000 (06:43 -0500)] 
better error messages

3 years agobetter error message
Alan T. DeKok [Wed, 16 Nov 2022 11:42:24 +0000 (06:42 -0500)] 
better error message

3 years agotemporary hack to set name2_quote
Alan T. DeKok [Wed, 16 Nov 2022 11:42:06 +0000 (06:42 -0500)] 
temporary hack to set name2_quote

3 years agoquit coverity. Fixes CID #1516908
Alan T. DeKok [Tue, 15 Nov 2022 20:45:43 +0000 (15:45 -0500)] 
quit coverity.  Fixes CID #1516908

3 years agoadd main_config_migrate_option_get()
Alan T. DeKok [Tue, 15 Nov 2022 15:11:04 +0000 (10:11 -0500)] 
add main_config_migrate_option_get()

so that various things in the code can query what they should do,
without having global variables all over the place

3 years agoadd cf_item_insert_after()
Alan T. DeKok [Tue, 15 Nov 2022 15:10:36 +0000 (10:10 -0500)] 
add cf_item_insert_after()

for use with automagically rewriting edit sections

3 years agoPackage process_dhcp*.so with dhcp module
Nick Porter [Thu, 17 Nov 2022 10:05:21 +0000 (10:05 +0000)] 
Package process_dhcp*.so with dhcp module

3 years agoEnsure module specific process_foo*.so are not packaged in freeradius package
Nick Porter [Thu, 17 Nov 2022 09:48:23 +0000 (09:48 +0000)] 
Ensure module specific process_foo*.so are not packaged in freeradius package

3 years agorlm_sql_foo goes in package freeradius-foo not freeradius-sql-foo
Nick Porter [Thu, 17 Nov 2022 09:47:34 +0000 (09:47 +0000)] 
rlm_sql_foo goes in package freeradius-foo not freeradius-sql-foo

3 years agoAdd recv_buff option to proto_ldap_sync
Nick Porter [Wed, 16 Nov 2022 09:04:18 +0000 (09:04 +0000)] 
Add recv_buff option to proto_ldap_sync

3 years agoAdd more ldap sync stuff to debian packages
Arran Cudbard-Bell [Wed, 16 Nov 2022 23:28:15 +0000 (17:28 -0600)] 
Add more ldap sync stuff to debian packages

3 years agoPackage libfreeradius-ldap
Arran Cudbard-Bell [Wed, 16 Nov 2022 22:42:30 +0000 (16:42 -0600)] 
Package libfreeradius-ldap

3 years agoAdd XLAT_ARGS helper macro to pull xlat arguments from the input list
Arran Cudbard-Bell [Tue, 15 Nov 2022 19:15:51 +0000 (13:15 -0600)] 
Add XLAT_ARGS helper macro to pull xlat arguments from the input list

3 years agoAdd type specific dcursors for value boxes
Arran Cudbard-Bell [Tue, 15 Nov 2022 14:22:55 +0000 (08:22 -0600)] 
Add type specific dcursors for value boxes

Doesn't perform any refactoring, just defines the types

3 years agoFail on internal exec error
Arran Cudbard-Bell [Tue, 15 Nov 2022 14:20:43 +0000 (08:20 -0600)] 
Fail on internal exec error

3 years agoreorganization
Alan T. DeKok [Tue, 15 Nov 2022 11:24:35 +0000 (06:24 -0500)] 
reorganization

3 years agotypo
Alan T. DeKok [Tue, 15 Nov 2022 11:12:53 +0000 (06:12 -0500)] 
typo

3 years agoadd documentation for limit and timeout
Alan T. DeKok [Tue, 15 Nov 2022 11:01:39 +0000 (06:01 -0500)] 
add documentation for limit and timeout

3 years agoonly insert instructions which have thread alloc / instantiate
Alan T. DeKok [Tue, 15 Nov 2022 10:40:09 +0000 (05:40 -0500)] 
only insert instructions which have thread alloc / instantiate

3 years agoMore verbose sanity checks
Arran Cudbard-Bell [Tue, 15 Nov 2022 00:06:31 +0000 (18:06 -0600)] 
More verbose sanity checks

3 years agoUse type safe functions for value box lists
Arran Cudbard-Bell [Mon, 14 Nov 2022 23:04:00 +0000 (17:04 -0600)] 
Use type safe functions for value box lists

3 years agoadd "limit" keyword
Alan T. DeKok [Mon, 14 Nov 2022 22:13:27 +0000 (17:13 -0500)] 
add "limit" keyword

3 years agoinsert instructions into the unlang_instruction_tree
Alan T. DeKok [Mon, 14 Nov 2022 22:06:28 +0000 (17:06 -0500)] 
insert instructions into the unlang_instruction_tree

3 years agoadd unlang_thread_instance()
Alan T. DeKok [Mon, 14 Nov 2022 21:40:56 +0000 (16:40 -0500)] 
add unlang_thread_instance()

which for now is only called from the "limit" keyword.

The thread instance data could arguably go into the stack frame,
but 99.9% of the stack frames won't use it.  So for now we just
make the users call it manually

3 years agothread_instantiate may be NULL
Alan T. DeKok [Mon, 14 Nov 2022 21:39:51 +0000 (16:39 -0500)] 
thread_instantiate may be NULL

but we may still have thread instance data, which is just
counters

3 years agoremove unnecessary debug message
Alan T. DeKok [Mon, 14 Nov 2022 20:25:09 +0000 (15:25 -0500)] 
remove unnecessary debug message

3 years agoclose sockfd on error. Fixes CID #1516897
Alan T. DeKok [Mon, 14 Nov 2022 20:23:09 +0000 (15:23 -0500)] 
close sockfd on error.  Fixes CID #1516897

3 years agoallow tmpls as arguments for timeout
Alan T. DeKok [Mon, 14 Nov 2022 15:34:04 +0000 (10:34 -0500)] 
allow tmpls as arguments for timeout

3 years agoadd timeout keyword
Alan T. DeKok [Mon, 14 Nov 2022 15:09:13 +0000 (10:09 -0500)] 
add timeout keyword

3 years agoAlways initialise the output PID even on error
Arran Cudbard-Bell [Mon, 14 Nov 2022 16:57:57 +0000 (10:57 -0600)] 
Always initialise the output PID even on error

3 years agoFix the exec legacy header to stop vscode complaining
Arran Cudbard-Bell [Mon, 14 Nov 2022 16:50:19 +0000 (10:50 -0600)] 
Fix the exec legacy header to stop vscode complaining

3 years agoEnsure we use all the arguments
Arran Cudbard-Bell [Mon, 14 Nov 2022 16:45:58 +0000 (10:45 -0600)] 
Ensure we use all the arguments

3 years agoQuiet deprecated warnings for macos
Arran Cudbard-Bell [Mon, 14 Nov 2022 16:45:07 +0000 (10:45 -0600)] 
Quiet deprecated warnings for macos

3 years agoMore uncommitted sbuff notes
Arran Cudbard-Bell [Mon, 14 Nov 2022 16:44:40 +0000 (10:44 -0600)] 
More uncommitted sbuff notes

3 years agoCheck return from fr_dict_unknown_attr_afrom_num() (CID #1503891) (#4748)
James Jones [Mon, 14 Nov 2022 15:24:24 +0000 (09:24 -0600)] 
Check return from fr_dict_unknown_attr_afrom_num() (CID #1503891) (#4748)

3 years agoMake correct changes to deal with toctou issues (CIDs below) (#4793)
James Jones [Mon, 14 Nov 2022 15:22:53 +0000 (09:22 -0600)] 
Make correct changes to deal with toctou issues (CIDs below) (#4793)

12713071445217: use *at() calls to work around toctou

3 years agoDon't compare with bounds in SBUFF_PARSE_[U]INT_DEF (CIDs 15040045, 1504004) (#4794)
James Jones [Mon, 14 Nov 2022 15:01:11 +0000 (09:01 -0600)] 
Don't compare with bounds in SBUFF_PARSE_[U]INT_DEF (CIDs 150400451504004) (#4794)

Explicit comparison with the bounds makes sense but when you hit
the type the underlying conversion function uses, it's pointless,
and when it's part of a larger expression, coverity considers it
a possible coding error.

So... rather than doing an explicit comparison, we use the following
characterization: it's an error if the cast to the desired type changes
the value. To distinguish between overflow and underflow for signed
integer types, overflow happens if the cast value is less than the
return from strtoll(), underflow if it's greater.

3 years agoallow digits, in name2, too.
Alan T. DeKok [Mon, 14 Nov 2022 14:52:37 +0000 (09:52 -0500)] 
allow digits, in name2, too.

mostly for "timeout"

3 years agomove counters to callbacks
Alan T. DeKok [Mon, 14 Nov 2022 14:52:26 +0000 (09:52 -0500)] 
move counters to callbacks

where they're correct, rather than using ad-hoc and in-line things

3 years agoexpose frame_signal for use in timeout keyword
Alan T. DeKok [Mon, 14 Nov 2022 14:51:38 +0000 (09:51 -0500)] 
expose frame_signal for use in timeout keyword

3 years agoif max_rtx_foo is defined, it has to be >0 time duration
Alan T. DeKok [Mon, 14 Nov 2022 12:06:53 +0000 (07:06 -0500)] 
if max_rtx_foo is defined, it has to be >0 time duration

3 years agodocument actions and retries
Alan T. DeKok [Mon, 14 Nov 2022 11:58:03 +0000 (06:58 -0500)] 
document actions and retries

3 years agoflag TBD
Alan T. DeKok [Sun, 13 Nov 2022 18:52:19 +0000 (13:52 -0500)] 
flag TBD

3 years agodon't use "update"
Alan T. DeKok [Thu, 27 Oct 2022 20:09:36 +0000 (16:09 -0400)] 
don't use "update"

3 years agoFix redis_ippool behaviour on DHCPv6 solicit
Arran Cudbard-Bell [Mon, 14 Nov 2022 05:46:12 +0000 (23:46 -0600)] 
Fix redis_ippool behaviour on DHCPv6 solicit

3 years agoAlign trigger_exec() prototype with function definition
Nick Porter [Wed, 9 Nov 2022 15:45:23 +0000 (15:45 +0000)] 
Align trigger_exec() prototype with function definition

3 years agoEnsure rate limited triggers are fired on first occurrence
Nick Porter [Wed, 9 Nov 2022 15:43:34 +0000 (15:43 +0000)] 
Ensure rate limited triggers are fired on first occurrence

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:28 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:25 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:21 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:19 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:15 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:13 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:10 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Sat, 5 Nov 2022 09:40:06 +0000 (09:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

3 years agoHandle timeout from ldap_results() when performing persistent searches
Nick Porter [Fri, 4 Nov 2022 16:52:11 +0000 (16:52 +0000)] 
Handle timeout from ldap_results() when performing persistent searches

3 years agoAdapt RFC4533 ldap_sync tests to validate new cookie store behaviour
Nick Porter [Wed, 2 Nov 2022 19:44:18 +0000 (19:44 +0000)] 
Adapt RFC4533 ldap_sync tests to validate new cookie store behaviour

3 years agoFix typo
Arran Cudbard-Bell [Thu, 3 Nov 2022 22:02:26 +0000 (22:02 +0000)] 
Fix typo

3 years agoCI: Bump freebsd vm action version
Nick Porter [Wed, 2 Nov 2022 12:10:57 +0000 (12:10 +0000)] 
CI: Bump freebsd vm action version

3 years agoEnsure Python 3.10 used on MacOS until 3.11 supported
Nick Porter [Wed, 2 Nov 2022 11:15:56 +0000 (11:15 +0000)] 
Ensure Python 3.10 used on MacOS until 3.11 supported

There are deprecated functions which break the build with Python 3.11

3 years agorlm_python is Python3
Nick Porter [Tue, 1 Nov 2022 21:13:41 +0000 (21:13 +0000)] 
rlm_python is Python3

On some deb systems python-dev installs python-dev-is-python2
and hence python2-dev

3 years agoCorrectly detect working python when using gcc
Nick Porter [Tue, 1 Nov 2022 18:41:47 +0000 (18:41 +0000)] 
Correctly detect working python when using gcc

gcc wants -l options after the source file - so populate $LIBS

3 years agoSend correct cookie
Nick Porter [Tue, 1 Nov 2022 09:36:52 +0000 (09:36 +0000)] 
Send correct cookie

sync->cookie is the latest received.
sync_packet_ctx->cookie is the one for the checkpoint we've reached.

3 years agoExplicity ignore return code (CID #1516561)
Nick Porter [Tue, 1 Nov 2022 08:20:35 +0000 (08:20 +0000)] 
Explicity ignore return code (CID #1516561)

3 years agoMinor fixes
Arran Cudbard-Bell [Mon, 31 Oct 2022 23:20:12 +0000 (17:20 -0600)] 
Minor fixes

3 years agoSlightly better messages
Arran Cudbard-Bell [Mon, 31 Oct 2022 22:07:03 +0000 (16:07 -0600)] 
Slightly better messages

3 years agoPrint as much information as possible about why we failed waiting for a process
Arran Cudbard-Bell [Mon, 31 Oct 2022 21:48:21 +0000 (15:48 -0600)] 
Print as much information as possible about why we failed waiting for a process

3 years agoDon't print confusing PID, this is exeptected
Arran Cudbard-Bell [Mon, 31 Oct 2022 21:22:32 +0000 (15:22 -0600)] 
Don't print confusing PID, this is exeptected

3 years agoRevert "Ensure there's no way linelog tests can conflict"
Arran Cudbard-Bell [Mon, 31 Oct 2022 20:12:11 +0000 (14:12 -0600)] 
Revert "Ensure there's no way linelog tests can conflict"

This reverts commit fb9e85ad6a41b323c19ded3b4e242a1dd5a6fe61.

3 years agoEnsure there's no way linelog tests can conflict
Arran Cudbard-Bell [Mon, 31 Oct 2022 18:56:21 +0000 (12:56 -0600)] 
Ensure there's no way linelog tests can conflict

3 years agoAdd -Wdeclaration-after-statement where supported (#4762)
James Jones [Mon, 31 Oct 2022 18:19:14 +0000 (13:19 -0500)] 
Add -Wdeclaration-after-statement where supported (#4762)

* Add -Wdeclaration-after-statement where supported

This enforces one of the FreeRADIUS coding standards.
NOTE: I had to do a "make force-reconfig" to get the changes
made to configure.ac and m4/ax_cc.m4 to have an effect in
configure. This caused changes in thirty-five other configure
files that are unrelated to this change. I am including only
the changes to the files relevant to adding the above option
to CFLAGS, namely the files I explicitly changed and configure
itself.

We also add changes to fix the declaration after statement
instances this addition turns up.

* Don't declare vars in loops

* Don't declare vars in groups

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agov4: Add functionality to rate limit LDAP sync store Cookie (#4784)
Nick Porter [Mon, 31 Oct 2022 18:11:04 +0000 (18:11 +0000)] 
v4: Add functionality to rate limit LDAP sync store Cookie (#4784)

* Simplify arguments for ldap_sync_cookie_store

* Add config items for cookie store interval

* Add module instance to sync_state_t

And pass it to sync initialisation functions to populate the
sync_state_t

* Define structure for tracking sync packets

* Add list to sync_state for tracking pending packets

* Create sync packet ctx to track progress of each change

* Add counters for batching cookie storing

* Store received cookies in list of pending packets

rather than sending immediately

* Use counters to send cookies based on number of processed changes

* Use timer to send cookies on a periodic basis

3 years agoWe need to have cyrus-sasl-devel installed when building the LDAP packages otherwise...
Arran Cudbard-Bell [Mon, 31 Oct 2022 16:52:38 +0000 (10:52 -0600)] 
We need to have cyrus-sasl-devel installed when building the LDAP packages otherwise we don't get SASL support

3 years agoCI-DEB: 2nd instance of use "sid" in place of "bookworm"
Nick Porter [Mon, 31 Oct 2022 08:27:21 +0000 (08:27 +0000)] 
CI-DEB: 2nd instance of use "sid" in place of "bookworm"

3 years agoTry to shift up to sbuff start as current sbuff can be child sbuff with no used space...
Max Khon [Sun, 30 Oct 2022 22:25:15 +0000 (00:25 +0200)] 
Try to shift up to sbuff start as current sbuff can be child sbuff with no used space (#4761)

* Try to shift up to sbuff start as current sbuff can be child sbuff with no used space.

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agoSync openssl version checks with tls/version.c
Arran Cudbard-Bell [Fri, 28 Oct 2022 15:49:26 +0000 (10:49 -0500)] 
Sync openssl version checks with tls/version.c

3 years agoOnly run self-hosted cleanup job on main repo
Nick Porter [Fri, 28 Oct 2022 09:07:51 +0000 (10:07 +0100)] 
Only run self-hosted cleanup job on main repo

3 years agotrack the correct list, and still insert leaf attributes
Alan T. DeKok [Thu, 27 Oct 2022 18:53:21 +0000 (14:53 -0400)] 
track the correct list, and still insert leaf attributes

3 years agoRevert "ignore the inserted child list, not the parent one"
Alan T. DeKok [Thu, 27 Oct 2022 18:34:37 +0000 (14:34 -0400)] 
Revert "ignore the inserted child list, not the parent one"

This reverts commit 0806bb103d9ac5840e0113ea89c920ac3474f06d.

3 years agoignore the inserted child list, not the parent one
Alan T. DeKok [Thu, 27 Oct 2022 13:45:30 +0000 (09:45 -0400)] 
ignore the inserted child list, not the parent one

3 years agoremove dead code
Alan T. DeKok [Thu, 27 Oct 2022 13:21:19 +0000 (09:21 -0400)] 
remove dead code

3 years agoCI-DEB: use "sid" instead of "bookworm" for NR debian repos
Matthew Newton [Wed, 26 Oct 2022 20:46:07 +0000 (21:46 +0100)] 
CI-DEB: use "sid" instead of "bookworm" for NR debian repos

3 years agoCI: Run on GitHub unless it's the main FreeRADIUS repo
Matthew Newton [Wed, 26 Oct 2022 17:21:45 +0000 (18:21 +0100)] 
CI: Run on GitHub unless it's the main FreeRADIUS repo

3 years agomanually enable / disable new conditions for tests
Alan T. DeKok [Wed, 26 Oct 2022 16:28:26 +0000 (12:28 -0400)] 
manually enable / disable new conditions for tests

3 years agoSQL uses SQL-Group, so use the old conditions here, too
Alan T. DeKok [Tue, 25 Oct 2022 20:57:00 +0000 (16:57 -0400)] 
SQL uses SQL-Group, so use the old conditions here, too

3 years agoupcast to 64-bits for integers
Alan T. DeKok [Tue, 25 Oct 2022 20:33:34 +0000 (16:33 -0400)] 
upcast to 64-bits for integers

3 years agotypo
Alan T. DeKok [Tue, 25 Oct 2022 20:26:21 +0000 (16:26 -0400)] 
typo

3 years agoCI: run sanitizers in a separate non-Docker job on GitHub
Matthew Newton [Tue, 25 Oct 2022 22:45:19 +0000 (23:45 +0100)] 
CI: run sanitizers in a separate non-Docker job on GitHub

3 years agoCI: fixes for when running directly on GitHub images
Matthew Newton [Tue, 25 Oct 2022 23:01:38 +0000 (00:01 +0100)] 
CI: fixes for when running directly on GitHub images

3 years agoFix dangling pointer issue (#4786)
James Jones [Tue, 25 Oct 2022 22:22:44 +0000 (17:22 -0500)] 
Fix dangling pointer issue (#4786)

clang may not realize that memcpy() doesn't keep the pointers handed
to it around, so there's no risk of the address of an auto being kept
past the caller's return, hence the "dangling pointer" warning.

Instead, head it off at the pass by immediately returning if len
is zero, so in needn't be set to the address of an auto; the only
explicit passing of NULL for in passes 0 for len. (Comments explain
how if len == 0, nothing changes in the context.) One could argue
for checking in rather than or in addition to checking len... OTOH,
shouldn't passing NULL and a non-zero len break loudly?

3 years agoCI: disable sanitizers until we can work out why it deadlocks in Docker
Matthew Newton [Tue, 25 Oct 2022 16:39:34 +0000 (17:39 +0100)] 
CI: disable sanitizers until we can work out why it deadlocks in Docker

3 years agoCI: fix comment
Matthew Newton [Tue, 25 Oct 2022 14:14:16 +0000 (15:14 +0100)] 
CI: fix comment

3 years agoOnly run the main CI build on our infrastructure
Arran Cudbard-Bell [Tue, 25 Oct 2022 13:21:49 +0000 (09:21 -0400)] 
Only run the main CI build on our infrastructure

3 years agoRemove unused
Nick Porter [Tue, 25 Oct 2022 10:09:36 +0000 (11:09 +0100)] 
Remove unused

3 years agopush xlat condition parsing until later
Alan T. DeKok [Mon, 24 Oct 2022 21:31:12 +0000 (17:31 -0400)] 
push xlat condition parsing until later

to avoid having unused xlats hanging around when we parse
policies.

3 years agoregister function arguments if available
Alan T. DeKok [Mon, 24 Oct 2022 21:30:19 +0000 (17:30 -0400)] 
register function arguments if available

so that the parser can do the correct thing

3 years agoadd "don't use new conditions" for LDAP tests
Alan T. DeKok [Mon, 24 Oct 2022 19:43:35 +0000 (15:43 -0400)] 
add "don't use new conditions" for LDAP tests

so that when we "flip the switch" to always enable them, nothing
should break