]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoStart adding common module methods
Arran Cudbard-Bell [Fri, 1 Jul 2022 18:59:01 +0000 (13:59 -0500)] 
Start adding common module methods

3 years agofixes and tests for regexes
Alan T. DeKok [Fri, 8 Jul 2022 13:22:10 +0000 (09:22 -0400)] 
fixes and tests for regexes

3 years agoRevert "zero-length strings are allowed to have NULL ptrs"
Alan T. DeKok [Fri, 8 Jul 2022 13:02:52 +0000 (09:02 -0400)] 
Revert "zero-length strings are allowed to have NULL ptrs"

This reverts commit a49569534534c33bc0dad3505f012767dd241b85.

3 years agoadded new RFCs
Alan T. DeKok [Thu, 7 Jul 2022 19:13:15 +0000 (15:13 -0400)] 
added new RFCs

3 years agoUpdate python version on FreeBSD CI
Nick Porter [Fri, 8 Jul 2022 09:23:47 +0000 (10:23 +0100)] 
Update python version on FreeBSD CI

3 years agocall xlat_init() manually, before registering any xlats
Alan T. DeKok [Thu, 7 Jul 2022 14:59:56 +0000 (10:59 -0400)] 
call xlat_init() manually, before registering any xlats

so that we don't need to check xlat_root every time we try to
register an xlat

3 years agoresolve all tmpls which need resolving
Alan T. DeKok [Thu, 7 Jul 2022 14:06:52 +0000 (10:06 -0400)] 
resolve all tmpls which need resolving

3 years agopass the current dictionary to xlat_resolve()
Alan T. DeKok [Thu, 7 Jul 2022 14:05:58 +0000 (10:05 -0400)] 
pass the current dictionary to xlat_resolve()

3 years agodon't leave shallow references to an sbuff
Alan T. DeKok [Wed, 6 Jul 2022 18:07:09 +0000 (14:07 -0400)] 
don't leave shallow references to an sbuff

3 years agolet's commit this, too
Alan T. DeKok [Wed, 6 Jul 2022 17:36:46 +0000 (13:36 -0400)] 
let's commit this, too

3 years agoallow for encoding of other protocols inside of the internal dict
Alan T. DeKok [Wed, 6 Jul 2022 16:46:17 +0000 (12:46 -0400)] 
allow for encoding of other protocols inside of the internal dict

we can't just drop the other protocols into a packet along side
internal attributes, because we can't distinguish the internal
attribute "1" from the protocol number "1".

We therefore need an encapsulation layer.

The internal encoder / decoder still needs to be updated to handle
Protocol-Encapsulation as a special-case, ala Message-Authenticator

3 years agoallow for 'ref=PROTOCOL' as a bare word
Alan T. DeKok [Wed, 6 Jul 2022 15:40:40 +0000 (11:40 -0400)] 
allow for 'ref=PROTOCOL' as a bare word

3 years agoalways assign t_rules. Fixes #4594
Alan T. DeKok [Wed, 6 Jul 2022 14:50:26 +0000 (10:50 -0400)] 
always assign t_rules.  Fixes #4594

t_rules is checked for NULL, but it later always dereferenced.
So just assign it to default_rules.

3 years agoadd cf_item_free_children()
Alan T. DeKok [Wed, 6 Jul 2022 14:20:28 +0000 (10:20 -0400)] 
add cf_item_free_children()

for use with if (0) { ... }, so that unused xlats can be freed.
Otherwise they're stuck in the instantiation tree, and will cause
issues.

3 years agotest for manual encoding of TLVs
Alan T. DeKok [Wed, 6 Jul 2022 14:17:09 +0000 (10:17 -0400)] 
test for manual encoding of TLVs

3 years agotypo
Alan T. DeKok [Tue, 5 Jul 2022 17:53:17 +0000 (13:53 -0400)] 
typo

3 years agomore casting comments
Alan T. DeKok [Tue, 5 Jul 2022 17:52:52 +0000 (13:52 -0400)] 
more casting comments

3 years agoTypo
Nick Porter [Wed, 6 Jul 2022 13:32:06 +0000 (14:32 +0100)] 
Typo

