]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Nick Porter [Tue, 28 Mar 2023 11:19:04 +0000 (12:19 +0100)]
Add state to LDAP authorization ctx
To track progress through multiple async LDAP queries
Nick Porter [Wed, 21 Sep 2022 09:36:00 +0000 (10:36 +0100)]
Use async lookup of user DN in rlm_ldap mod_authorize
Nick Porter [Tue, 20 Sep 2022 16:47:20 +0000 (17:47 +0100)]
Use async user DN lookup in LDAP authentication
Nick Porter [Wed, 22 Mar 2023 18:54:25 +0000 (18:54 +0000)]
Module environment for rlm_ldap
Nick Porter [Wed, 15 Mar 2023 14:54:15 +0000 (14:54 +0000)]
Add macro for module env subsections
Nick Porter [Tue, 20 Sep 2022 16:38:23 +0000 (17:38 +0100)]
Move include - function.h will be needed by most LDAP source
Nick Porter [Tue, 20 Sep 2022 16:37:21 +0000 (17:37 +0100)]
Add rlm_ldap_find_user_async() and supporting functions
Nick Porter [Tue, 20 Sep 2022 16:35:43 +0000 (17:35 +0100)]
Add rlm_find_user_dn_cached()
Nick Porter [Wed, 29 Mar 2023 18:19:33 +0000 (19:19 +0100)]
Correct return of fr_ldap_trunk_search and fr_ldap_trunk_modify
It is the child function which yields (until everything becomes async at
which point this will get simplified)
Arran Cudbard-Bell [Tue, 4 Apr 2023 00:34:36 +0000 (18:34 -0600)]
slab: Style guide says alloc functions should return the newly allocated structure unless they have complex failure conditions which slabs don't
https://wiki.freeradius.org/contributing/coding-standards#return-types_pointer
Arran Cudbard-Bell [Mon, 3 Apr 2023 23:31:35 +0000 (17:31 -0600)]
jlibtool: Fix minor warnings
Arran Cudbard-Bell [Mon, 3 Apr 2023 23:09:00 +0000 (17:09 -0600)]
clangd: Ignore osmocom code in submodules
Arran Cudbard-Bell [Mon, 3 Apr 2023 22:40:09 +0000 (16:40 -0600)]
slab: Remove implicit fr_ prefix
Yes, the framework for creating slabs is in the util library, but the functions and types it produces may not be so should not have an implicit fr_ prefix.
Arran Cudbard-Bell [Mon, 3 Apr 2023 22:19:55 +0000 (16:19 -0600)]
cf_util: Add cf_log_perr_by_child
Arran Cudbard-Bell [Mon, 3 Apr 2023 22:19:23 +0000 (16:19 -0600)]
cf_util: Pass in copy of va_list not original va_list
Arran Cudbard-Bell [Mon, 3 Apr 2023 02:18:08 +0000 (20:18 -0600)]
rlm_exec: Various cleanups
Arran Cudbard-Bell [Mon, 3 Apr 2023 02:11:43 +0000 (20:11 -0600)]
Add CONF_PARSER snippet for slabs
Arran Cudbard-Bell [Mon, 3 Apr 2023 00:07:50 +0000 (18:07 -0600)]
Simplify and document conf parser macros
Alan T. DeKok [Mon, 3 Apr 2023 17:00:53 +0000 (13:00 -0400)]
update code and add tests to allow a group on the RHS of edits
Arran Cudbard-Bell [Sun, 2 Apr 2023 19:49:55 +0000 (13:49 -0600)]
exec: Fixup another config file
Arran Cudbard-Bell [Sun, 2 Apr 2023 19:10:23 +0000 (13:10 -0600)]
modules: Bubble up errors so the server will refuse to start if there's a module error
Decorate all the functions with "warn_unused_result" so this doesn't happen again.
Arran Cudbard-Bell [Sun, 2 Apr 2023 18:19:33 +0000 (12:19 -0600)]
exec: Use conf parser to deal with input and output tmpl parsing
James Jones [Fri, 31 Mar 2023 22:03:53 +0000 (17:03 -0500)]
Annotate intentional writes of const-qualified data (CID #
1508484 , #
1517674 ) (#4872)
Certain members of fr_value_box_t and hence of fr_pair_t have
const-qualified type, so pair_init_from_da() and fr_value_box_init(),
which modify some of those members, coverity points them out.
(UNCONST() placates the compiler, but not coverity.)
The coverity primitives that one might think would apply here,
__coverity_write_buffer_{bytes, elements}__(), are said to relate
mostly to checkers unrelated to writes to const-qualified fields,
so we annotate.
Arran Cudbard-Bell [Fri, 31 Mar 2023 22:02:35 +0000 (16:02 -0600)]
LGTM no longer used
Max Khon [Fri, 31 Mar 2023 21:03:27 +0000 (04:03 +0700)]
fr_sbuff_out_bstrncpy_until(): call fr_sbuff_extend_lowat() with proper sbuff (#4873)
Arran Cudbard-Bell [Thu, 30 Mar 2023 21:21:05 +0000 (15:21 -0600)]
Use correct attribute type
Arran Cudbard-Bell [Thu, 30 Mar 2023 20:43:31 +0000 (14:43 -0600)]
xlat: Always check registration rcode to keep coverity quiet
James Jones [Thu, 30 Mar 2023 15:52:16 +0000 (10:52 -0500)]
Remove what we believe to be unnecessary alloc_strlen annotations (#4949)
1. Either coverity has changed or pen_buffer_as_file() has,
because an essentially identical use of it isn't annotated
and doesn't register a defect, so the annotaion can go.
2. The curl_escape() call now just passes 0 and lets the
function itself call strlen(), so that annotation should
be unneccessary.
James Jones [Thu, 30 Mar 2023 14:53:05 +0000 (09:53 -0500)]
Add IGNORE() macro to let us avoid some identical branch annotations (#4948)
If the unused-return warning is set, gcc will complain even in the
presence of an explicit cast to void. This lets us avoid that warning
in an error handling case that would otherwise be written
if (cleanup() < 0) goto error;
goto error;
about which Coverity complains.
Alan T. DeKok [Tue, 28 Mar 2023 07:36:46 +0000 (16:36 +0900)]
clean up error messages for consistency
Arran Cudbard-Bell [Thu, 30 Mar 2023 03:31:06 +0000 (21:31 -0600)]
xlat: Move function setting overrides into xlat_func.c
Arran Cudbard-Bell [Thu, 30 Mar 2023 03:14:58 +0000 (21:14 -0600)]
xlat: Add an internal flag for marking xlats as internal
Arran Cudbard-Bell [Thu, 30 Mar 2023 00:31:45 +0000 (18:31 -0600)]
Fix setting xlat flags in redundant
Arran Cudbard-Bell [Thu, 30 Mar 2023 00:26:40 +0000 (18:26 -0600)]
Add sigmask to xlat/module/func signal handler registration
Arran Cudbard-Bell [Wed, 29 Mar 2023 23:20:28 +0000 (17:20 -0600)]
xlat: Rename xlat_register to xlat_func and give all functions a common prefix
Arran Cudbard-Bell [Wed, 29 Mar 2023 22:56:01 +0000 (16:56 -0600)]
redundant xlat: Move to a separate source file
Arran Cudbard-Bell [Wed, 29 Mar 2023 22:54:51 +0000 (16:54 -0600)]
vscode: Always insert a final newline
Arran Cudbard-Bell [Wed, 29 Mar 2023 22:44:10 +0000 (16:44 -0600)]
xlat: Move function registration code into its own source file
Arran Cudbard-Bell [Wed, 29 Mar 2023 22:43:02 +0000 (16:43 -0600)]
vscode: Always trim trailing whitespace
Arran Cudbard-Bell [Wed, 29 Mar 2023 18:25:58 +0000 (12:25 -0600)]
subrequests/synchronous interpreter: Use the detached done callback to free requests
Use unlang_interpret_signal to manage cleaning up detached requests instead of having custom code inside the subrequest code
Arran Cudbard-Bell [Wed, 29 Mar 2023 18:24:40 +0000 (12:24 -0600)]
request: When a request is detached it's no longer detachable...
Arran Cudbard-Bell [Wed, 29 Mar 2023 02:55:08 +0000 (20:55 -0600)]
subrequest: More verbose log messages on subrequest completion
Arran Cudbard-Bell [Wed, 29 Mar 2023 02:50:18 +0000 (20:50 -0600)]
subrequest: Detached subrequest sections should not return calculate the result of the section
What was happening previously was the current section rcode was being evaluated with the priorities of the subrequest section, and causing spurious failures.
Arran Cudbard-Bell [Tue, 28 Mar 2023 23:58:36 +0000 (17:58 -0600)]
xlat: Set func flags using a separate function as the majority of registrations don't have flags set
Jorge Pereira [Tue, 28 Mar 2023 22:42:45 +0000 (19:42 -0300)]
Don't leak memory on error conditions (#4947)
Arran Cudbard-Bell [Tue, 28 Mar 2023 20:46:49 +0000 (14:46 -0600)]
interpreter: Be more eplicit about which action gets used for what
Arran Cudbard-Bell [Tue, 28 Mar 2023 20:36:39 +0000 (14:36 -0600)]
Revert "tacacs: Move packet code check to before the main encoder?"
This reverts commit
93885589666b73e660d42d94bd5a330483f58914 .
Nick Porter [Tue, 28 Mar 2023 12:50:42 +0000 (13:50 +0100)]
docs: Document missing argument
Nick Porter [Tue, 28 Mar 2023 12:46:52 +0000 (13:46 +0100)]
Escape & for doxygen
Alan T. DeKok [Tue, 28 Mar 2023 07:36:46 +0000 (16:36 +0900)]
move disallow_qualifiers boolean to list_presence enum
Alan T. DeKok [Tue, 28 Mar 2023 05:01:42 +0000 (14:01 +0900)]
add enum to allow / forbid / require list references
because it makes no sense to do:
&reply += {
&request.User-Name = "foo"
}
Alan T. DeKok [Tue, 28 Mar 2023 00:49:21 +0000 (09:49 +0900)]
typos
Alan T. DeKok [Tue, 28 Mar 2023 00:48:12 +0000 (09:48 +0900)]
add BFD to PROTOCOLS list so that the fuzzer can run
Arran Cudbard-Bell [Tue, 28 Mar 2023 00:10:16 +0000 (18:10 -0600)]
Detach cancelled children from their parents
Arran Cudbard-Bell [Tue, 28 Mar 2023 00:06:55 +0000 (18:06 -0600)]
Fix various warnings
Arran Cudbard-Bell [Mon, 27 Mar 2023 23:16:45 +0000 (17:16 -0600)]
Fix counts
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:46:41 +0000 (00:46 -0400)]
fuzzer: Ignore extracted corpus files for BFD
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:45:25 +0000 (00:45 -0400)]
tacacs: Move regression tests into their own file
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:40:17 +0000 (00:40 -0400)]
tacacs: Move packet code check to before the main encoder?
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:37:56 +0000 (00:37 -0400)]
cancel: Add more complete tests
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:37:28 +0000 (00:37 -0400)]
Formatting
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:37:20 +0000 (00:37 -0400)]
subrequest: Resume the parent if the child is cancelled
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:36:56 +0000 (00:36 -0400)]
cancel: Insert dummy resume function to keep interpreter happy
Arran Cudbard-Bell [Sat, 18 Mar 2023 04:35:58 +0000 (00:35 -0400)]
synchronous interpreter: Decrement yielded count on stopped requests
James Jones [Mon, 27 Mar 2023 22:16:32 +0000 (17:16 -0500)]
First attempt at a state transition diagram for trunk requests (#4940)
Some of the functions cause two state transitions. Those are shown
with dashed-style edges, with a distinct color.
Matthew Newton [Thu, 23 Mar 2023 16:20:31 +0000 (16:20 +0000)]
CI: mirror more Docker images locally
Alan T. DeKok [Thu, 23 Mar 2023 20:35:43 +0000 (16:35 -0400)]
more magic
Alan T. DeKok [Thu, 23 Mar 2023 17:20:09 +0000 (13:20 -0400)]
$(Q) -> ${Q}
$(...) can be function calls in GNU Make.
${...} are always variable references
Matthew Newton [Thu, 23 Mar 2023 16:25:38 +0000 (16:25 +0000)]
CI: use local copies of Docker images
Matthew Newton [Thu, 23 Mar 2023 15:31:02 +0000 (15:31 +0000)]
CI: remove post-ci cleanup job
Alan T. DeKok [Thu, 23 Mar 2023 13:43:48 +0000 (09:43 -0400)]
check for "too small" earlier
so that we don't allocate VPs, try to decode them, and then discover
that it never would have worked.
Alan T. DeKok [Thu, 23 Mar 2023 13:43:25 +0000 (09:43 -0400)]
check for overflow when we add the length field
Alan T. DeKok [Wed, 22 Mar 2023 21:40:01 +0000 (17:40 -0400)]
0 return is "cannot decode", so we stop
Matthew Newton [Wed, 22 Mar 2023 19:25:28 +0000 (19:25 +0000)]
CI: gcc-11 has issues with the fuzzer
Alan T. DeKok [Wed, 22 Mar 2023 15:11:19 +0000 (11:11 -0400)]
add BFD fuzzer
Alan T. DeKok [Tue, 21 Mar 2023 20:36:11 +0000 (16:36 -0400)]
further simplifications
Matthew Newton [Tue, 21 Mar 2023 22:47:35 +0000 (22:47 +0000)]
CI: use local docker image for self-hosted runs
Matthew Newton [Tue, 21 Mar 2023 22:47:19 +0000 (22:47 +0000)]
CI: build local Docker images for CI runs
Alan T. DeKok [Tue, 21 Mar 2023 20:30:23 +0000 (16:30 -0400)]
just send the reply
Alan T. DeKok [Tue, 21 Mar 2023 20:28:49 +0000 (16:28 -0400)]
there's only one possibility here. CID #
1524493
Alan T. DeKok [Tue, 21 Mar 2023 20:12:35 +0000 (16:12 -0400)]
don't block forever if we fail to enqueue a packet
Alan T. DeKok [Tue, 21 Mar 2023 15:41:04 +0000 (11:41 -0400)]
DO_NOT_RESPOND is a valid reply packet type
Alan T. DeKok [Tue, 21 Mar 2023 15:39:20 +0000 (11:39 -0400)]
pass the correct context
Alan T. DeKok [Tue, 21 Mar 2023 15:25:45 +0000 (11:25 -0400)]
hoist useful error messages
Nick Porter [Tue, 21 Mar 2023 15:28:25 +0000 (15:28 +0000)]
v4: Switch rlm_smtp to slab allocated connection handles (#4926)
* Add CURL connection config to rlm_smtp
* Add slab to rlm_smtp_thead_t and initialise and free with thread
* Rename mod_authorize to mod_mail
mod_mail is the general purpose method to send an email - not
specifically tied to a given processing section.
* Add config options to specify credentials for sending emails
* Use CURL handles from slab allocator rather than one off allocated
* Move setting of consistent CURL options to element initialiser
* Merge the two resume callbacks - they have identical functionality
* Remove unnecessary header
* Set missing list_def
* Freeing of curl slists is done by slab element destructor
* Rearrange initialisation of mail_ctx
In case errors occur and the handle is released early
* Actually set the user name and password in mod_authenticate
* Use a specific structure for SMTP header list
It's not really a map as the LHS is just names for the SMTP headers
* Remove un-used variables
* Remove checking of Auth-Type attribute
This module never sets Auth-Type, and the check only prevents the module
from being used to send a mail if Auth-Type was already set.
* CI: Improve tidy up in exim-setup.sh
* CI: Add authentication to test SMTP server
* CI: Update exim-setup to honour exim's rules on tainted data
* Fix up rlm_smtp tests
* Enable tests of rlm_smtp
* Extend wait for SMTP deliveries to allow for slow CI hosts
* CI: Update exim-setup.sh to work with Docker container
* Errors should be REDEBUG
* Talloc tmpl expansions off request rather than thread
So they are cleared when the request is freed
* WS
* Update default smtp module config
Alan T. DeKok [Tue, 21 Mar 2023 14:44:33 +0000 (10:44 -0400)]
one last change to tmpl tokenizer for groups.
The function tmpl_attr_afrom_substr() calls itself recursively,
but doesn't update at_rules->dict_def. So when looking at groups,
we have to prioritize the input parent over the dict_def
James Jones [Mon, 20 Mar 2023 23:31:46 +0000 (18:31 -0500)]
Disable caller graphs for (some) functions with many callers (#4919)
It turns out that one has to specify @hidecallergraph twice for
non-static functions: once where it's declared in a header and
once where it's defined. This doesn't catch everything; there's
still the matter of
1. Library functions. According to the doxygen-user mailing list,
doxygen won't make *call* graphs for library functions... but
what causes it to generate *caller* graphs for library functions,
and if it does, why isn't it complaining about fprintf(), which
FreeRADIUS code calls far more than fifty times?
2. xlat_init() and strlcpy(). (On Ubuntu, and probably other Linuxes,
strlcpy() is in an optional libbsd package, and configure
understandably doesn't check for that--hence we get the "missing"
version.) For some still-unknown reason, two @hidecallergraphs
doesn't do the trick.
Nick Porter [Fri, 17 Mar 2023 17:38:53 +0000 (17:38 +0000)]
Bump to latest FreeBSD GitHub action
Nick Porter [Mon, 20 Mar 2023 18:56:55 +0000 (18:56 +0000)]
CI: Update test LDAP config to allow SASL binds
Alan T. DeKok [Mon, 20 Mar 2023 19:04:21 +0000 (15:04 -0400)]
more cleanups of tmpl tokenize code
disallow using OIDs to reference internal attributes. Most of them
will be converted to DEFINEs, which have no (or irrelevant / changing)
numbers.
Remove duplicate check for "allow_foreign". Because the main
dictionary parsing code should be checking that.
Alan T. DeKok [Mon, 20 Mar 2023 15:30:12 +0000 (11:30 -0400)]
don't set flags.internal here.
The dictionary code should do this, as per the previous commit.
The tmpl tokenizer has no business mangling the internals of the
attribute structures
Alan T. DeKok [Mon, 20 Mar 2023 15:25:59 +0000 (11:25 -0400)]
set internal flag from parent
so that others don't need to do this
Nick Porter [Mon, 20 Mar 2023 10:43:13 +0000 (10:43 +0000)]
Honour exec module timeout for module calls
Nick Porter [Wed, 15 Mar 2023 14:35:47 +0000 (14:35 +0000)]
Add nullable option to module enviroment
Differentiates between:
- required - config pair must exist
- nullable - tmpl can return nothing
Nick Porter [Wed, 15 Mar 2023 13:35:15 +0000 (13:35 +0000)]
Add optional pointer to original tmpl_t when expanding module environment
Allows the module receiving value boxes from expanded tmpls to know
where the data came from e.g. was it static data or an expanded
attribute.
Nick Porter [Mon, 20 Mar 2023 08:20:27 +0000 (08:20 +0000)]
Use default exec timeout for exec tmpls
Alan T. DeKok [Sun, 19 Mar 2023 22:14:17 +0000 (18:14 -0400)]
more changes to tmpl tokenizing and tests
add assertions to clarify assumptions, comments to describe what
is going on, etc.
Alan T. DeKok [Sun, 19 Mar 2023 21:23:14 +0000 (17:23 -0400)]
stupid case insensitive file systems
Alan T. DeKok [Sun, 19 Mar 2023 21:00:14 +0000 (17:00 -0400)]
test for parsing foreign attributes in the current context
previously only used by the ldap_sync code. it's worth adding a
test here for it, so errors are caught earlier.
Alan T. DeKok [Sun, 19 Mar 2023 14:23:17 +0000 (10:23 -0400)]
Revert "revert last two commits."
This reverts commit
b4a5aada3801b57f94ee2ade65f35f8f25ea5e10 .