]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Fri, 1 Jul 2022 18:59:01 +0000 (13:59 -0500)]
Start adding common module methods
Alan T. DeKok [Fri, 8 Jul 2022 13:22:10 +0000 (09:22 -0400)]
fixes and tests for regexes
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 .
Alan T. DeKok [Thu, 7 Jul 2022 19:13:15 +0000 (15:13 -0400)]
added new RFCs
Nick Porter [Fri, 8 Jul 2022 09:23:47 +0000 (10:23 +0100)]
Update python version on FreeBSD CI
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
Alan T. DeKok [Thu, 7 Jul 2022 14:06:52 +0000 (10:06 -0400)]
resolve all tmpls which need resolving
Alan T. DeKok [Thu, 7 Jul 2022 14:05:58 +0000 (10:05 -0400)]
pass the current dictionary to xlat_resolve()
Alan T. DeKok [Wed, 6 Jul 2022 18:07:09 +0000 (14:07 -0400)]
don't leave shallow references to an sbuff
Alan T. DeKok [Wed, 6 Jul 2022 17:36:46 +0000 (13:36 -0400)]
let's commit this, too
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
Alan T. DeKok [Wed, 6 Jul 2022 15:40:40 +0000 (11:40 -0400)]
allow for 'ref=PROTOCOL' as a bare word
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.
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.
Alan T. DeKok [Wed, 6 Jul 2022 14:17:09 +0000 (10:17 -0400)]
test for manual encoding of TLVs
Alan T. DeKok [Tue, 5 Jul 2022 17:53:17 +0000 (13:53 -0400)]
typo
Alan T. DeKok [Tue, 5 Jul 2022 17:52:52 +0000 (13:52 -0400)]
more casting comments
Nick Porter [Wed, 6 Jul 2022 13:32:06 +0000 (14:32 +0100)]
Typo
Nick Porter [Wed, 6 Jul 2022 13:28:08 +0000 (14:28 +0100)]
Report correct type in error message
Nick Porter [Wed, 6 Jul 2022 09:49:40 +0000 (10:49 +0100)]
Align docs with function definition
Nick Porter [Wed, 6 Jul 2022 09:19:42 +0000 (10:19 +0100)]
remove UNUSED
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.
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
Alan T. DeKok [Tue, 5 Jul 2022 12:22:06 +0000 (08:22 -0400)]
more docs
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)
Nick Porter [Tue, 5 Jul 2022 07:38:02 +0000 (08:38 +0100)]
ctx is used
Nick Porter [Tue, 5 Jul 2022 07:22:12 +0000 (08:22 +0100)]
Remove un-needed variable
Alan T. DeKok [Mon, 4 Jul 2022 22:29:30 +0000 (18:29 -0400)]
remove unused variable
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.
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
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
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.
Alan T. DeKok [Mon, 4 Jul 2022 18:54:26 +0000 (14:54 -0400)]
resepct cast in tmpl_eval_pair_virtual(), too
github-actions[bot] [Sun, 3 Jul 2022 09:41:43 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:40 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:37 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:34 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:31 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:28 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:24 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sun, 3 Jul 2022 09:41:22 +0000 (09:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
Alan T. DeKok [Sat, 2 Jul 2022 20:06:33 +0000 (16:06 -0400)]
add const to quiet compiler
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
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
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
Alan T. DeKok [Sat, 2 Jul 2022 12:19:56 +0000 (08:19 -0400)]
zero-length strings are allowed to have NULL ptrs
Alan T. DeKok [Sat, 2 Jul 2022 01:52:40 +0000 (21:52 -0400)]
this doesn't need if-multivalue
Alan T. DeKok [Fri, 1 Jul 2022 14:13:36 +0000 (10:13 -0400)]
add "exists" xlat
Alan T. DeKok [Fri, 1 Jul 2022 13:26:43 +0000 (09:26 -0400)]
use consistent names
Alan T. DeKok [Fri, 1 Jul 2022 12:47:05 +0000 (08:47 -0400)]
update docs
Alan T. DeKok [Thu, 30 Jun 2022 12:37:24 +0000 (08:37 -0400)]
typo
Alan T. DeKok [Thu, 30 Jun 2022 12:29:25 +0000 (08:29 -0400)]
remove request_list from paircmp callbacks
Alan T. DeKok [Thu, 30 Jun 2022 11:47:17 +0000 (07:47 -0400)]
remove unused field
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
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:47:41 +0000 (09:47 -0500)]
Still need to call the right module instance
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:18:30 +0000 (09:18 -0500)]
attr filter just has a send method
Arran Cudbard-Bell [Fri, 1 Jul 2022 14:05:20 +0000 (09:05 -0500)]
Minor fixes
Arran Cudbard-Bell [Fri, 1 Jul 2022 13:44:54 +0000 (08:44 -0500)]
Section name comparisons are case insensitive
Arran Cudbard-Bell [Fri, 1 Jul 2022 02:01:55 +0000 (21:01 -0500)]
Typo
Arran Cudbard-Bell [Thu, 30 Jun 2022 21:58:34 +0000 (16:58 -0500)]
Add hack to make test.authorize work again
Arran Cudbard-Bell [Thu, 30 Jun 2022 20:59:25 +0000 (15:59 -0500)]
Simple function for matching name1/name2 to a section name
Arran Cudbard-Bell [Thu, 30 Jun 2022 20:46:33 +0000 (15:46 -0500)]
s/module_method_names_t/module_method_name_t/
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
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.
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.
Alan T. DeKok [Wed, 29 Jun 2022 20:40:28 +0000 (16:40 -0400)]
there's no Tmp-Bool-0
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.
Alan T. DeKok [Wed, 29 Jun 2022 13:20:48 +0000 (09:20 -0400)]
added tmpl_eval()
which only does asynchronous tmpls
Alan T. DeKok [Wed, 29 Jun 2022 14:02:50 +0000 (10:02 -0400)]
respect casts for results of exec, too
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.
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.
Arran Cudbard-Bell [Wed, 29 Jun 2022 18:59:52 +0000 (13:59 -0500)]
Don't ignore .vscode
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
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_").
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:46:21 +0000 (11:46 -0500)]
Fix comments in Makefile
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:43:16 +0000 (11:43 -0500)]
Yet more broken expansions
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:30:05 +0000 (11:30 -0500)]
Fix extension
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:21:00 +0000 (11:21 -0500)]
Check dollar expansions work for non-strings
Arran Cudbard-Bell [Wed, 29 Jun 2022 16:08:47 +0000 (11:08 -0500)]
Add basic tests for dollar expansions in conditions
James Jones [Wed, 29 Jun 2022 15:14:43 +0000 (10:14 -0500)]
More MEM() checks (#4591)
This affects the following CIDs:
1503978 ,
1504031 ,
1504047
Arran Cudbard-Bell [Wed, 29 Jun 2022 15:14:06 +0000 (10:14 -0500)]
Missed rpm
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
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:56:40 +0000 (09:56 -0500)]
Exit gracefully from unit_test_attribute
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:56:24 +0000 (09:56 -0500)]
Typo
Arran Cudbard-Bell [Wed, 29 Jun 2022 14:28:44 +0000 (09:28 -0500)]
Typo
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
Arran Cudbard-Bell [Tue, 28 Jun 2022 18:40:45 +0000 (13:40 -0500)]
Rework the atexit code to function without pthreads
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
Arran Cudbard-Bell [Tue, 28 Jun 2022 15:08:12 +0000 (10:08 -0500)]
Fix building libfreeradius-util under emscripten
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
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:26:41 +0000 (18:26 -0500)]
Base vscode project settings everyone should be using
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:25:03 +0000 (18:25 -0500)]
Basic clangd config to suppress the most stupid warnings
Arran Cudbard-Bell [Mon, 27 Jun 2022 23:21:14 +0000 (18:21 -0500)]
Various fixes for jlibtool
Arran Cudbard-Bell [Mon, 27 Jun 2022 21:35:12 +0000 (16:35 -0500)]
Missing includes in rlm_mschap.h
Arran Cudbard-Bell [Mon, 27 Jun 2022 21:34:51 +0000 (16:34 -0500)]
Fix additional legitimate bugs and style issues in jlibtool
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:42:44 +0000 (15:42 -0500)]
Fix legitimate bug found by clangd
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:42:29 +0000 (15:42 -0500)]
Quiet clangd's linter
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:20:49 +0000 (15:20 -0500)]
Emit compile receipts when building source files
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:17:36 +0000 (15:17 -0500)]
Add phony target for compile commands
Arran Cudbard-Bell [Mon, 27 Jun 2022 20:16:26 +0000 (15:16 -0500)]
Ignore compile commands (it's system specific)