3 years agoReport correct type in error message
Nick Porter [Wed, 6 Jul 2022 13:28:08 +0000 (14:28 +0100)] 
Report correct type in error message

3 years agoAlign docs with function definition
Nick Porter [Wed, 6 Jul 2022 09:49:40 +0000 (10:49 +0100)] 
Align docs with function definition

3 years agoremove UNUSED
Nick Porter [Wed, 6 Jul 2022 09:19:42 +0000 (10:19 +0100)] 
remove UNUSED

3 years agoRevert "map_afrom_cp: unescape double-quoted and back-quoted RHS prior to parsing...
Alan T. DeKok [Tue, 5 Jul 2022 17:43:12 +0000 (13:43 -0400)] 
Revert "map_afrom_cp: unescape double-quoted and back-quoted RHS prior to parsing it (#4590)"

This reverts commit db35ae505b78437f1a726f0635cf6ef7a0d16ce3.

this breaks many unit tests.  We will need a better fix.

3 years agoupdate casting rules
Alan T. DeKok [Tue, 5 Jul 2022 17:25:38 +0000 (13:25 -0400)] 
update casting rules

(string)&Foo now means "print to string".  This change only affects
'octets' types, as other types were already printed to a string

3 years agomore docs
Alan T. DeKok [Tue, 5 Jul 2022 12:22:06 +0000 (08:22 -0400)] 
more docs

