]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoMove sbuff talloc wrappers to using fr_slen_t
Arran Cudbard-Bell [Mon, 24 Jan 2022 21:25:23 +0000 (15:25 -0600)] 
Move sbuff talloc wrappers to using fr_slen_t

If something breaks then we'll need to fix the wrapped functions...

3 years agoFix build issue in rlm_sigtran
Arran Cudbard-Bell [Mon, 24 Jan 2022 20:14:34 +0000 (14:14 -0600)] 
Fix build issue in rlm_sigtran

Seems like it was missed in the module call refactoring

3 years agoUse new libkqueue EVFILT_LIBKQUEUE version interface
Arran Cudbard-Bell [Mon, 24 Jan 2022 18:20:34 +0000 (12:20 -0600)] 
Use new libkqueue EVFILT_LIBKQUEUE version interface

This lets us retrieve the real version at runtime.

3 years agonotes for option 119
Alan T. DeKok [Sun, 23 Jan 2022 13:53:38 +0000 (08:53 -0500)] 
notes for option 119

3 years agobetter handling of casts
Alan T. DeKok [Sat, 22 Jan 2022 13:48:28 +0000 (08:48 -0500)] 
better handling of casts

3 years agoallow for non-socket listeners
Alan T. DeKok [Fri, 21 Jan 2022 15:49:03 +0000 (10:49 -0500)] 
allow for non-socket listeners

which have no app_io->open, but do have app_io->event_list_set

3 years agohave only one return point from tokenize_expression()
Alan T. DeKok [Thu, 20 Jan 2022 21:25:57 +0000 (16:25 -0500)] 
have only one return point from tokenize_expression()

which may make it easier to groupify things.

3 years agogroupify arguments to functions
Alan T. DeKok [Thu, 20 Jan 2022 21:23:21 +0000 (16:23 -0500)] 
groupify arguments to functions

for now, we create the arguments and then groupify them if necessary.

The alternative is to always create grouping nodes, and then
remove / reparent them if they're not necessary.

3 years agoskip work if we're already in the network thread
Alan T. DeKok [Thu, 20 Jan 2022 20:50:36 +0000 (15:50 -0500)] 
skip work if we're already in the network thread

