]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agominor fixes
Alan T. DeKok [Wed, 17 May 2023 12:11:06 +0000 (08:11 -0400)] 
minor fixes

2 years agoGet rid of #includes (preprocessed or not) in modeling file. (#4997)
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.

2 years agoTypo
Nick Porter [Tue, 16 May 2023 07:18:03 +0000 (08:18 +0100)] 
Typo

2 years agodocument the "migrate" section
Alan T. DeKok [Mon, 15 May 2023 19:48:41 +0000 (15:48 -0400)] 
document the "migrate" section

2 years agoremove "parse_new_conditions"
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"

2 years agoremove flatten_before_encode flag.
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.

2 years agoImport metrics package from a different repository (#4988)
Mark Donnelly [Mon, 15 May 2023 16:35:41 +0000 (12:35 -0400)] 
Import metrics package from a different repository (#4988)

2 years agoEnable hostname resolution: AWS ElastiCache returns hostnames in MOVED response:...
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

2 years agoRemove dead code (#4989)
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.

2 years agoGet rid of gratuitous assignment of NULL to uri_vb (#4993)
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.

2 years agoBetter debug message for anonymous bind
Nick Porter [Fri, 12 May 2023 16:44:26 +0000 (17:44 +0100)] 
Better debug message for anonymous bind

2 years agoIf either bind_dn is NULL, just compare the pointers
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

2 years agoInclude libfreeradius-control.so (#4991)
Max Khon [Fri, 12 May 2023 01:29:07 +0000 (03:29 +0200)] 
Include libfreeradius-control.so (#4991)

2 years agoUnneeded section
Nick Porter [Tue, 9 May 2023 13:36:22 +0000 (14:36 +0100)] 
Unneeded section

2 years agotypos and word smithing
Alan T. DeKok [Sun, 7 May 2023 15:47:08 +0000 (17:47 +0200)] 
typos and word smithing

2 years agoRework LDAP map code to use async lookup
Nick Porter [Wed, 3 May 2023 10:52:42 +0000 (11:52 +0100)] 
Rework LDAP map code to use async lookup

2 years agoUpdate map_proc_apply to work with async modules
Nick Porter [Wed, 3 May 2023 10:32:17 +0000 (11:32 +0100)] 
Update map_proc_apply to work with async modules

2 years agoSwitch mod_map to return unlang_action_t
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

2 years agoUse async bind for eDir bind during authorization
Nick Porter [Fri, 21 Apr 2023 12:45:38 +0000 (13:45 +0100)] 
Use async bind for eDir bind during authorization

2 years agoRework LDAP bind auths to use trunk connection
Nick Porter [Tue, 18 Apr 2023 11:16:35 +0000 (12:16 +0100)] 
Rework LDAP bind auths to use trunk connection

2 years agoSet sizes for LDAP bind auth trunk request pool
Nick Porter [Tue, 18 Apr 2023 11:00:57 +0000 (12:00 +0100)] 
Set sizes for LDAP bind auth trunk request pool

2 years agoDefine thread specific trunk to use for LDAP bind auth
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

2 years agoClarify LDAP bind related structure member comments
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.

2 years agoDefine fr_ldap_sasl_bind_auth_send()
Nick Porter [Tue, 11 Apr 2023 14:38:02 +0000 (15:38 +0100)] 
Define fr_ldap_sasl_bind_auth_send()

2 years agoAdd config for trunk to use for bind auths
Nick Porter [Tue, 11 Apr 2023 14:13:56 +0000 (15:13 +0100)] 
Add config for trunk to use for bind auths

2 years agoAllow fr_trunk_request_requeue to work on full connections
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.

2 years agoUse full connection name when referring to trunk connections in logs
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.

2 years agoBetter method to ensure correct lifetime of query context
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.

2 years agoCI: shorten runtime of main CI fuzzer
Matthew Newton [Thu, 4 May 2023 12:30:02 +0000 (13:30 +0100)] 
CI: shorten runtime of main CI fuzzer

2 years agoCorrect documentation of fr_ldap_trunk_*
Nick Porter [Wed, 3 May 2023 10:53:41 +0000 (11:53 +0100)] 
Correct documentation of fr_ldap_trunk_*

2 years agoDocs: correct file name
Nick Porter [Wed, 3 May 2023 10:41:46 +0000 (11:41 +0100)] 
Docs: correct file name

2 years agoDoxygen tidying
Nick Porter [Tue, 2 May 2023 17:02:37 +0000 (18:02 +0100)] 
Doxygen tidying

2 years agoAdd a request_cancel callback for LDAP trunk requests
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

2 years agoCompleting trunk requests frees the query
Nick Porter [Tue, 2 May 2023 11:02:18 +0000 (12:02 +0100)] 
Completing trunk requests frees the query

2 years agoNot all calls to fr_ldap_trunk_search want p_result
Nick Porter [Tue, 2 May 2023 11:01:18 +0000 (12:01 +0100)] 
Not all calls to fr_ldap_trunk_search want p_result

2 years agoAdd a dlist of queries still referencing an LDAP connection
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.

2 years agoDon't clear LDAP controls before using them to unbind.
Nick Porter [Tue, 2 May 2023 07:47:42 +0000 (08:47 +0100)] 
Don't clear LDAP controls before using them to unbind.

2 years agoAdd a talloc reference from trunk request to LDAP query. Fixes #4598
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.

2 years agoRemove reference to previous referral before looking for others
Nick Porter [Mon, 24 Apr 2023 17:40:44 +0000 (18:40 +0100)] 
Remove reference to previous referral before looking for others

2 years agoCorrect tidy up of previous trunk request when following another
Nick Porter [Mon, 24 Apr 2023 17:29:35 +0000 (18:29 +0100)] 
Correct tidy up of previous trunk request when following another

2 years agoCorrect docs
Nick Porter [Fri, 28 Apr 2023 10:51:34 +0000 (11:51 +0100)] 
Correct docs

2 years agoTypo
Nick Porter [Thu, 27 Apr 2023 13:23:05 +0000 (14:23 +0100)] 
Typo

2 years agoNo need to set directory->type to 0 - it was allocated with talloc_zero
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

2 years agoParent the directory discovery query from a trunk request
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.

2 years agoLDAP query should be removed from outstanding list in demux
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.

2 years agoHandle trunk enqueueing failures when following LDAP referrals
Nick Porter [Mon, 24 Apr 2023 17:10:04 +0000 (18:10 +0100)] 
Handle trunk enqueueing failures when following LDAP referrals

2 years agoUpdate mods-available/cache update section comment to provide a clearer description...
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>
2 years agorename flag, and set it in detail work, too
Alan T. DeKok [Tue, 25 Apr 2023 16:28:08 +0000 (12:28 -0400)] 
rename flag, and set it in detail work, too

2 years agoRevert "disable detail tests until we track down Linux kqueue issues"
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

2 years agosome listeners may be read-only
Alan T. DeKok [Tue, 25 Apr 2023 13:46:32 +0000 (09:46 -0400)] 
some listeners may be read-only

2 years agoargs are unused
Alan T. DeKok [Tue, 25 Apr 2023 13:45:34 +0000 (09:45 -0400)] 
args are unused

2 years agoquiet clang scan
Alan T. DeKok [Tue, 25 Apr 2023 12:35:00 +0000 (08:35 -0400)] 
quiet clang scan

2 years agodirectory and worker listeners may be on separate threads
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

2 years agouse ${top_srcdir} instead of ${PWD}. Fixes #4977
Alan T. DeKok [Mon, 24 Apr 2023 14:35:50 +0000 (10:35 -0400)] 
use ${top_srcdir} instead of ${PWD}.  Fixes #4977

2 years agopassword may be NULL. CID #1524744
Alan T. DeKok [Sun, 23 Apr 2023 15:59:45 +0000 (11:59 -0400)] 
password may be NULL.   CID #1524744

2 years agodisable detail tests until we track down Linux kqueue issues
Alan T. DeKok [Sun, 23 Apr 2023 15:23:27 +0000 (11:23 -0400)] 
disable detail tests until we track down Linux kqueue issues

2 years agodoc: when complaining about documentation location, point to new documentation spot...
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)

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Sat, 22 Apr 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

2 years agoload module from parent instance, not from CONF_SECTION
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

2 years agothe detail worker MUST have en event loop set
Alan T. DeKok [Fri, 21 Apr 2023 12:38:06 +0000 (08:38 -0400)] 
the detail worker MUST have en event loop set

2 years agodepend on the proto_detail libraries, too
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

2 years agoRework eDirectory Universal Password lookup to be async
Nick Porter [Fri, 21 Apr 2023 10:33:10 +0000 (11:33 +0100)] 
Rework eDirectory Universal Password lookup to be async

2 years agoHandle LDAP extended operations in trunk mux / demux
Nick Porter [Fri, 21 Apr 2023 10:15:44 +0000 (11:15 +0100)] 
Handle LDAP extended operations in trunk mux / demux

2 years agoGrammar
Arran Cudbard-Bell [Fri, 21 Apr 2023 03:28:50 +0000 (13:28 +1000)] 
Grammar

2 years agotypo
Arran Cudbard-Bell [Fri, 21 Apr 2023 01:26:31 +0000 (11:26 +1000)] 
typo

2 years agoautoconf: with/without commands are not symmetrical
Arran Cudbard-Bell [Fri, 21 Apr 2023 01:09:39 +0000 (11:09 +1000)] 
autoconf: with/without commands are not symmetrical

2 years agorpm: Fix module selection
Arran Cudbard-Bell [Fri, 21 Apr 2023 00:39:39 +0000 (10:39 +1000)] 
rpm: Fix module selection

2 years agoFix default RADIUS status check config
Arran Cudbard-Bell [Thu, 20 Apr 2023 22:27:45 +0000 (08:27 +1000)] 
Fix default RADIUS status check config

2 years agoremove assertion
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.

2 years agoclarify labels and behaviors for encode_child()
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

2 years agorename encode_foo_hdr() to encode_foo()
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.

2 years agorename encode_tlv() to encode_cursor()
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.

2 years agouse encode_child() consistenly for encoding one thing
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.

2 years agouse consistent naming
Alan T. DeKok [Thu, 20 Apr 2023 15:12:48 +0000 (11:12 -0400)] 
use consistent naming

2 years agoadd test.detail to standard set of tests
Alan T. DeKok [Thu, 20 Apr 2023 14:54:27 +0000 (10:54 -0400)] 
add test.detail to standard set of tests

2 years agoupdate comments
Alan T. DeKok [Wed, 19 Apr 2023 17:16:01 +0000 (13:16 -0400)] 
update comments

2 years agoAdd support for LDAP extended operations to async framework
Nick Porter [Thu, 20 Apr 2023 13:24:09 +0000 (14:24 +0100)] 
Add support for LDAP extended operations to async framework

2 years agoImprove / correct comments on LDAP code
Nick Porter [Thu, 20 Apr 2023 13:20:34 +0000 (14:20 +0100)] 
Improve / correct comments on LDAP code

2 years agoAssure that aside from 0, reply_code() will return a valid code. (#4966)
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.

2 years agoDon't pass NULL buffer to _fr_syserror() (#4963)
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.

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Thu, 20 Apr 2023 09:35:07 +0000 (09:35 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:51 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:42 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:34 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Thu, 20 Apr 2023 09:34:28 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

2 years agoadd basic "test.detail"
Alan T. DeKok [Wed, 19 Apr 2023 17:13:13 +0000 (13:13 -0400)] 
add basic "test.detail"

2 years agoadd and use "exit_when_done" flag to the detail listener
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

2 years agoCI: fix scheduled fuzzer issues with pyOpenSSL
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

2 years agoTidy debugging on LDAP admin binds
Nick Porter [Tue, 18 Apr 2023 10:44:27 +0000 (11:44 +0100)] 
Tidy debugging on LDAP admin binds

2 years agoradius_udp: Allow source IP address override, maybe...
Arran Cudbard-Bell [Wed, 19 Apr 2023 03:43:21 +0000 (13:43 +1000)] 
radius_udp: Allow source IP address override, maybe...

2 years agodetail_reader: Pass in correct instance data to the detail work submodule
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

2 years agodetail: Emit an error message if we can't make changes
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

2 years agoclose fd and return fail. CID #1524731
Alan T. DeKok [Tue, 18 Apr 2023 20:27:07 +0000 (16:27 -0400)] 
close fd and return fail.  CID #1524731

2 years agoDon't enable modules which are not in the base package
Nick Porter [Tue, 18 Apr 2023 16:51:41 +0000 (17:51 +0100)] 
Don't enable modules which are not in the base package

2 years agoSuppress compiler warnings on make deb
Nick Porter [Tue, 18 Apr 2023 14:28:51 +0000 (15:28 +0100)] 
Suppress compiler warnings on make deb

2 years agoInclude connection name in LDAP trunk connection error message
Nick Porter [Tue, 18 Apr 2023 11:30:29 +0000 (12:30 +0100)] 
Include connection name in LDAP trunk connection error message

2 years agoComment corrections
Nick Porter [Tue, 18 Apr 2023 11:31:00 +0000 (12:31 +0100)] 
Comment corrections