]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Mon, 8 Aug 2022 14:07:45 +0000 (10:07 -0400)]
ensure that the list && list_def are set correctly
so that when we look at them later, they're consistent with
the attribute references in the tmpl
Alan T. DeKok [Sun, 7 Aug 2022 18:34:53 +0000 (14:34 -0400)]
more "convert to edit"
Alan T. DeKok [Sun, 7 Aug 2022 18:34:30 +0000 (14:34 -0400)]
typos
Alan T. DeKok [Sun, 7 Aug 2022 18:10:53 +0000 (14:10 -0400)]
use outstanding as per #4654
future work is a better predictor of load than past work.
If two workers have the same number of outstanding packets, then
choose one with less CPU time
Alan T. DeKok [Sat, 6 Aug 2022 14:59:52 +0000 (10:59 -0400)]
update cpu_time as noted in #4654
Nick Porter [Mon, 8 Aug 2022 16:50:20 +0000 (17:50 +0100)]
Replace v3.0 with v3.2 in docs where appropriate
Nick Porter [Mon, 8 Aug 2022 09:49:13 +0000 (10:49 +0100)]
Correct spelling of tmpl_dcursor_clear
James Jones [Sat, 6 Aug 2022 15:20:45 +0000 (10:20 -0500)]
Annotate false positives of using uninitalized variables (CIDs below) (#4653)
CIDs: #
1503917 , #
1503948 , #
1503959 , #
1503989
After the smoke clears, it turns out that (a == &one) is true
iff one was initialized and (b == &two) is true iff two was
initialized, so they're passed to fr_value_box_clear_value()
iff it makes sense.
Alan T. DeKok [Fri, 5 Aug 2022 15:04:27 +0000 (11:04 -0400)]
revert until we address ubsan issues
Alan T. DeKok [Fri, 5 Aug 2022 14:12:12 +0000 (10:12 -0400)]
more "convert to edit"
Alan T. DeKok [Fri, 5 Aug 2022 13:29:40 +0000 (09:29 -0400)]
auto-merge edits only if explicitely put into a group
Alan T. DeKok [Fri, 5 Aug 2022 13:11:52 +0000 (09:11 -0400)]
don't allow "foo.bar = baz" to become a subsection in attr definition
Alan T. DeKok [Fri, 5 Aug 2022 13:04:38 +0000 (09:04 -0400)]
better errors
foo.bar = baz
results in the config file parser creating
foo {
bar = baz
}
We should likely forbid that in the parser. But for now, a better
error here is useful
Alan T. DeKok [Thu, 4 Aug 2022 22:55:05 +0000 (18:55 -0400)]
more "convert to edit"
Alan T. DeKok [Thu, 4 Aug 2022 22:46:02 +0000 (18:46 -0400)]
these don't need to be run every time
Alan T. DeKok [Thu, 4 Aug 2022 20:19:16 +0000 (16:19 -0400)]
more "convert to use new edits"
including removing more %{expr:...}, and just using in-place
additions for load-balance.
Alan T. DeKok [Tue, 2 Aug 2022 13:24:33 +0000 (09:24 -0400)]
use tmpl_dcursors to remove attributes from a list.
For now the entire RHS has to be specified in full, despite other
attempts to fix it.
Alan T. DeKok [Tue, 2 Aug 2022 13:23:12 +0000 (09:23 -0400)]
allow for NULL RHS rules when parsing CONF_PAIR
in which case it tries to figure out the context of the RHS
from the LHS. Since the caller has no idea what the LHS is, the
caller can't set the correct context.
This functionality is needed for things like TLVs and structs,
where the RHS must be contained within the LHS.
Alan T. DeKok [Mon, 1 Aug 2022 12:03:34 +0000 (08:03 -0400)]
deprecate filter documentation
Alan T. DeKok [Mon, 1 Aug 2022 12:03:18 +0000 (08:03 -0400)]
note operators for removing attributes from a list
Alan T. DeKok [Mon, 1 Aug 2022 11:03:33 +0000 (07:03 -0400)]
remove all matching attributes.
Which takes more time, but...
James Jones [Thu, 4 Aug 2022 15:44:52 +0000 (10:44 -0500)]
Annotate false positive alloc_strlen issues (CIDs listed below) (#4648)
1503922 ,
1503986
Honest, you don't want the NUL terminator in the
FILE open_buffer_as_file() (or more accurately,
fmemopen()) creates.
1503983
curl_escape() call; if you pass 0 for length, the
function itself will call strlen() to determine length.
Nick Porter [Tue, 2 Aug 2022 15:18:25 +0000 (16:18 +0100)]
Ensure tmpl cursor is cleared on failure
Nick Porter [Thu, 4 Aug 2022 09:44:48 +0000 (10:44 +0100)]
Free tmpl_dcursor children in the correct order
Nick Porter [Wed, 3 Aug 2022 18:25:53 +0000 (19:25 +0100)]
Add tests for tmpl_dcursors
Nick Porter [Wed, 3 Aug 2022 18:24:57 +0000 (19:24 +0100)]
Add deeper nested attributes to test dictionary
James Jones [Wed, 3 Aug 2022 13:46:51 +0000 (08:46 -0500)]
Placate coverity by checking for a null pointer (CID #
1504605 ) (#4644)
James Jones [Wed, 3 Aug 2022 13:46:14 +0000 (08:46 -0500)]
Annotate dead code false positive (CID #
1504072 ) (#4646)
Coverity doesn't see that a successful call to fr_base16_decode()
in fr_ldap_util_normalise_dn(), c will be set. Unfortunately, it
appears that each of the ten cases of the switch statement
checking for an escape sequence (other than \\) would then require
annotation.
We therefore use an array of bool const so the check for a valid
escape sequence happens in one line, needing only one annotation.
(Having done this, one might as well use it in fr_ldap_util_is_dn(),
and that is indeed done.)
James Jones [Wed, 3 Aug 2022 13:44:45 +0000 (08:44 -0500)]
Correct position and spelling of annotation (CID #
1504462 ) (#4647)
James Jones [Wed, 3 Aug 2022 13:44:14 +0000 (08:44 -0500)]
Annotate false positive in fr_dbuff_init() (CIDs listed below) (#4643)
The end pointer is set to point just past the space given to it.
This is legal in C, and is only compared with, not dereferenced.
CIDs affected:
1503895 ,
1503905 ,
1503907 ,
1503914 ,
1503915 ,
1503924 ,
1503956 ,
1503970 ,
1503973 ,
1503979 ,
1503980 ,
1503988 ,
1504000 ,
1504034 ,
1504035 ,
1504039 ,
1504040 ,
1504046 ,
1504059
James Jones [Wed, 3 Aug 2022 13:43:58 +0000 (08:43 -0500)]
Annotate false positive in fr_dict_attr_verify() (CID #
1504052 ) (#4642)
The preceding fr_assert_msg() should keep attributes without
namespaces from reaching the dict_attr_namespace() call, so it
should never return NULL... but coverity doesn't know that.
James Jones [Wed, 3 Aug 2022 13:43:44 +0000 (08:43 -0500)]
Annotate false positive reverse negative (CID #720487) (#4641)
coverity flags the check whether there are commands to run
with the comment "You might be using variable num_commands
before verifying that it is >=0."
James Jones [Wed, 3 Aug 2022 13:43:20 +0000 (08:43 -0500)]
Correct connection_deferred_signal_process() annotation (CID #
1469149 ) (#4640)
James Jones [Wed, 3 Aug 2022 13:42:58 +0000 (08:42 -0500)]
Correct annotation typo in SBUFF_PARSE_FLOAT_DEF (CID #
1503942 ) (#4639)
James Jones [Wed, 3 Aug 2022 13:42:47 +0000 (08:42 -0500)]
missing_lock, not missing_unlock (CID #
1414431 ) (#4635)
Typo in coverity annotation. Unnecessary missing_lock annotations
have been removed.
James Jones [Wed, 3 Aug 2022 13:42:06 +0000 (08:42 -0500)]
Annotate false positive (CID #
1506689 ) (#4630)
fr_redis_tuple_from_map() does check for error return from
tmpl_print(), so by the time talloc_bstrndup() is called,
key_buf should be initialized.
github-actions[bot] [Wed, 3 Aug 2022 09:58:12 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Wed, 3 Aug 2022 09:58:10 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Wed, 3 Aug 2022 09:58:07 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Wed, 3 Aug 2022 09:58:03 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Wed, 3 Aug 2022 09:58:01 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Wed, 3 Aug 2022 09:57:57 +0000 (09:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Wed, 3 Aug 2022 09:57:55 +0000 (09:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Wed, 3 Aug 2022 09:57:51 +0000 (09:57 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
Arran Cudbard-Bell [Wed, 3 Aug 2022 04:53:20 +0000 (12:53 +0800)]
Start of relative dcusor init
Arran Cudbard-Bell [Wed, 3 Aug 2022 04:44:13 +0000 (12:44 +0800)]
Simplify tmpl dcursor init by just using VPs
Alan T. DeKok [Sun, 31 Jul 2022 11:52:24 +0000 (07:52 -0400)]
shut up analyzer
Alan T. DeKok [Sun, 31 Jul 2022 01:17:36 +0000 (21:17 -0400)]
use comparison operators for RHS list of &request -= { ... }
Alan T. DeKok [Sun, 31 Jul 2022 01:11:26 +0000 (21:11 -0400)]
for RHS temporary attributes, just update the value-box in the VP
Alan T. DeKok [Sat, 30 Jul 2022 17:38:52 +0000 (13:38 -0400)]
allow comparison operators for removal from list
Alan T. DeKok [Sat, 30 Jul 2022 14:15:57 +0000 (10:15 -0400)]
set parent map where possible
Alan T. DeKok [Sat, 30 Jul 2022 12:51:36 +0000 (08:51 -0400)]
clean up markup
Alan T. DeKok [Sat, 30 Jul 2022 12:47:37 +0000 (08:47 -0400)]
correct docs for RHS list
Alan T. DeKok [Fri, 29 Jul 2022 18:18:33 +0000 (14:18 -0400)]
allow removing from list by attribute and value.
With documentation and tests.
Alan T. DeKok [Fri, 29 Jul 2022 16:30:52 +0000 (12:30 -0400)]
allow edits to be grouped in a transaction via group { ... }
Alan T. DeKok [Fri, 29 Jul 2022 16:15:06 +0000 (12:15 -0400)]
ensure that list is empty before merge / union / etc.
Those operations sort their inputs *without* tracking those changes
in the edit list. So if there are already edits in the list, the
sort will break the ability to undo things.
As a result, we forbid behavior which we know will result in wrong
outcomes.
Alan T. DeKok [Fri, 29 Jul 2022 14:52:59 +0000 (10:52 -0400)]
try to quiet clang scan
Alan T. DeKok [Fri, 29 Jul 2022 13:50:38 +0000 (09:50 -0400)]
remove --preprocess-first
Coverity doesn't like it
Alan T. DeKok [Fri, 29 Jul 2022 13:12:58 +0000 (09:12 -0400)]
fix list_eval to return current from the cursor
and not what was passed in. This mirrors the child_eval function.
And remove the next_peek from NUM_LAST, which was unnecessary
and was causing breakage
Alan T. DeKok [Fri, 29 Jul 2022 13:12:44 +0000 (09:12 -0400)]
separate out tests individually
Alan T. DeKok [Fri, 29 Jul 2022 13:11:19 +0000 (09:11 -0400)]
make it work with the new edit sections
and a "todo" because
&Tmp-String-1 = "%(concat:%{request[*]} ', ')"
ends up as a group:
"{bob, hello, ab c, de fg, 123}"
Alan T. DeKok [Fri, 29 Jul 2022 10:57:26 +0000 (06:57 -0400)]
print the offending filename and line number for error messages
Alan T. DeKok [Fri, 29 Jul 2022 10:49:32 +0000 (06:49 -0400)]
allocate temporary VPs in the current context
and talloc_steal() them when we're keeping them. This is so that
they will be automatically cleaned up on error.
Alan T. DeKok [Fri, 29 Jul 2022 10:42:24 +0000 (06:42 -0400)]
zero out more fields.
Alan T. DeKok [Thu, 28 Jul 2022 22:44:43 +0000 (18:44 -0400)]
more fixes and updates
Alan T. DeKok [Thu, 28 Jul 2022 22:43:54 +0000 (18:43 -0400)]
use new syntax and checks
&Foo = ... fail
doesn't get
&Foo == ""
it just doesn't create &Foo
Alan T. DeKok [Thu, 28 Jul 2022 17:26:53 +0000 (13:26 -0400)]
use new edit syntax with correct operator
Alan T. DeKok [Thu, 28 Jul 2022 14:46:20 +0000 (10:46 -0400)]
0 isn't an error
and we might as well print a meaningful error, too
Alan T. DeKok [Thu, 28 Jul 2022 14:48:54 +0000 (10:48 -0400)]
don't bother checking operators here.
The fr_edit_list_apply_list_assignment() function will check it
anyways. Not checking it here means that we can later add new
operators without changing this code.
Alan T. DeKok [Thu, 28 Jul 2022 14:46:09 +0000 (10:46 -0400)]
print errors
Alan T. DeKok [Thu, 28 Jul 2022 15:11:56 +0000 (11:11 -0400)]
assignments which fail don't change the destination
and don't eat the Module-Failure-Message
Alan T. DeKok [Thu, 28 Jul 2022 14:56:20 +0000 (10:56 -0400)]
typos
Alan T. DeKok [Thu, 28 Jul 2022 14:00:17 +0000 (10:00 -0400)]
use correct operators
Alan T. DeKok [Thu, 28 Jul 2022 13:51:07 +0000 (09:51 -0400)]
commented-out code to use dcursors for list removal
We'd like to do:
&reply -= &Reply-Message
except that means changing the default list context of the RHS
from "request" to "reply" (i.e. the LHS list)
And it means NUM_ANY is really an equivalent for NUM_ALL.
Using dcursors means we have to instead do:
&reply -= &reply.Reply-Message[*]
which is a bit surprising.
Alan T. DeKok [Thu, 28 Jul 2022 13:41:28 +0000 (09:41 -0400)]
whitespace
James Jones [Thu, 28 Jul 2022 15:04:06 +0000 (10:04 -0500)]
Put --preprocess-first where cov-build will see it, not make... (#4636)
Alan T. DeKok [Thu, 28 Jul 2022 01:18:52 +0000 (21:18 -0400)]
allow &Foo = { bar, baz, bag}
compile it, evaluate it, and add a test for it.
Alan T. DeKok [Thu, 28 Jul 2022 01:17:54 +0000 (21:17 -0400)]
add map_list_afrom_cs()
which parses
&Foo = { bar, baz, bag }
Alan T. DeKok [Wed, 27 Jul 2022 19:17:22 +0000 (15:17 -0400)]
add fr_edit_list_pair_delete_by_da()
which mirrors fr_pair_delete_by_da()
Alan T. DeKok [Wed, 27 Jul 2022 18:07:16 +0000 (14:07 -0400)]
just resolve entire LHS if required
Alan T. DeKok [Wed, 27 Jul 2022 15:22:03 +0000 (11:22 -0400)]
quiet compiler
Alan T. DeKok [Wed, 27 Jul 2022 15:07:28 +0000 (11:07 -0400)]
no need to check for "update" at every level
Alan T. DeKok [Wed, 27 Jul 2022 15:07:02 +0000 (11:07 -0400)]
fix typo
Alan T. DeKok [Wed, 27 Jul 2022 14:36:23 +0000 (10:36 -0400)]
just use TALLOC_FREE, which sets it to NULL
don't check if it's NULL before calling talloc_free(), that
function can take NULLs.
don't assign NULL to the variable just before exiting the function.
It does nothing
Alan T. DeKok [Wed, 27 Jul 2022 12:52:05 +0000 (08:52 -0400)]
more "update -> edit"
Alan T. DeKok [Wed, 27 Jul 2022 12:51:37 +0000 (08:51 -0400)]
handle list_as_attr when resolving virtual attributes
Alan T. DeKok [Wed, 27 Jul 2022 12:36:07 +0000 (08:36 -0400)]
no need to resolve anything here.
Alan T. DeKok [Tue, 26 Jul 2022 13:39:27 +0000 (09:39 -0400)]
just track "state", and not the individual vp
there's no need to add / update the vp via request_data_add()
on every iteration through the loop
Alan T. DeKok [Tue, 26 Jul 2022 13:30:56 +0000 (09:30 -0400)]
use more consistent names
Alan T. DeKok [Tue, 26 Jul 2022 13:17:04 +0000 (09:17 -0400)]
remove unused header
Alan T. DeKok [Mon, 25 Jul 2022 19:58:47 +0000 (15:58 -0400)]
return FAIL on fail, not YIELD
Max Khon [Wed, 27 Jul 2022 14:34:45 +0000 (17:34 +0300)]
map_afrom_cp: unescape double-quoted and back-quoted RHS prior to parsing it (#4607)
Nick Porter [Wed, 27 Jul 2022 14:24:16 +0000 (15:24 +0100)]
Simplify tmpl_cursors by using a dcursor at all nested levels (#4634)
Nick Porter [Wed, 27 Jul 2022 11:08:52 +0000 (12:08 +0100)]
Update platform for FreeBSD tests
Arran Cudbard-Bell [Wed, 27 Jul 2022 10:15:19 +0000 (18:15 +0800)]
Treq is no longer our problem
Max Khon [Wed, 27 Jul 2022 09:17:32 +0000 (12:17 +0300)]
1) fr_ldap_trunk_search(): prevent fr_trunk_request_signal_cancel() from (#4628)
being called twice (from _ldap_search_sync_timeout() and ldap_trunk_query_cancel())
2) fr_trunk_request_enter_cancel_complete(): allow FR_TRUNK_REQUEST_STATE_CANCEL
Arran Cudbard-Bell [Wed, 27 Jul 2022 09:11:30 +0000 (17:11 +0800)]
This is dealt with by trunk_request_remove_from_conn
Arran Cudbard-Bell [Wed, 27 Jul 2022 09:07:41 +0000 (17:07 +0800)]
Because NUM_ANY confuses everyone
James Jones [Wed, 27 Jul 2022 08:19:51 +0000 (03:19 -0500)]
Try to make coverity see annotations in SBUFF_PARSE_*INT_DEF() (#4631)
I asked whether coverity sees annotations in invocations of
macro definitions containing annotations, and got the suggestion
to add the "--preprocess-first" option to the cov-build command,
and if it made no difference, submit a support case with more info.
arnout [Wed, 27 Jul 2022 08:19:24 +0000 (10:19 +0200)]
Cross compile fixes (#4632)
* configure.ac: add option for libcap
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: David Gouarin <david.gouarin@thalesgroup.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configure.ac: allow cross-compilation
The checking OpenSSL library and header version consistency will
always fail in cross compiling, skip the check and give a warning
instead for cross compiling.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
[update to new version 3.0.17 to fix patch warning]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: David Gouarin <david.gouarin@thalesgroup.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configure.ac: add option for pcap
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configure.ac: add option for collectdclient
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* configure.ac: try execinfo in libc before searching libexecinfo
execinfo is provided by glibc, so the usual case is that it is part of
libc. Do this before starting a redundant search for libexecinfo.
This is especially relevant for cross-compilation, where
FR_SMART_CHECK_LIB can find an incompatible library.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Co-authored-by: Changqing Li <changqing.li@windriver.com>