]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Wed, 17 May 2023 12:11:06 +0000 (08:11 -0400)]
minor fixes
James Jones [Tue, 16 May 2023 20:08:07 +0000 (15:08 -0500)]
Get rid of #includes (preprocessed or not) in modeling file. (#4997)
Sending coverity preprocessed source using FreeRADIUS headers can
* pull in symbols that exist on the system where one preprocesses
but not in the environment where Coverity runs
* FreeRADIUS's use of macros (notably for sbuffs and dbuffs) can
produce results that confuse coverity needlessly
Modeling functions just give coverity a better idea of the effects
of the modeled functions, so that coverity only needs minimal knowledge
of those functions and of the types of parameters, so we can get away
minimal or even trivial typedefs.
Nick Porter [Tue, 16 May 2023 07:18:03 +0000 (08:18 +0100)]
Typo
Alan T. DeKok [Mon, 15 May 2023 19:48:41 +0000 (15:48 -0400)]
document the "migrate" section
Alan T. DeKok [Mon, 15 May 2023 19:45:31 +0000 (15:45 -0400)]
remove "parse_new_conditions"
That was only useful while developing the new conditions. We can
now just switch to them via "use_new_conditions"
Alan T. DeKok [Mon, 15 May 2023 19:36:25 +0000 (15:36 -0400)]
remove flatten_before_encode flag.
It is no longer needed, as all protocol encoders handle flat or
nested attributes.
Mark Donnelly [Mon, 15 May 2023 16:35:41 +0000 (12:35 -0400)]
Import metrics package from a different repository (#4988)
Max Khon [Mon, 15 May 2023 15:55:24 +0000 (17:55 +0200)]
Enable hostname resolution: AWS ElastiCache returns hostnames in MOVED response: (#4994)
MOVED 352 dev-citests01-dhcpdb-0001-001.dev-citests01-dhcpdb.oovb0g.usw2.cache.amazonaws.com:6379
James Jones [Mon, 15 May 2023 15:47:27 +0000 (10:47 -0500)]
Remove dead code (#4989)
This particular case happens if fr_pool_connection_get() fails
and is before (inst->driver->sql_fields)() makes fields point at
allocated space, so it needn't goto finish.
James Jones [Mon, 15 May 2023 15:46:08 +0000 (10:46 -0500)]
Get rid of gratuitous assignment of NULL to uri_vb (#4993)
The next use is an assignment, so there's no point.
Nick Porter [Fri, 12 May 2023 16:44:26 +0000 (17:44 +0100)]
Better debug message for anonymous bind
Nick Porter [Fri, 12 May 2023 16:11:33 +0000 (17:11 +0100)]
If either bind_dn is NULL, just compare the pointers
Anonymous binds don't populate bind_dn, and strcmp on a NULL pointer
will seg fault
Max Khon [Fri, 12 May 2023 01:29:07 +0000 (03:29 +0200)]
Include libfreeradius-control.so (#4991)
Nick Porter [Tue, 9 May 2023 13:36:22 +0000 (14:36 +0100)]
Unneeded section
Alan T. DeKok [Sun, 7 May 2023 15:47:08 +0000 (17:47 +0200)]
typos and word smithing
Nick Porter [Wed, 3 May 2023 10:52:42 +0000 (11:52 +0100)]
Rework LDAP map code to use async lookup
Nick Porter [Wed, 3 May 2023 10:32:17 +0000 (11:32 +0100)]
Update map_proc_apply to work with async modules
Nick Porter [Tue, 2 May 2023 16:56:52 +0000 (17:56 +0100)]
Switch mod_map to return unlang_action_t
In preparation for async mod_map_proc in relevant modules
Nick Porter [Fri, 21 Apr 2023 12:45:38 +0000 (13:45 +0100)]
Use async bind for eDir bind during authorization
Nick Porter [Tue, 18 Apr 2023 11:16:35 +0000 (12:16 +0100)]
Rework LDAP bind auths to use trunk connection
Nick Porter [Tue, 18 Apr 2023 11:00:57 +0000 (12:00 +0100)]
Set sizes for LDAP bind auth trunk request pool
Nick Porter [Tue, 11 Apr 2023 14:57:09 +0000 (15:57 +0100)]
Define thread specific trunk to use for LDAP bind auth
And associated function to allocate / retrieve the trunk
Nick Porter [Tue, 11 Apr 2023 14:40:00 +0000 (15:40 +0100)]
Clarify LDAP bind related structure member comments
The same structures are used for admin binds and user binds, but some
elements are only used in admin binds.
Nick Porter [Tue, 11 Apr 2023 14:38:02 +0000 (15:38 +0100)]
Define fr_ldap_sasl_bind_auth_send()
Nick Porter [Tue, 11 Apr 2023 14:13:56 +0000 (15:13 +0100)]
Add config for trunk to use for bind auths
Nick Porter [Thu, 13 Apr 2023 15:54:21 +0000 (16:54 +0100)]
Allow fr_trunk_request_requeue to work on full connections
The request being requeued is part of the list of requests causing the
connection to be marked as full - so it should be allowed to requeue.
Nick Porter [Tue, 11 Apr 2023 14:02:49 +0000 (15:02 +0100)]
Use full connection name when referring to trunk connections in logs
Otherwise in RDEBUG logging it is not clear which trunk the log relates
to.
Nick Porter [Thu, 4 May 2023 12:50:22 +0000 (13:50 +0100)]
Better method to ensure correct lifetime of query context
Only cancelled trunk requests require the query context to last beyond
the stack frame they were allocated in.
Matthew Newton [Thu, 4 May 2023 12:30:02 +0000 (13:30 +0100)]
CI: shorten runtime of main CI fuzzer
Nick Porter [Wed, 3 May 2023 10:53:41 +0000 (11:53 +0100)]
Correct documentation of fr_ldap_trunk_*
Nick Porter [Wed, 3 May 2023 10:41:46 +0000 (11:41 +0100)]
Docs: correct file name
Nick Porter [Tue, 2 May 2023 17:02:37 +0000 (18:02 +0100)]
Doxygen tidying
Nick Porter [Tue, 2 May 2023 12:35:49 +0000 (13:35 +0100)]
Add a request_cancel callback for LDAP trunk requests
To ensure queries are not left in the outstanding query tree
Nick Porter [Tue, 2 May 2023 11:02:18 +0000 (12:02 +0100)]
Completing trunk requests frees the query
Nick Porter [Tue, 2 May 2023 11:01:18 +0000 (12:01 +0100)]
Not all calls to fr_ldap_trunk_search want p_result
Nick Porter [Tue, 2 May 2023 09:16:28 +0000 (10:16 +0100)]
Add a dlist of queries still referencing an LDAP connection
Queries need to be removed from the rb tree of outstanding queries once
a reply has been received as the msgid can be reused.
However, the connection needs to persist until all queries referencing
it have been freed to prevent use after free issues.
This list is used to determine if a connection can be freed.
Nick Porter [Tue, 2 May 2023 07:47:42 +0000 (08:47 +0100)]
Don't clear LDAP controls before using them to unbind.
Nick Porter [Mon, 24 Apr 2023 17:38:34 +0000 (18:38 +0100)]
Add a talloc reference from trunk request to LDAP query. Fixes #4598
Ensures the LDAP query will last until the trunk request is freed.
Specifically, in the case that the packet processing times out and the
trunk request is singlalled to be cancelled, the query needs to live
until the cancel_mux function is called.
Nick Porter [Mon, 24 Apr 2023 17:40:44 +0000 (18:40 +0100)]
Remove reference to previous referral before looking for others
Nick Porter [Mon, 24 Apr 2023 17:29:35 +0000 (18:29 +0100)]
Correct tidy up of previous trunk request when following another
Nick Porter [Fri, 28 Apr 2023 10:51:34 +0000 (11:51 +0100)]
Correct docs
Nick Porter [Thu, 27 Apr 2023 13:23:05 +0000 (14:23 +0100)]
Typo
Nick Porter [Fri, 28 Apr 2023 18:47:57 +0000 (19:47 +0100)]
No need to set directory->type to 0 - it was allocated with talloc_zero
Nick Porter [Fri, 28 Apr 2023 18:38:18 +0000 (19:38 +0100)]
Parent the directory discovery query from a trunk request
So that the query is cleared up when the request is completed - there is
no further use for the query after demux processing.
Nick Porter [Mon, 24 Apr 2023 17:15:28 +0000 (18:15 +0100)]
LDAP query should be removed from outstanding list in demux
We have received a reply, so it is no longer outstanding.
Also libldap can reuse msgid values so there could be a conflict between
a query whose reply has been received and a new query.
Nick Porter [Mon, 24 Apr 2023 17:10:04 +0000 (18:10 +0100)]
Handle trunk enqueueing failures when following LDAP referrals
Stephen Blackwell [Thu, 27 Apr 2023 14:38:11 +0000 (10:38 -0400)]
Update mods-available/cache update section comment to provide a clearer description of how update sections are rendered and cached (#4981)
Signed-off-by: Stephen Blackwell <sblackwell@networkradius.com>
Alan T. DeKok [Tue, 25 Apr 2023 16:28:08 +0000 (12:28 -0400)]
rename flag, and set it in detail work, too
Alan T. DeKok [Tue, 25 Apr 2023 15:53:33 +0000 (11:53 -0400)]
Revert "disable detail tests until we track down Linux kqueue issues"
This reverts commit
59f293091e1cda6c433184d07871847825474410 .
this should now be fixed
Alan T. DeKok [Tue, 25 Apr 2023 13:46:32 +0000 (09:46 -0400)]
some listeners may be read-only
Alan T. DeKok [Tue, 25 Apr 2023 13:45:34 +0000 (09:45 -0400)]
args are unused
Alan T. DeKok [Tue, 25 Apr 2023 12:35:00 +0000 (08:35 -0400)]
quiet clang scan
Alan T. DeKok [Tue, 25 Apr 2023 12:14:32 +0000 (08:14 -0400)]
directory and worker listeners may be on separate threads
add an assert saying we don't do writes
Alan T. DeKok [Mon, 24 Apr 2023 14:35:50 +0000 (10:35 -0400)]
use ${top_srcdir} instead of ${PWD}. Fixes #4977
Alan T. DeKok [Sun, 23 Apr 2023 15:59:45 +0000 (11:59 -0400)]
password may be NULL. CID #
1524744
Alan T. DeKok [Sun, 23 Apr 2023 15:23:27 +0000 (11:23 -0400)]
disable detail tests until we track down Linux kqueue issues
Michael Richardson [Sun, 23 Apr 2023 15:02:42 +0000 (11:02 -0400)]
doc: when complaining about documentation location, point to new documentation spot (#4976)
github-actions[bot] [Sat, 22 Apr 2023 09:34:37 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
Alan T. DeKok [Fri, 21 Apr 2023 13:01:12 +0000 (09:01 -0400)]
load module from parent instance, not from CONF_SECTION
because that's what the dl_module framework expects
Alan T. DeKok [Fri, 21 Apr 2023 12:38:06 +0000 (08:38 -0400)]
the detail worker MUST have en event loop set
Alan T. DeKok [Fri, 21 Apr 2023 12:31:58 +0000 (08:31 -0400)]
depend on the proto_detail libraries, too
and only succeed if the test succeeds
Nick Porter [Fri, 21 Apr 2023 10:33:10 +0000 (11:33 +0100)]
Rework eDirectory Universal Password lookup to be async
Nick Porter [Fri, 21 Apr 2023 10:15:44 +0000 (11:15 +0100)]
Handle LDAP extended operations in trunk mux / demux
Arran Cudbard-Bell [Fri, 21 Apr 2023 03:28:50 +0000 (13:28 +1000)]
Grammar
Arran Cudbard-Bell [Fri, 21 Apr 2023 01:26:31 +0000 (11:26 +1000)]
typo
Arran Cudbard-Bell [Fri, 21 Apr 2023 01:09:39 +0000 (11:09 +1000)]
autoconf: with/without commands are not symmetrical
Arran Cudbard-Bell [Fri, 21 Apr 2023 00:39:39 +0000 (10:39 +1000)]
rpm: Fix module selection
Arran Cudbard-Bell [Thu, 20 Apr 2023 22:27:45 +0000 (08:27 +1000)]
Fix default RADIUS status check config
Alan T. DeKok [Thu, 20 Apr 2023 21:54:00 +0000 (17:54 -0400)]
remove assertion
We need to fix up encode_tlv(), as for RADIUS, it's really
"encode TLV contents", and not "encode the entire TLV".
The encode_child() function also relies on the encode_value()
funtion to handle grouping attributes, which is likely also wrong.
The RADIUS encoder / decoder is not only more complex than the other
protocols, it was written earlier. i.e. before we cleaned up and
clarified the process of encoding packets.
Alan T. DeKok [Thu, 20 Apr 2023 21:07:37 +0000 (17:07 -0400)]
clarify labels and behaviors for encode_child()
Most protocols (for now) need to be able to handle flat or nested
pairs. RADIUS only handles flat pairs, as it doesn't have groups
Alan T. DeKok [Thu, 20 Apr 2023 15:34:28 +0000 (11:34 -0400)]
rename encode_foo_hdr() to encode_foo()
because the functions encode the entire attribute, including
header and value.
We also have separate encode_option_hdr() functions which only
encode the actual header contents.
Alan T. DeKok [Thu, 20 Apr 2023 15:30:28 +0000 (11:30 -0400)]
rename encode_tlv() to encode_cursor()
because it encodes everything in the cursor. As part of renaming
the functions to be consistent and more clear.
Alan T. DeKok [Thu, 20 Apr 2023 15:18:44 +0000 (11:18 -0400)]
use encode_child() consistenly for encoding one thing
while the protocols use random names (attribute, option, etc)
for consistency, our code should use common names.
This also lets us better track code duplication, and lets us do
deduplication.
Alan T. DeKok [Thu, 20 Apr 2023 15:12:48 +0000 (11:12 -0400)]
use consistent naming
Alan T. DeKok [Thu, 20 Apr 2023 14:54:27 +0000 (10:54 -0400)]
add test.detail to standard set of tests
Alan T. DeKok [Wed, 19 Apr 2023 17:16:01 +0000 (13:16 -0400)]
update comments
Nick Porter [Thu, 20 Apr 2023 13:24:09 +0000 (14:24 +0100)]
Add support for LDAP extended operations to async framework
Nick Porter [Thu, 20 Apr 2023 13:20:34 +0000 (14:20 +0100)]
Improve / correct comments on LDAP code
James Jones [Thu, 20 Apr 2023 14:05:43 +0000 (09:05 -0500)]
Assure that aside from 0, reply_code() will return a valid code. (#4966)
Uncertainty about this appears to cause the coverity defects in
src/process/tacacs/base.c.
James Jones [Thu, 20 Apr 2023 14:05:19 +0000 (09:05 -0500)]
Don't pass NULL buffer to _fr_syserror() (#4963)
The issue turns up if _fr_syserror_buffer() returns NULL.
github-actions[bot] [Thu, 20 Apr 2023 09:35:07 +0000 (09:35 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:51 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:49 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:46 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:42 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:34 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:31 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:28 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
Alan T. DeKok [Wed, 19 Apr 2023 17:13:13 +0000 (13:13 -0400)]
add basic "test.detail"
Alan T. DeKok [Wed, 19 Apr 2023 13:12:04 +0000 (09:12 -0400)]
add and use "exit_when_done" flag to the detail listener
So that we can use it as a one-shot client for reading and
processing detail files
Matthew Newton [Wed, 19 Apr 2023 11:19:23 +0000 (12:19 +0100)]
CI: fix scheduled fuzzer issues with pyOpenSSL
Force install of new version of pyOpenSSL before PyGithub is
installed - that depends on a newer cryptography pkg which then
breaks everything with old pyOpenSSL.
https://github.com/pyca/pyopenssl/issues/1143
Nick Porter [Tue, 18 Apr 2023 10:44:27 +0000 (11:44 +0100)]
Tidy debugging on LDAP admin binds
Arran Cudbard-Bell [Wed, 19 Apr 2023 03:43:21 +0000 (13:43 +1000)]
radius_udp: Allow source IP address override, maybe...
Arran Cudbard-Bell [Wed, 19 Apr 2023 00:08:39 +0000 (10:08 +1000)]
detail_reader: Pass in correct instance data to the detail work submodule
Arran Cudbard-Bell [Tue, 18 Apr 2023 22:48:33 +0000 (08:48 +1000)]
detail: Emit an error message if we can't make changes
Alan T. DeKok [Tue, 18 Apr 2023 20:27:07 +0000 (16:27 -0400)]
close fd and return fail. CID #
1524731
Nick Porter [Tue, 18 Apr 2023 16:51:41 +0000 (17:51 +0100)]
Don't enable modules which are not in the base package
Nick Porter [Tue, 18 Apr 2023 14:28:51 +0000 (15:28 +0100)]
Suppress compiler warnings on make deb
Nick Porter [Tue, 18 Apr 2023 11:30:29 +0000 (12:30 +0100)]
Include connection name in LDAP trunk connection error message
Nick Porter [Tue, 18 Apr 2023 11:31:00 +0000 (12:31 +0100)]
Comment corrections