3 years agomap_afrom_cp: unescape double-quoted and back-quoted RHS prior to parsing it (#4590)
Max Khon [Tue, 5 Jul 2022 13:34:28 +0000 (16:34 +0300)] 
map_afrom_cp: unescape double-quoted and back-quoted RHS prior to parsing it (#4590)

3 years agoctx is used
Nick Porter [Tue, 5 Jul 2022 07:38:02 +0000 (08:38 +0100)] 
ctx is used

3 years agoRemove un-needed variable
Nick Porter [Tue, 5 Jul 2022 07:22:12 +0000 (08:22 +0100)] 
Remove un-needed variable

3 years agoremove unused variable
Alan T. DeKok [Mon, 4 Jul 2022 22:29:30 +0000 (18:29 -0400)] 
remove unused variable

3 years agouse print xlat for double-quoted strings
Alan T. DeKok [Mon, 4 Jul 2022 22:03:39 +0000 (18:03 -0400)] 
use print xlat for double-quoted strings

"foo%{Bar}"

produces "foo" plus the *printable* version of &Bar

"foo" + (string) &Bar

produces "foo" pluse &Bar *cast* to a string.

Both are useful.

3 years agoadd "print" xlat, which produces a printable string
Alan T. DeKok [Mon, 4 Jul 2022 22:03:09 +0000 (18:03 -0400)] 
add "print" xlat, which produces a printable string

using double-escaping rules when we have tainted inputs

3 years agoquote data type, to be clear that it's a data type
Alan T. DeKok [Mon, 4 Jul 2022 22:02:14 +0000 (18:02 -0400)] 
quote data type, to be clear that it's a data type

3 years agoalways escape 'octets' in fr_value_box_print()
Alan T. DeKok [Mon, 4 Jul 2022 18:59:25 +0000 (14:59 -0400)] 
always escape 'octets' in fr_value_box_print()

fr_value_box_list_aprint() calls fr_value_box_print() to print
normal types.  And fr_value_box_print() prints 'octets' as hex
base16.

However, fr_value_box_list_aprint() calls
fr_value_box_list_concat_as_string() for 'group' types, and
that function just copies 'octets' to the output string.  Which
results in non-grouped 'octets' being printed as hex, and grouped
'octets' bring printed as binary.

the solution is to update fr_value_box_print() to enforce hex/octets
printing of 'octets'

At the same time, update the escaping logic so that if the octets
string is tainted, OR there are escaping rules, we just escape
the raw octets value.  The previous code printed it as hex, and
then escaped that, which doesn't make much sense.

3 years agoresepct cast in tmpl_eval_pair_virtual(), too
Alan T. DeKok [Mon, 4 Jul 2022 18:54:26 +0000 (14:54 -0400)] 
resepct cast in tmpl_eval_pair_virtual(), too

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:43 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

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

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:37 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:34 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:31 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:28 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:24 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:22 +0000 (09:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoadd const to quiet compiler
Alan T. DeKok [Sat, 2 Jul 2022 20:06:33 +0000 (16:06 -0400)] 
add const to quiet compiler

3 years agoallocate and use an "exists" node where necessary
Alan T. DeKok [Fri, 1 Jul 2022 21:07:16 +0000 (17:07 -0400)] 
allocate and use an "exists" node where necessary

which means we can now have a xlat_tokenize_condition() which works,
and the previous "check for attr" hacks in || and && can be removed

3 years agocheck correct field.
Alan T. DeKok [Sat, 2 Jul 2022 14:40:01 +0000 (10:40 -0400)] 
check correct field.

if there's no dict_def in vpt, then we load it from the tr rules

3 years agofix parsing of &Outer-Realm-Name, with terminating characters
Alan T. DeKok [Sat, 2 Jul 2022 12:20:47 +0000 (08:20 -0400)] 
fix parsing of &Outer-Realm-Name, with terminating characters

It should not be

&Outer - Realm-Name

even if "-" is a terminating character.

The correct answer is "don't have ambiguous grammars", but it's
very difficult to fix that now

3 years agozero-length strings are allowed to have NULL ptrs
Alan T. DeKok [Sat, 2 Jul 2022 12:19:56 +0000 (08:19 -0400)] 
zero-length strings are allowed to have NULL ptrs

3 years agothis doesn't need if-multivalue
Alan T. DeKok [Sat, 2 Jul 2022 01:52:40 +0000 (21:52 -0400)] 
this doesn't need if-multivalue

3 years agoadd "exists" xlat
Alan T. DeKok [Fri, 1 Jul 2022 14:13:36 +0000 (10:13 -0400)] 
add "exists" xlat

3 years agouse consistent names
Alan T. DeKok [Fri, 1 Jul 2022 13:26:43 +0000 (09:26 -0400)] 
use consistent names

3 years agoupdate docs
Alan T. DeKok [Fri, 1 Jul 2022 12:47:05 +0000 (08:47 -0400)] 
update docs

3 years agotypo
Alan T. DeKok [Thu, 30 Jun 2022 12:37:24 +0000 (08:37 -0400)] 
typo

3 years agoremove request_list from paircmp callbacks
Alan T. DeKok [Thu, 30 Jun 2022 12:29:25 +0000 (08:29 -0400)] 
remove request_list from paircmp callbacks

3 years agoremove unused field
Alan T. DeKok [Thu, 30 Jun 2022 11:47:17 +0000 (07:47 -0400)] 
remove unused field

3 years agowe don't need \ at EOL
Alan T. DeKok [Thu, 30 Jun 2022 11:46:11 +0000 (07:46 -0400)] 
we don't need \ at EOL

this should arguably be an error

3 years agoStill need to call the right module instance
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:47:41 +0000 (09:47 -0500)] 
Still need to call the right module instance

3 years agoattr filter just has a send method
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:18:30 +0000 (09:18 -0500)] 
attr filter just has a send method

3 years agoMinor fixes
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:05:20 +0000 (09:05 -0500)] 
Minor fixes

3 years agoSection name comparisons are case insensitive
Arran Cudbard-Bell [Fri, 1 Jul 2022 13:44:54 +0000 (08:44 -0500)] 
Section name comparisons are case insensitive

3 years agoTypo
Arran Cudbard-Bell [Fri, 1 Jul 2022 02:01:55 +0000 (21:01 -0500)] 
Typo

3 years agoAdd hack to make test.authorize work again
Arran Cudbard-Bell [Thu, 30 Jun 2022 21:58:34 +0000 (16:58 -0500)] 
Add hack to make test.authorize work again

3 years agoSimple function for matching name1/name2 to a section name
Arran Cudbard-Bell [Thu, 30 Jun 2022 20:59:25 +0000 (15:59 -0500)] 
Simple function for matching name1/name2 to a section name