3 years agoRemove Ubuntu 18.04 from build matrix (#4366)
Nick Porter [Fri, 21 Jan 2022 14:49:55 +0000 (14:49 +0000)] 
Remove Ubuntu 18.04 from build matrix (#4366)

Ubuntu 18.04 uses OpenSSL 1.1.1 which lacks the OPENSSL_INIT_NO_ATEXIT
option used to control cleanup sequence.

Also, 18.04 is likely to be end of life by the time FreeRADIUS v4 is
production ready.

3 years agoApply tmpl rules split to rlm_mruby (#4365)
Nick Porter [Fri, 21 Jan 2022 14:04:13 +0000 (14:04 +0000)] 
Apply tmpl rules split to rlm_mruby (#4365)

3 years agoremove hacks
Alan T. DeKok [Thu, 20 Jan 2022 17:30:54 +0000 (12:30 -0500)] 
remove hacks

3 years agoall children are groups
Alan T. DeKok [Thu, 20 Jan 2022 17:29:55 +0000 (12:29 -0500)] 
all children are groups

don't bother doing casts here, as it's not necessary

3 years agono need to pass "func" to xlat_purify_expr()
Alan T. DeKok [Thu, 20 Jan 2022 16:34:14 +0000 (11:34 -0500)] 
no need to pass "func" to xlat_purify_expr()

3 years agomore upcast fixes, and fixes for left / right shift
Alan T. DeKok [Thu, 20 Jan 2022 16:14:23 +0000 (11:14 -0500)] 
more upcast fixes, and fixes for left / right shift

3 years agoone more attempt to shut up clang
Alan T. DeKok [Thu, 20 Jan 2022 15:48:07 +0000 (10:48 -0500)] 
one more attempt to shut up clang

3 years agoconvert code to being table driven
Alan T. DeKok [Thu, 20 Jan 2022 14:12:17 +0000 (09:12 -0500)] 
convert code to being table driven

3 years agoinitialize the output box only as the last step before returning
Alan T. DeKok [Thu, 20 Jan 2022 14:09:54 +0000 (09:09 -0500)] 
initialize the output box only as the last step before returning

3 years agoadd upcasting from string/octets for operations, too
Alan T. DeKok [Thu, 20 Jan 2022 13:59:57 +0000 (08:59 -0500)] 
add upcasting from string/octets for operations, too

3 years agoadd more casting for booleans
Alan T. DeKok [Thu, 20 Jan 2022 13:53:06 +0000 (08:53 -0500)] 
add more casting for booleans

3 years agoadd xlat_purify and tests
Alan T. DeKok [Thu, 20 Jan 2022 00:08:35 +0000 (19:08 -0500)] 
add xlat_purify and tests

which for now only handle xlat_expr, but that's a good enough
test to catch things which had previously been missed.

3 years agoadd automatic casting for comparisons, too.
Alan T. DeKok [Thu, 20 Jan 2022 00:01:33 +0000 (19:01 -0500)] 
add automatic casting for comparisons, too.

because fr_value_box_cmp() only handles the case where the types
on LHS and RHS are exactly the same.  As a result, we have to do
various kinds of promotion here.

3 years agouse the correct variable
Alan T. DeKok [Wed, 19 Jan 2022 20:41:36 +0000 (15:41 -0500)] 
use the correct variable

3 years agofirst pass of xlat_purify_expr()
Alan T. DeKok [Wed, 19 Jan 2022 20:39:38 +0000 (15:39 -0500)] 
first pass of xlat_purify_expr()

which only works on expressions and comparisons, and then only
some of the time.  And then only if it's asked to.

3 years agofix for new tmpl_rules_t
Alan T. DeKok [Wed, 19 Jan 2022 19:35:12 +0000 (14:35 -0500)] 
fix for new tmpl_rules_t

3 years agoNeed to gether up more events before servicing the I/O callbacks
Arran Cudbard-Bell [Wed, 19 Jan 2022 19:28:39 +0000 (14:28 -0500)] 
Need to gether up more events before servicing the I/O callbacks

3 years agoReduce spurious rebalancing in the trunk
Arran Cudbard-Bell [Wed, 19 Jan 2022 19:23:58 +0000 (14:23 -0500)] 
Reduce spurious rebalancing in the trunk

3 years agoDon't crash if the first atexit handler is a global atexit handler
Arran Cudbard-Bell [Wed, 19 Jan 2022 19:14:26 +0000 (14:14 -0500)] 
Don't crash if the first atexit handler is a global atexit handler

3 years agoadd XOR
Alan T. DeKok [Wed, 19 Jan 2022 16:28:07 +0000 (11:28 -0500)] 
add XOR

3 years agomore notes
Alan T. DeKok [Wed, 19 Jan 2022 16:27:04 +0000 (11:27 -0500)] 
more notes

3 years agotypo
Alan T. DeKok [Wed, 19 Jan 2022 16:23:33 +0000 (11:23 -0500)] 
typo

3 years agotypo
Alan T. DeKok [Wed, 19 Jan 2022 16:18:16 +0000 (11:18 -0500)] 
typo

3 years agoshut up clang analyzer
Alan T. DeKok [Wed, 19 Jan 2022 16:14:00 +0000 (11:14 -0500)] 
shut up clang analyzer

3 years agoremove string/octets prepend.
Alan T. DeKok [Wed, 19 Jan 2022 16:11:00 +0000 (11:11 -0500)] 
remove string/octets prepend.

It's not really needed, and it interferes with the ability to
add XOR

3 years agolots more notes
Alan T. DeKok [Wed, 19 Jan 2022 15:48:24 +0000 (10:48 -0500)] 
lots more notes

3 years agoRemove duplicate definition
Arran Cudbard-Bell [Wed, 19 Jan 2022 16:02:11 +0000 (11:02 -0500)] 
Remove duplicate definition

3 years agoSplit tmpl rules
Arran Cudbard-Bell [Wed, 19 Jan 2022 15:20:01 +0000 (10:20 -0500)] 
Split tmpl rules

3 years agoshut up clang, if possible
Alan T. DeKok [Wed, 19 Jan 2022 15:06:30 +0000 (10:06 -0500)] 
shut up clang, if possible

3 years agorename XLAT_ATTRIBUTE to XLAT_TMPL
Alan T. DeKok [Wed, 19 Jan 2022 14:28:32 +0000 (09:28 -0500)] 
rename XLAT_ATTRIBUTE to XLAT_TMPL

in preparation for making RHS of expressions into TMPLs, too

3 years agoquiet compiler
Alan T. DeKok [Wed, 19 Jan 2022 13:53:28 +0000 (08:53 -0500)] 
quiet compiler

3 years agovarious compiler fixes
Alan T. DeKok [Wed, 19 Jan 2022 13:31:40 +0000 (08:31 -0500)] 
various compiler fixes

3 years agoprototype
Alan T. DeKok [Tue, 18 Jan 2022 22:23:24 +0000 (17:23 -0500)] 
prototype

3 years agolet's handle -1, m'kay?
Alan T. DeKok [Tue, 18 Jan 2022 22:00:31 +0000 (17:00 -0500)] 
let's handle -1, m'kay?

3 years agoadd xlat expressions
Alan T. DeKok [Tue, 18 Jan 2022 21:56:13 +0000 (16:56 -0500)] 
add xlat expressions

currently not used anywhere other than tests.

Next steps are to change XLAT_ATTRIBUTE to XLAT_TMPL, so that
we can have enums, regexes, and unparsed strings in expressions

3 years agominor rearrangement
Alan T. DeKok [Tue, 18 Jan 2022 21:45:14 +0000 (16:45 -0500)] 
minor rearrangement

3 years agowe need &Cast-Base for printing enum names for fr_type_t
Alan T. DeKok [Tue, 18 Jan 2022 21:44:47 +0000 (16:44 -0500)] 
we need &Cast-Base for printing enum names for fr_type_t

3 years agoexpose more functions in xlat_priv.h
Alan T. DeKok [Tue, 18 Jan 2022 21:43:48 +0000 (16:43 -0500)] 
expose more functions in xlat_priv.h

in preparation for xlat expressions

3 years agomove xlat_internal into xlat_priv.h
Alan T. DeKok [Tue, 18 Jan 2022 21:34:34 +0000 (16:34 -0500)] 
move xlat_internal into xlat_priv.h

3 years agotypo
Alan T. DeKok [Tue, 18 Jan 2022 21:33:33 +0000 (16:33 -0500)] 
typo

3 years agorearrange xlat_print()
Alan T. DeKok [Tue, 18 Jan 2022 21:14:43 +0000 (16:14 -0500)] 
rearrange xlat_print()

into xlat_print_node() for one, and xlat_print() which loops

in preparation for other cleanups

3 years agoadd '!' as a token
Alan T. DeKok [Tue, 18 Jan 2022 20:04:34 +0000 (15:04 -0500)] 
add '!' as a token

3 years agotypo
Alan T. DeKok [Tue, 18 Jan 2022 16:00:08 +0000 (11:00 -0500)] 
typo

3 years agomove "parse scope" to fr_inet_pton6()
Alan T. DeKok [Tue, 18 Jan 2022 15:47:37 +0000 (10:47 -0500)] 
move "parse scope" to fr_inet_pton6()

3 years agofix xlat_unregister_module() so that it works.
Alan T. DeKok [Mon, 17 Jan 2022 18:43:50 +0000 (13:43 -0500)] 
fix xlat_unregister_module() so that it works.

Nothing was setting "mod_inst".  The use of it was left over
from before we had the module_ctx_t

3 years agoadd type names / values as enums to Cast-Base
Alan T. DeKok [Mon, 17 Jan 2022 13:41:26 +0000 (08:41 -0500)] 
add type names / values as enums to Cast-Base

so that the types are in the dictionaries, which is nice.

3 years agowe don't need cast_base
Alan T. DeKok [Sun, 16 Jan 2022 19:31:03 +0000 (14:31 -0500)] 
we don't need cast_base

3 years agoprefer "allowed" to "terminals"
Alan T. DeKok [Sat, 15 Jan 2022 12:46:45 +0000 (07:46 -0500)] 
prefer "allowed" to "terminals"

If we want to parse

&Service-Type = Framed-User

then we don't want to parse it as

(&Service - Type) = (Framed - User)

or

(&Service-Type = Framed) - User

etc.

The tmpl_afrom_attr_substr() calls fr_dict_attr_by_name_substr()
which calls fr_dict_attr_by_name_substr(), which then ignores
terminals.  So this change makes parsing the RHS enum name behave
the same as parsing the LHS attribute name.

3 years agoadd fr_dict_enum_by_name_substr()
Alan T. DeKok [Fri, 14 Jan 2022 20:51:01 +0000 (15:51 -0500)] 
add fr_dict_enum_by_name_substr()

which parses an enumv by name, but doesn't take a "terminals"
argument.  Because the enums are named, and if we see a correct
name, then it's correct, no matter what the terminals are.

3 years agoreturn >0 from fr_value_box_from_substr()
Alan T. DeKok [Fri, 14 Jan 2022 21:57:34 +0000 (16:57 -0500)] 
return >0 from fr_value_box_from_substr()

mainly for ip addresses and prefixes.  And also parse scopes for
DHCPv6.  Line 20 of src/tests/unit/protocols/dhcpv6/addresses.txt
says that "scopes are ignored".

However, the only reason that the previous tests succeeded was that
fr_value_box_from_substr() was returning 0, which meant that
fr_value_box_from_str() didn't check that the entire string was
being parsed.

A first-pass fix was in commit 8a1f819e7f7, but that used an extra
sbuff, instead of just re-using our_in, among other faults.

3 years agoadd more whitespace for sanity
Alan T. DeKok [Thu, 13 Jan 2022 15:45:57 +0000 (10:45 -0500)] 
add more whitespace for sanity

value boxes shouldn't be printed all smashed together

3 years agouse -f for "don't fork", not "-X" for "kill me with debug output"
Alan T. DeKok [Fri, 14 Jan 2022 15:08:36 +0000 (10:08 -0500)] 
use -f for "don't fork", not "-X" for "kill me with debug output"

3 years agolet's use name_len
Alan T. DeKok [Fri, 14 Jan 2022 17:43:19 +0000 (12:43 -0500)] 
let's use name_len

instead of walking off of the end of arrays

3 years agoremove useless code
Alan T. DeKok [Fri, 14 Jan 2022 21:43:36 +0000 (16:43 -0500)] 
remove useless code

3 years agotypo
Alan T. DeKok [Wed, 12 Jan 2022 21:15:34 +0000 (16:15 -0500)] 
typo

3 years agoFix side channels in EAP-pwd leaking information on a password-related value
Daniel DE ALMEIDA BRAGA [Wed, 12 Jan 2022 14:48:04 +0000 (15:48 +0100)] 
Fix side channels in EAP-pwd leaking information on a password-related value

An unnecessary branching on the seed's parity at each iteration may leaks one
bit of information at each iteration. Setting is_odd to BN_is_odd directly
avoids the branch.
Additionaly, OpenSSL's implementation of EC_POINT_set_compressed_coordinates
is not constant-time with respect to the compression type. Since the
compression type is conditioned by save_is_odd, which is related to the password,
we need to avoid the generic OpenSSL call and perform the operations in
constant-time.

3 years agoallow sending packets directly to the worker
Alan T. DeKok [Tue, 11 Jan 2022 18:26:29 +0000 (13:26 -0500)] 
allow sending packets directly to the worker

3 years agoQuiet clang scan
Arran Cudbard-Bell [Sat, 8 Jan 2022 07:00:30 +0000 (23:00 -0800)] 
Quiet clang scan

3 years agoFix various issues with dcursor that would prevent them from working correctly with...
Arran Cudbard-Bell [Sat, 8 Jan 2022 00:29:54 +0000 (16:29 -0800)] 
Fix various issues with dcursor that would prevent them from working correctly with stateful iterators

3 years agoCI FreeBSD: Enable radclient tests
Terry Burton [Thu, 6 Jan 2022 20:21:23 +0000 (20:21 +0000)] 
CI FreeBSD: Enable radclient tests

3 years agoudpfromto: Use plain sendto if our source address is 0.0.0.0 or ::/0
Terry Burton [Thu, 6 Jan 2022 20:17:54 +0000 (20:17 +0000)] 
udpfromto: Use plain sendto if our source address is 0.0.0.0 or ::/0

FreeBSD sendmsg returns EINVAL if IP_SENDSRCADDR is INADDR_ANY{,6}.

3 years agoeapol_test-build.sh: Set permissive CFLAGs for FreeBSD build (#4352)
Terry Burton [Thu, 6 Jan 2022 20:08:23 +0000 (20:08 +0000)] 
eapol_test-build.sh: Set permissive CFLAGs for FreeBSD build (#4352)

... instead of patching the source.

3 years agoTrim default prefix from generated dlist functions
Arran Cudbard-Bell [Thu, 6 Jan 2022 15:24:24 +0000 (09:24 -0600)] 
Trim default prefix from generated dlist functions

3 years agoMake tmpl_attr and tmpl_request lists type safe
Arran Cudbard-Bell [Thu, 6 Jan 2022 14:33:01 +0000 (08:33 -0600)] 
Make tmpl_attr and tmpl_request lists type safe

3 years agoFormatting
Arran Cudbard-Bell [Wed, 5 Jan 2022 19:34:41 +0000 (13:34 -0600)] 
Formatting

3 years agoMake test_enqueue_and_io_speed() work (#4349)
James Jones [Thu, 6 Jan 2022 15:04:11 +0000 (09:04 -0600)] 
Make test_enqueue_and_io_speed() work (#4349)

Not advancing test_time_base kept some trunk requests from
advancing from SENT to COMPLETE state.

3 years agomore FR_PROTO_TRACE
Alan T. DeKok [Thu, 6 Jan 2022 14:53:17 +0000 (09:53 -0500)] 
more FR_PROTO_TRACE

3 years agouse temporary "end"
Alan T. DeKok [Thu, 6 Jan 2022 14:52:57 +0000 (09:52 -0500)] 
use temporary "end"

and pass the right parent in decode_wimax

3 years agocheck min/max lengths only for leaf data types
Alan T. DeKok [Thu, 6 Jan 2022 14:48:04 +0000 (09:48 -0500)] 
check min/max lengths only for leaf data types

3 years agopass the correct 'end' pointer
Alan T. DeKok [Thu, 6 Jan 2022 00:07:39 +0000 (19:07 -0500)] 
pass the correct 'end' pointer

3 years agorename regex sub to subst
Alan T. DeKok [Wed, 5 Jan 2022 21:07:30 +0000 (16:07 -0500)] 
rename regex sub to subst

3 years agoCI fixes for FreeBSD (#4351)
Terry Burton [Wed, 5 Jan 2022 21:43:17 +0000 (21:43 +0000)] 
CI fixes for FreeBSD (#4351)

* CI FreeBSD: Reenable some tests

* CI: Temporary patch for hostapd build

Build currently fails on LLVM with FreeBSD.

* CI FreeBSD: Cache the eapol_test build

3 years agoQuiet compiler
Arran Cudbard-Bell [Wed, 5 Jan 2022 18:41:03 +0000 (12:41 -0600)] 
Quiet compiler

3 years agoDon't evaluate _uctx multiple times in fr_atexit_thread_local
Arran Cudbard-Bell [Wed, 5 Jan 2022 17:59:25 +0000 (11:59 -0600)] 
Don't evaluate _uctx multiple times in fr_atexit_thread_local

3 years agoFix libpcre memory leak on exit
Arran Cudbard-Bell [Wed, 5 Jan 2022 17:18:19 +0000 (11:18 -0600)] 
Fix libpcre memory leak on exit

3 years agopair_tests fr_pair_value_copy: Allocate dst pair before copying into it (#4350)
Terry Burton [Wed, 5 Jan 2022 16:26:20 +0000 (16:26 +0000)] 
pair_tests fr_pair_value_copy: Allocate dst pair before copying into it (#4350)

Otherwise the copy will attempt to clear uninitialised dst data.

3 years agoFormatting
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:54:36 +0000 (20:54 -0600)] 
Formatting

3 years agoHelps to use the right condition...
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:52:49 +0000 (20:52 -0600)] 
Helps to use the right condition...

3 years agoTypo
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:11:35 +0000 (20:11 -0600)] 
Typo

3 years agoMore, minor, atexit cleanups
Arran Cudbard-Bell [Wed, 5 Jan 2022 02:09:15 +0000 (20:09 -0600)] 
More, minor, atexit cleanups

3 years agoMove OpenSSL version handling code to its own source file
Arran Cudbard-Bell [Wed, 5 Jan 2022 01:58:55 +0000 (19:58 -0600)] 
Move OpenSSL version handling code to its own source file

3 years agoQuiet compiler warnings
Arran Cudbard-Bell [Tue, 4 Jan 2022 21:29:43 +0000 (15:29 -0600)] 
Quiet compiler warnings

fr_time_delta_t is a struct now...

3 years agoFlesh out the atexit debug functions more
Arran Cudbard-Bell [Tue, 4 Jan 2022 21:29:16 +0000 (15:29 -0600)] 
Flesh out the atexit debug functions more

3 years agoSearch in the correct destructor list
Arran Cudbard-Bell [Tue, 4 Jan 2022 20:45:11 +0000 (14:45 -0600)] 
Search in the correct destructor list

3 years agoUse the correct comparison function in fr_event_report
Arran Cudbard-Bell [Tue, 4 Jan 2022 20:44:54 +0000 (14:44 -0600)] 
Use the correct comparison function in fr_event_report

3 years agoFix other instances of backlogs left hanging (#4311)
James Jones [Tue, 4 Jan 2022 19:18:46 +0000 (13:18 -0600)] 
Fix other instances of backlogs left hanging (#4311)

3 years agoEnsure all the thread-specific destructors run before the global destructors
Arran Cudbard-Bell [Tue, 4 Jan 2022 19:15:43 +0000 (13:15 -0600)] 
Ensure all the thread-specific destructors run before the global destructors

Rework the OpenSSL cleanup logic

3 years agoJust use WITH_TLS....
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:14:18 +0000 (20:14 -0600)] 
Just use WITH_TLS....

3 years agoUse the EVP RC4 functions
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:10:30 +0000 (20:10 -0600)] 
Use the EVP RC4 functions

3 years agoEnsure openssl user macros are always defined
Arran Cudbard-Bell [Tue, 4 Jan 2022 02:08:55 +0000 (20:08 -0600)] 
Ensure openssl user macros are always defined

This causes deprecated functions to trigger fatal errors when building under macos

3 years agoinitialize packet_ctx.end
Alan T. DeKok [Tue, 4 Jan 2022 00:25:15 +0000 (19:25 -0500)] 
initialize packet_ctx.end