]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoAmend comments for rest module "pool" to reflect code behaviour
Nick Porter [Fri, 9 Dec 2022 12:20:52 +0000 (12:20 +0000)] 
Amend comments for rest module "pool" to reflect code behaviour

3 years agoHandle changes in libcurl options
Nick Porter [Fri, 9 Dec 2022 10:20:55 +0000 (10:20 +0000)] 
Handle changes in libcurl options

3 years agoUse FR_CURL_REQUEST_SET_OPTION where request is available
Nick Porter [Fri, 9 Dec 2022 09:58:55 +0000 (09:58 +0000)] 
Use FR_CURL_REQUEST_SET_OPTION where request is available

So errors are RERROR rather than ERROR

3 years agoDon't set CURLOPT_PROTOCOLS twice
Nick Porter [Fri, 9 Dec 2022 09:57:24 +0000 (09:57 +0000)] 
Don't set CURLOPT_PROTOCOLS twice

3 years agoAlways use error4
Arran Cudbard-Bell [Fri, 9 Dec 2022 03:57:26 +0000 (21:57 -0600)] 
Always use error4

3 years agoTry pausing the child processes until the parent signals on macOS
Arran Cudbard-Bell [Fri, 9 Dec 2022 02:40:15 +0000 (20:40 -0600)] 
Try pausing the child processes until the parent signals on macOS

3 years agoCleaner version of waitid hack on macOS
Arran Cudbard-Bell [Thu, 8 Dec 2022 23:28:36 +0000 (17:28 -0600)] 
Cleaner version of waitid hack on macOS

3 years agoDiagnose macos CI failures
Arran Cudbard-Bell [Thu, 8 Dec 2022 22:40:07 +0000 (16:40 -0600)] 
Diagnose macos CI failures

3 years agoShould be waitid not waitpid...
Arran Cudbard-Bell [Thu, 8 Dec 2022 22:29:01 +0000 (16:29 -0600)] 
Should be waitid not waitpid...

3 years agoFix tmpl_dcursor_test warnings and make it possible to easily step into the tmpl...
Arran Cudbard-Bell [Thu, 8 Dec 2022 21:47:37 +0000 (15:47 -0600)] 
Fix tmpl_dcursor_test warnings and make it possible to easily step into the tmpl tokenizer on failing tests

3 years agomark the parent redundant xlat as taking "void"
Alan T. DeKok [Thu, 8 Dec 2022 22:02:22 +0000 (17:02 -0500)] 
mark the parent redundant xlat as taking "void"

so that we can free it's args, and they don't be expanded.

The arguments will still be used for the parser, so it's not
all lost.

3 years agochange !~ to !(... =~ ...)
Alan T. DeKok [Tue, 6 Dec 2022 20:21:49 +0000 (15:21 -0500)] 
change !~ to !(... =~ ...)

3 years agoTry bumping CI to macos-12
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:51:03 +0000 (14:51 -0600)] 
Try bumping CI to macos-12

3 years agoParam is now used
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:41:27 +0000 (14:41 -0600)] 
Param is now used

3 years agorest: Search for pool in the right place
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:24:35 +0000 (14:24 -0600)] 
rest: Search for pool in the right place

3 years agoFormatting
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:11:52 +0000 (14:11 -0600)] 
Formatting

3 years agoDon't warn about unreachable generic types when the lvalue is case (unreachable-code...
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:11:40 +0000 (14:11 -0600)] 
Don't warn about unreachable generic types when the lvalue is case (unreachable-code-generic-assoc)

What a completely useless and utterly stupid warning

3 years agoFixes for running with a non system version of clangd on macos
Arran Cudbard-Bell [Thu, 8 Dec 2022 20:10:58 +0000 (14:10 -0600)] 
Fixes for running with a non system version of clangd on macos

3 years agoRemove accidentally comitted tests
Arran Cudbard-Bell [Thu, 8 Dec 2022 19:50:00 +0000 (13:50 -0600)] 
Remove accidentally comitted tests

This reverts commit d18cd6caf55d5c210211fd14b6bf817d972f4614.

3 years agoFormatting
Arran Cudbard-Bell [Thu, 8 Dec 2022 19:16:08 +0000 (13:16 -0600)] 
Formatting

3 years agojson: Set the default output mode correctly
Arran Cudbard-Bell [Thu, 8 Dec 2022 17:23:18 +0000 (11:23 -0600)] 
json: Set the default output mode correctly

3 years agocurl: Similar signal fix for smtp and imap
Arran Cudbard-Bell [Thu, 8 Dec 2022 17:18:49 +0000 (11:18 -0600)] 
curl: Similar signal fix for smtp and imap