3 years agos/module_method_names_t/module_method_name_t/
Arran Cudbard-Bell [Thu, 30 Jun 2022 20:46:33 +0000 (15:46 -0500)] 
s/module_method_names_t/module_method_name_t/

3 years agoRemove component based module methods
Arran Cudbard-Bell [Wed, 29 Jun 2022 21:57:14 +0000 (16:57 -0500)] 
Remove component based module methods

This moves us fully to the name based system of looking up modules

3 years agoDon't fclose() twice (CID #1506722) (#4593)
James Jones [Thu, 30 Jun 2022 19:00:14 +0000 (14:00 -0500)] 
Don't fclose() twice (CID #1506722) (#4593)

The globally-writable directory case goes to perm_error,
which fclose()s fp. No need to do it twice.

3 years agohorrible temporary hacks to parse conditions
Alan T. DeKok [Wed, 29 Jun 2022 21:22:57 +0000 (17:22 -0400)] 
horrible temporary hacks to parse conditions

once the config file stuff is moved to sbuffs, this can be deleted.

The root cause of this hack is to avoid having the xlat code call
cf_expand_variables().  The old condition code did that, which "worked"
but was arguably wrong.

Moving the cf_expand_variables() call to cf_file.c made it difficult
to parse multi-line "if" conditions.  So we necessitate this hack.

3 years agothere's no Tmp-Bool-0
Alan T. DeKok [Wed, 29 Jun 2022 20:40:28 +0000 (16:40 -0400)] 
there's no Tmp-Bool-0

3 years agoallow sync tmpls to be pushed, too
Alan T. DeKok [Wed, 29 Jun 2022 15:51:20 +0000 (11:51 -0400)] 
allow sync tmpls to be pushed, too

and remove 'inline_exec' flag, which was checked but never used.

3 years agoadded tmpl_eval()
Alan T. DeKok [Wed, 29 Jun 2022 13:20:48 +0000 (09:20 -0400)] 
added tmpl_eval()

which only does asynchronous tmpls

3 years agorespect casts for results of exec, too
Alan T. DeKok [Wed, 29 Jun 2022 14:02:50 +0000 (10:02 -0400)] 
respect casts for results of exec, too

3 years agomove eval cast code to tmpl_eval_cast
Alan T. DeKok [Wed, 29 Jun 2022 12:38:27 +0000 (08:38 -0400)] 
move eval cast code to tmpl_eval_cast

and call it from tmpl_eval_pair(), so that the caller doesn't have
to.

3 years agomove "eval pair" code from unlang to tmpl code
Alan T. DeKok [Tue, 28 Jun 2022 21:09:01 +0000 (17:09 -0400)] 
move "eval pair" code from unlang to tmpl code

This function is only for attributes which can be done
synchronously, i.e. without blocking.

3 years agoDon't ignore .vscode
Arran Cudbard-Bell [Wed, 29 Jun 2022 18:59:52 +0000 (13:59 -0500)] 
Don't ignore .vscode

3 years agoAdd a standard launch file for radiusd to allow easy testing in the build tree
Arran Cudbard-Bell [Wed, 29 Jun 2022 18:59:41 +0000 (13:59 -0500)] 
Add a standard launch file for radiusd to allow easy testing in the build tree

3 years agoAnnotate Coverity false positive of non-NUL-termination (CID #1469156) (#4592)
James Jones [Wed, 29 Jun 2022 16:58:23 +0000 (11:58 -0500)] 
Annotate Coverity false positive of non-NUL-termination (CID #1469156) (#4592)

def->name is built up with memcpy() calls that have the same
effect as sprintf(def->name, "HAVE_%s=1", symbol); The last
memcpy() makes a point of including the '\0' at the end of "=1"
and thus def->name is NUL-terminated, as is def->name + 5 (which
just skips the leading "HAVE_").

3 years agoFix comments in Makefile
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:46:21 +0000 (11:46 -0500)] 
Fix comments in Makefile

3 years agoYet more broken expansions
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:43:16 +0000 (11:43 -0500)] 
Yet more broken expansions

3 years agoFix extension
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:30:05 +0000 (11:30 -0500)] 
Fix extension

3 years agoCheck dollar expansions work for non-strings
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:21:00 +0000 (11:21 -0500)] 
Check dollar expansions work for non-strings

3 years agoAdd basic tests for dollar expansions in conditions
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:08:47 +0000 (11:08 -0500)] 
Add basic tests for dollar expansions in conditions

3 years agoMore MEM() checks (#4591)
James Jones [Wed, 29 Jun 2022 15:14:43 +0000 (10:14 -0500)] 
More MEM() checks (#4591)

This affects the following CIDs: 150397815040311504047

3 years agoMissed rpm
Arran Cudbard-Bell [Wed, 29 Jun 2022 15:14:06 +0000 (10:14 -0500)] 
Missed rpm

3 years agofr_atexit_thread_trigger_all is a noop when we're not building with threads
Arran Cudbard-Bell [Wed, 29 Jun 2022 15:08:41 +0000 (10:08 -0500)] 
fr_atexit_thread_trigger_all is a noop when we're not building with threads

3 years agoExit gracefully from unit_test_attribute
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:56:40 +0000 (09:56 -0500)] 
Exit gracefully from unit_test_attribute

3 years agoTypo
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:56:24 +0000 (09:56 -0500)] 
Typo

3 years agoTypo
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:28:44 +0000 (09:28 -0500)] 
Typo

3 years agoIndent things, and define variables correctly when we're not including Make.inc Close...
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:18:44 +0000 (09:18 -0500)] 
Indent things, and define variables correctly when we're not including Make.inc Closes #4587

3 years agoRework the atexit code to function without pthreads
Arran Cudbard-Bell [Tue, 28 Jun 2022 18:40:45 +0000 (13:40 -0500)] 
Rework the atexit code to function without pthreads

3 years agoEmit errors if stat fails, and use fstat not stat to avoid TOCTOU issues
Arran Cudbard-Bell [Tue, 28 Jun 2022 17:44:23 +0000 (12:44 -0500)] 
Emit errors if stat fails, and use fstat not stat to avoid TOCTOU issues

3 years agoFix building libfreeradius-util under emscripten
Arran Cudbard-Bell [Tue, 28 Jun 2022 15:08:12 +0000 (10:08 -0500)] 
Fix building libfreeradius-util under emscripten

3 years agoAdd the option to dlopen RTLD_DEFAULT for all module loading
Arran Cudbard-Bell [Tue, 28 Jun 2022 15:07:08 +0000 (10:07 -0500)] 
Add the option to dlopen RTLD_DEFAULT for all module loading

3 years agoBase vscode project settings everyone should be using
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:26:41 +0000 (18:26 -0500)] 
Base vscode project settings everyone should be using

3 years agoBasic clangd config to suppress the most stupid warnings
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:25:03 +0000 (18:25 -0500)] 
Basic clangd config to suppress the most stupid warnings

3 years agoVarious fixes for jlibtool
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:21:14 +0000 (18:21 -0500)] 
Various fixes for jlibtool

3 years agoMissing includes in rlm_mschap.h
Arran Cudbard-Bell [Mon, 27 Jun 2022 21:35:12 +0000 (16:35 -0500)] 
Missing includes in rlm_mschap.h

3 years agoFix additional legitimate bugs and style issues in jlibtool
Arran Cudbard-Bell [Mon, 27 Jun 2022 21:34:51 +0000 (16:34 -0500)] 
Fix additional legitimate bugs and style issues in jlibtool

3 years agoFix legitimate bug found by clangd
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:42:44 +0000 (15:42 -0500)] 
Fix legitimate bug found by clangd

3 years agoQuiet clangd's linter
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:42:29 +0000 (15:42 -0500)] 
Quiet clangd's linter

3 years agoEmit compile receipts when building source files
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:20:49 +0000 (15:20 -0500)] 
Emit compile receipts when building source files

3 years agoAdd phony target for compile commands
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:17:36 +0000 (15:17 -0500)] 
Add phony target for compile commands

3 years agoIgnore compile commands (it's system specific)
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:16:26 +0000 (15:16 -0500)] 
Ignore compile commands (it's system specific)