3 years agocurl: Deal with socket closures in a more libcurl friendly way
Arran Cudbard-Bell [Thu, 8 Dec 2022 17:08:06 +0000 (11:08 -0600)] 
curl: Deal with socket closures in a more libcurl friendly way

3 years agoevent: Call the read event on EV_EOF if we're reading and have pending data
Arran Cudbard-Bell [Thu, 8 Dec 2022 16:50:40 +0000 (10:50 -0600)] 
event: Call the read event on EV_EOF if we're reading and have pending data

3 years agoCorrect bounds check for max_request_time
Arran Cudbard-Bell [Thu, 8 Dec 2022 16:16:39 +0000 (10:16 -0600)] 
Correct bounds check for max_request_time

3 years agorlm_rest: Always install a signal handler for unlang_module_yield calls
Arran Cudbard-Bell [Thu, 8 Dec 2022 16:10:16 +0000 (10:10 -0600)] 
rlm_rest: Always install a signal handler for unlang_module_yield calls

3 years agorlm_rest: Formatting
Arran Cudbard-Bell [Thu, 8 Dec 2022 16:09:53 +0000 (10:09 -0600)] 
rlm_rest: Formatting

3 years agoFix lua_alloc_cmd (#4813)
Max Khon [Tue, 6 Dec 2022 17:55:35 +0000 (17:55 +0000)] 
Fix lua_alloc_cmd (#4813)

(0)      redis_ippool - ERROR: (0) error   : ERR Error running script (call to f_555f9a10a670669b1725edfc4b558c4c5eb3f9ad): @user_script:14: user_script:14: attempt to compare number with string

3 years agoWe don't need to do "%{Attr-Name[#]}" either
Alan T. DeKok [Tue, 6 Dec 2022 16:59:42 +0000 (11:59 -0500)] 
We don't need to do "%{Attr-Name[#]}" either

Just bare xlats are fine now

3 years agochange "%{Attr-Name}" to &Attr-Name
Alan T. DeKok [Tue, 6 Dec 2022 16:54:06 +0000 (11:54 -0500)] 
change "%{Attr-Name}" to &Attr-Name

It's really not clear where this obsession with quoting came from,
but it's unnecessary.

3 years agoTime delta check only needs lt and gt comparisons
Nick Porter [Tue, 6 Dec 2022 16:36:15 +0000 (16:36 +0000)] 
Time delta check only needs lt and gt comparisons

3 years agoRename fr_equality_op to reflect its actual meaning (#4823)
James Jones [Tue, 6 Dec 2022 15:36:15 +0000 (09:36 -0600)] 
Rename fr_equality_op to reflect its actual meaning (#4823)

The array contains true values for comparison operators, not
just equals and not equals. A rename to fr_comparison_op
makes a positive logic version of the distinction between
comparisons (which will coompare any number of values)
and other binary operators (which only do one value) clearer.

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Tue, 6 Dec 2022 09:34:48 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Tue, 6 Dec 2022 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] [Tue, 6 Dec 2022 09:34:33 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Tue, 6 Dec 2022 09:34:31 +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] [Tue, 6 Dec 2022 09:34:28 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Tue, 6 Dec 2022 09:34:22 +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] [Tue, 6 Dec 2022 09:34:19 +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] [Tue, 6 Dec 2022 09:34:16 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoadd RPEDEBUG wehn failing assigment and update tests
Alan T. DeKok [Mon, 5 Dec 2022 20:43:32 +0000 (15:43 -0500)] 
add RPEDEBUG wehn failing assigment and update tests

3 years agoclean up and add new docs
Alan T. DeKok [Mon, 5 Dec 2022 18:30:31 +0000 (13:30 -0500)] 
clean up and add new docs

3 years agomore != to !(==)
Alan T. DeKok [Mon, 5 Dec 2022 15:32:41 +0000 (10:32 -0500)] 
more != to !(==)

3 years agoglobal search and replace
Alan T. DeKok [Mon, 5 Dec 2022 03:07:27 +0000 (22:07 -0500)] 
global search and replace

perl -p -i -e 's/\(([^ ]+) != ([^ ]+)\)/(!($1 == $2))/g'

3 years agomake redundant xlats work
Alan T. DeKok [Sun, 4 Dec 2022 14:33:04 +0000 (09:33 -0500)] 
make redundant xlats work

via hackity hack,  The real solution is not to copy the input
(unexpanded) arguments.  Instead, the xlat_redundant() call
should simply copy it's expanded arguments, and call each
function in turn.

i.e. xlat_redundant() has no need to call xlat push or xlat
yield, as it already has all of the arguments it needs.

That also stops the inputs from being epanded repeatedly.

3 years agomore a!=b --> !(a==b)
Alan T. DeKok [Sat, 3 Dec 2022 20:31:38 +0000 (15:31 -0500)] 
more a!=b --> !(a==b)

perl -p -i -e 's/\(([^ ]+) != ("[^"]+")\)/(!($1 == $2))/g'
             's/\("([^"]+)" != ([^ ]+)\)/(!($1 == $2))/g'
     's/\("([^"]+)" != ("[^"]+")\)/(!($1 == $2))/g' ...

3 years agolets initialize fields, m'kay?
Alan T. DeKok [Sat, 3 Dec 2022 19:52:13 +0000 (14:52 -0500)] 
lets initialize fields, m'kay?

3 years agoopen files passed on command line
Alan T. DeKok [Sat, 3 Dec 2022 13:52:12 +0000 (08:52 -0500)] 
open files passed on command line

3 years agoallow -f to specify all file names
Alan T. DeKok [Sat, 3 Dec 2022 13:07:36 +0000 (08:07 -0500)] 
allow -f to specify all file names

3 years agoEnsure output directory exists for extracted pcap
Nick Porter [Mon, 5 Dec 2022 12:41:37 +0000 (12:41 +0000)] 
Ensure output directory exists for extracted pcap

3 years agoshut up clang scan
Alan T. DeKok [Fri, 2 Dec 2022 22:40:16 +0000 (17:40 -0500)] 
shut up clang scan

3 years agoadd CoA filter and reply file to rc_file_pair_t
Alan T. DeKok [Fri, 2 Dec 2022 22:13:40 +0000 (17:13 -0500)] 
add CoA filter and reply file to rc_file_pair_t

3 years agouse dlists for filenames
Alan T. DeKok [Fri, 2 Dec 2022 21:54:10 +0000 (16:54 -0500)] 
use dlists for filenames

that way they get processed in the order that they appear in
on the command line, and not in some random order by sorting
the filename.

This isn't stricyly needed here, but will be needed for receiving
CoA packets.

3 years agoAdd -A Foo-Bar
Alan T. DeKok [Fri, 2 Dec 2022 21:19:27 +0000 (16:19 -0500)] 
Add -A Foo-Bar

so we can use an arbitrary attribute to match CoA packets to
outgoing requests

3 years agofirst pass at allowing radclient to read CoA packets
Alan T. DeKok [Fri, 2 Dec 2022 21:14:54 +0000 (16:14 -0500)] 
first pass at allowing radclient to read CoA packets

3 years agosimplify code.
Alan T. DeKok [Thu, 1 Dec 2022 21:55:52 +0000 (16:55 -0500)] 
simplify code.

xlat's have not been supported for a while.  So there's no reason
to manually root through the list looking for things.

3 years agouse dlist functions instead of hand-rolled things
Alan T. DeKok [Thu, 1 Dec 2022 20:11:30 +0000 (15:11 -0500)] 
use dlist functions instead of hand-rolled things

3 years agoadd === and !==
Alan T. DeKok [Thu, 1 Dec 2022 19:31:55 +0000 (14:31 -0500)] 
add === and !==

After other languages which have the same thing.

This is less useful for FreeRADIUS, as all "variables" are strongly
typed.  But it could be used for non-quoted xlats, and it could
be used in the future for "void" types

3 years agotests for expr with non-existent attributes
Alan T. DeKok [Tue, 29 Nov 2022 23:34:28 +0000 (18:34 -0500)] 
tests for expr with non-existent attributes

3 years agoEnsure gdb knows where to load relative path library files
Nick Porter [Thu, 1 Dec 2022 13:54:49 +0000 (13:54 +0000)] 
Ensure gdb knows where to load relative path library files

3 years agoTemporarily revert to sleep in place of triggers
Nick Porter [Thu, 1 Dec 2022 08:35:34 +0000 (08:35 +0000)] 
Temporarily revert to sleep in place of triggers

until issues with exec are resolved.

3 years agoCI: Correct port mapping for 389ds container
Nick Porter [Wed, 30 Nov 2022 11:46:21 +0000 (11:46 +0000)] 
CI: Correct port mapping for 389ds container

3 years agoHandle failure to copy args (CIS #1517104)
Nick Porter [Wed, 30 Nov 2022 08:15:51 +0000 (08:15 +0000)] 
Handle failure to copy args (CIS #1517104)

3 years agoDon't need to build everything to get pkg_version
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:34:42 +0000 (19:34 -0500)] 
Don't need to build everything to get pkg_version

3 years agoA better way...
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:26:26 +0000 (19:26 -0500)] 
A better way...

3 years agoFix local RPM build scripts
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:19:28 +0000 (19:19 -0500)] 
Fix local RPM build scripts

3 years agochange (foo != bar) to !(foo == bar)
Alan T. DeKok [Tue, 29 Nov 2022 23:26:34 +0000 (18:26 -0500)] 
change  (foo != bar) to !(foo == bar)

See previous commit for long explanation, and Perl script which
made the changes

3 years agofix failing tests
Alan T. DeKok [Tue, 29 Nov 2022 23:19:30 +0000 (18:19 -0500)] 
fix failing tests

perl -p -i -e 's/\(([^ ]+) != ([^ ]+)\)/(!($1 == $2))/'  $(make test.keywords.help | sed 's,test\.keywords\.,src/tests/keywords/,g')

i.e. change

if (foo != bar) {
test_fail
}

to

if (!(foo == bar)) {
test_fail
}

The first test is "foo does not exist OR foo != bar"
the second test is "not ( foo exists AND foo == bar )"
which are very different.

After making that change, these tests failed.  So we've updated
the checks to be correct, which now make the tests succeed.

3 years agoif-paircmp uses the old-style conditions
Alan T. DeKok [Tue, 29 Nov 2022 23:18:35 +0000 (18:18 -0500)] 
if-paircmp uses the old-style conditions

3 years agodon't use "update"
Alan T. DeKok [Tue, 29 Nov 2022 23:16:26 +0000 (18:16 -0500)] 
don't use "update"

3 years agoupcast string to octets
Alan T. DeKok [Tue, 29 Nov 2022 21:42:56 +0000 (16:42 -0500)] 
upcast string to octets

everything else was upcast to octets anyways

3 years agoradict: Add new options (#4819)
Jorge Pereira [Tue, 29 Nov 2022 16:55:34 +0000 (13:55 -0300)] 
radict: Add new options (#4819)

-c print out in CSV format
-H print out the Headers

3 years agoremove unnecessary edit
Alan T. DeKok [Tue, 29 Nov 2022 08:46:36 +0000 (03:46 -0500)] 
remove unnecessary edit

probably left over from some earlier cleanup and rewrite

3 years agojust use real attributes in the control list
Alan T. DeKok [Tue, 29 Nov 2022 08:35:29 +0000 (03:35 -0500)] 
just use real attributes in the control list

3 years agoUse trigger to detect when server is ready in ldap_sync tests
Nick Porter [Mon, 14 Nov 2022 18:21:25 +0000 (18:21 +0000)] 
Use trigger to detect when server is ready in ldap_sync tests

More reliable than just a sleep 1

3 years agoAdd trigger calls to ldap_sync when syncs start and stop
Nick Porter [Mon, 14 Nov 2022 17:56:41 +0000 (17:56 +0000)] 
Add trigger calls to ldap_sync when syncs start and stop

3 years agoTake a copy of trigger args so async triggers have access to them
Nick Porter [Fri, 25 Nov 2022 16:06:31 +0000 (16:06 +0000)] 
Take a copy of trigger args so async triggers have access to them

3 years agoSimplify - cursor not needed just to prepend one pair
Nick Porter [Fri, 25 Nov 2022 14:07:27 +0000 (14:07 +0000)] 
Simplify - cursor not needed just to prepend one pair

3 years agoEphemeral xlats do not rely on xlat thread instance data
Nick Porter [Tue, 29 Nov 2022 10:29:31 +0000 (10:29 +0000)] 
Ephemeral xlats do not rely on xlat thread instance data

3 years agoInstantiate ephemeral xlat for trigger
Nick Porter [Thu, 24 Nov 2022 17:38:45 +0000 (17:38 +0000)] 
Instantiate ephemeral xlat for trigger

3 years agoFallback to internal dictionary if request->dict not set
Nick Porter [Thu, 24 Nov 2022 17:34:48 +0000 (17:34 +0000)] 
Fallback to internal dictionary if request->dict not set

Currently all trigger args are in the internal dictionary
and request->dict is not set.

3 years agodocs
Nick Porter [Thu, 24 Nov 2022 17:31:37 +0000 (17:31 +0000)] 
docs

3 years agoReduce debug noise for triggers not configured
Nick Porter [Mon, 14 Nov 2022 17:55:22 +0000 (17:55 +0000)] 
Reduce debug noise for triggers not configured

3 years agoupdate docs to match code
Alan T. DeKok [Fri, 25 Nov 2022 20:51:07 +0000 (15:51 -0500)] 
update docs to match code

3 years agoupdate local dictionaries for local variables.
Alan T. DeKok [Fri, 25 Nov 2022 19:58:32 +0000 (14:58 -0500)] 
update local dictionaries for local variables.

Right now this means that local variables are really just local
attribute definitions.  And we can then use those attributes
anywhere.  And, they're not cleaned up when the scope exits.

So... don't use them for now.

3 years agoAllow dictionaries to depend on each other
Alan T. DeKok [Fri, 25 Nov 2022 18:29:14 +0000 (13:29 -0500)] 
Allow dictionaries to depend on each other

and add API to see if the dictionaries are compatible.
Because we can no longer depend on comparing pointers

3 years agopreliminary code to interpret UNLANG_TYPE_VARIABLE
Alan T. DeKok [Fri, 25 Nov 2022 14:41:28 +0000 (09:41 -0500)] 
preliminary code to interpret UNLANG_TYPE_VARIABLE

does nothing right now, but at least doesn't crash if you try to
use local variables

3 years agoRemove redundant internal dictionary copy of LDAP-Sync attrs
Nick Porter [Thu, 24 Nov 2022 17:39:14 +0000 (17:39 +0000)] 
Remove redundant internal dictionary copy of LDAP-Sync attrs

3 years agoReport which sync is being started / abandoned
Nick Porter [Mon, 14 Nov 2022 17:51:57 +0000 (17:51 +0000)] 
Report which sync is being started / abandoned

3 years agoAdd UBNT dictionary (#4818)
Youfu Zhang [Fri, 25 Nov 2022 13:54:49 +0000 (21:54 +0800)] 
Add UBNT dictionary (#4818)

3 years agoCorrectly parent value boxes from their pairs
Nick Porter [Fri, 25 Nov 2022 12:31:25 +0000 (12:31 +0000)] 
Correctly parent value boxes from their pairs

3 years agopreliminary support for compiling local variables
Alan T. DeKok [Thu, 24 Nov 2022 20:04:40 +0000 (15:04 -0500)] 
preliminary support for compiling local variables

However, it doesn't quite work as yet.  The tmpl_rules_t have
parents, and this a parent dict to check.  But the pass2 resolution
functions just get passed the local dictionary, and not the entire
tmpl_rules_t.

As a result, the attributes are looked up in either the local
dictionary. or in the protocol one.  But there's no fallback
from one to the other.

3 years agouse consistent names
Alan T. DeKok [Thu, 24 Nov 2022 15:56:38 +0000 (10:56 -0500)] 
use consistent names

t_rules is tmpl_rules_t
at_rules is tmpl_attr_rules_t

3 years agotypo
Alan T. DeKok [Thu, 24 Nov 2022 14:39:43 +0000 (09:39 -0500)] 
typo

3 years agoadd fr_dict_protocol_alloc() for use with local dictionaries
Alan T. DeKok [Thu, 24 Nov 2022 14:39:02 +0000 (09:39 -0500)] 
add fr_dict_protocol_alloc() for use with local dictionaries

3 years agoupdate parser to allow local variable definitions
Alan T. DeKok [Thu, 24 Nov 2022 14:22:09 +0000 (09:22 -0500)] 
update parser to allow local variable definitions

and don't allow unlang statements inside of list assignments like

&request += {
...
}

This was previously parsed, and then would result in some weird
load-time error.  Forbidding it here makes the errors a bit clearer.

3 years agoalways initialize output buffer. Fixes #4816
Alan T. DeKok [Thu, 24 Nov 2022 13:14:42 +0000 (08:14 -0500)] 
always initialize output buffer.  Fixes #4816

3 years agoAdd max_outstanding option to limit number of processing ldap_sync packets
Nick Porter [Thu, 17 Nov 2022 19:48:06 +0000 (19:48 +0000)] 
Add max_outstanding option to limit number of processing ldap_sync packets

3 years agoAdd fr_network_listen_outstanding to get the number of outstanding packets
Nick Porter [Thu, 17 Nov 2022 19:28:47 +0000 (19:28 +0000)] 
Add fr_network_listen_outstanding to get the number of outstanding packets

3 years agoVersion number fixes for RPM packaging
Matthew Newton [Wed, 23 Nov 2022 20:20:17 +0000 (20:20 +0000)] 
Version number fixes for RPM packaging