]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 years agomore consistent dockerfiles
Matthew Newton [Thu, 12 Aug 2021 21:56:09 +0000 (22:56 +0100)] 
more consistent dockerfiles

4 years agoafter some thought, perhaps a better fix
Alan T. DeKok [Thu, 12 Aug 2021 16:41:21 +0000 (12:41 -0400)] 
after some thought, perhaps a better fix

4 years agojust shut up the analyzer
Alan T. DeKok [Thu, 12 Aug 2021 16:40:00 +0000 (12:40 -0400)] 
just shut up the analyzer

4 years agohoist checks to earlier
Alan T. DeKok [Thu, 12 Aug 2021 16:04:20 +0000 (12:04 -0400)] 
hoist checks to earlier

4 years agoshut up clang scan
Alan T. DeKok [Thu, 12 Aug 2021 15:38:57 +0000 (11:38 -0400)] 
shut up clang scan

4 years agoallow references to the "internal" dictionaries, too
Alan T. DeKok [Thu, 12 Aug 2021 15:07:36 +0000 (11:07 -0400)] 
allow references to the "internal" dictionaries, too

4 years agoremove requirements that "clone" be used only for struct/tlv
Alan T. DeKok [Thu, 12 Aug 2021 14:42:08 +0000 (10:42 -0400)] 
remove requirements that "clone" be used only for struct/tlv

because when we clone structs/TLVs, we clone attributes of many
types.  So we might as well allow it here, too

4 years agodo fast-path checks for errors
Alan T. DeKok [Thu, 12 Aug 2021 14:41:02 +0000 (10:41 -0400)] 
do fast-path checks for errors

the error message is the same, but the difference is do we error
out immediately, or later, after all of the rest of the dictionaries
have been loaded.

4 years agothe error is for this ref, not for all referenceS
Alan T. DeKok [Thu, 12 Aug 2021 14:38:06 +0000 (10:38 -0400)] 
the error is for this ref, not for all referenceS

4 years agolook up reference using found dictionary, not default one
Alan T. DeKok [Thu, 12 Aug 2021 14:32:49 +0000 (10:32 -0400)] 
look up reference using found dictionary, not default one

4 years agotypo
Alan T. DeKok [Thu, 12 Aug 2021 13:14:06 +0000 (09:14 -0400)] 
typo

4 years agoremove unnecessary comments
Alan T. DeKok [Thu, 12 Aug 2021 13:12:09 +0000 (09:12 -0400)] 
remove unnecessary comments

4 years agoadd --allow-mschapv2
Alan T. DeKok [Thu, 12 Aug 2021 12:47:06 +0000 (08:47 -0400)] 
add  --allow-mschapv2

4 years agoadd attribute from RFC
Alan T. DeKok [Wed, 11 Aug 2021 20:52:22 +0000 (16:52 -0400)] 
add attribute from RFC

4 years agodocker: update package repositories
Matthew Newton [Wed, 11 Aug 2021 23:44:24 +0000 (00:44 +0100)] 
docker: update package repositories

4 years agoAdd fr_lst_entry_inserted() to permit heap->LST migration (#4178)
James Jones [Wed, 11 Aug 2021 16:41:38 +0000 (11:41 -0500)] 
Add fr_lst_entry_inserted() to permit heap->LST migration (#4178)

4 years agoregenerate from raddb source
Alan T. DeKok [Wed, 11 Aug 2021 14:04:25 +0000 (10:04 -0400)] 
regenerate from raddb source

4 years agowhitespace for standard formatting
Alan T. DeKok [Wed, 11 Aug 2021 14:04:08 +0000 (10:04 -0400)] 
whitespace for standard formatting

4 years agoupdates for relaying, including sample config.
Alan T. DeKok [Wed, 11 Aug 2021 13:26:38 +0000 (09:26 -0400)] 
updates for relaying, including sample config.

Untested, but (of course) it will work, right?

4 years agoformatting
Alan T. DeKok [Wed, 11 Aug 2021 12:23:01 +0000 (08:23 -0400)] 
formatting

4 years agoremove dhcpv4 here, too
Alan T. DeKok [Tue, 10 Aug 2021 19:09:42 +0000 (15:09 -0400)] 
remove dhcpv4 here, too

4 years agodon't ionclude dhcpv4 by default
Alan T. DeKok [Tue, 10 Aug 2021 19:04:20 +0000 (15:04 -0400)] 
don't ionclude dhcpv4 by default

it no longer has xlats

4 years agoremove expansion documentation, it's no longer relevant
Alan T. DeKok [Tue, 10 Aug 2021 18:46:21 +0000 (14:46 -0400)] 
remove expansion documentation, it's no longer relevant

4 years agodocument new encoders
Alan T. DeKok [Tue, 10 Aug 2021 18:45:45 +0000 (14:45 -0400)] 
document new encoders

4 years agolet's free encode_ctx, too
Alan T. DeKok [Tue, 10 Aug 2021 18:27:44 +0000 (14:27 -0400)] 
let's free encode_ctx, too

4 years agolet's free vpt, too
Alan T. DeKok [Tue, 10 Aug 2021 18:25:23 +0000 (14:25 -0400)] 
let's free vpt, too

4 years agosome protocols have no libfreeradius-PROTO, so that's OK
Alan T. DeKok [Tue, 10 Aug 2021 16:13:51 +0000 (12:13 -0400)] 
some protocols have no libfreeradius-PROTO, so that's OK

4 years agoincrease buffer size
Alan T. DeKok [Tue, 10 Aug 2021 15:45:54 +0000 (11:45 -0400)] 
increase buffer size

4 years agomove to encode.dhcpv4, to use new framework
Alan T. DeKok [Tue, 10 Aug 2021 15:17:37 +0000 (11:17 -0400)] 
move to encode.dhcpv4, to use new framework

4 years agodon't check dictionaries, it's no longer necessary
Alan T. DeKok [Tue, 10 Aug 2021 14:53:28 +0000 (10:53 -0400)] 
don't check dictionaries, it's no longer necessary

4 years agoremove dhcpv4-specific encoder
Alan T. DeKok [Tue, 10 Aug 2021 14:39:59 +0000 (10:39 -0400)] 
remove dhcpv4-specific encoder

4 years agoadd %{encode.PROTO:...}
Alan T. DeKok [Tue, 10 Aug 2021 14:38:54 +0000 (10:38 -0400)] 
add %{encode.PROTO:...}

4 years agoremove decode_dhcpv4 xlat
Alan T. DeKok [Tue, 10 Aug 2021 13:45:18 +0000 (09:45 -0400)] 
remove decode_dhcpv4 xlat

4 years agorearrange and add "decode.internal" for the internal protocol
Alan T. DeKok [Tue, 10 Aug 2021 13:44:59 +0000 (09:44 -0400)] 
rearrange and add "decode.internal" for the internal protocol

4 years agoload the library for the internal dictionary, too
Alan T. DeKok [Tue, 10 Aug 2021 13:43:10 +0000 (09:43 -0400)] 
load the library for the internal dictionary, too

4 years agoadd protocol-generic decode routines
Alan T. DeKok [Tue, 10 Aug 2021 13:28:50 +0000 (09:28 -0400)] 
add protocol-generic decode routines

4 years agorearrange code and move to common function
Alan T. DeKok [Mon, 9 Aug 2021 20:31:37 +0000 (16:31 -0400)] 
rearrange code and move to common function

in preparation for automatically defining "decode/encode" xlats
for all of the protocols

4 years agoexport dl_t from dict
Alan T. DeKok [Mon, 9 Aug 2021 20:22:40 +0000 (16:22 -0400)] 
export dl_t from dict

4 years agoadd iterators for protocols
Alan T. DeKok [Mon, 9 Aug 2021 20:21:04 +0000 (16:21 -0400)] 
add iterators for protocols

4 years agoFreeBSD fixes and CI (#4177)
Terry Burton [Mon, 9 Aug 2021 22:59:18 +0000 (23:59 +0100)] 
FreeBSD fixes and CI (#4177)

4 years agoUse calloc(), not malloc() to allocate heap/lst elements from the (memory) heap ...
James Jones [Fri, 6 Aug 2021 16:41:52 +0000 (11:41 -0500)] 
Use calloc(), not malloc() to allocate heap/lst elements from the (memory) heap (#4175)

malloc(), in the C standard and in the man page, is described as not
initializing the memory it allocates. A standard-conforming C compiler
could thus compile versions of the tests that fail fr_{heap, lst}_insert()
checks that keep an item from being inserted twice or into more than one
heap or lst with the same index displacement.

calloc() zeroes the allocated memory.

4 years agoFix connection pool with fewer connections than spare setting (#4174)
Masamichi Hosoda [Fri, 6 Aug 2021 14:14:16 +0000 (23:14 +0900)] 
Fix connection pool with fewer connections than spare setting (#4174)

The number of connections in the connection pool was not increased
when it is less than the spare setting.
In v4.0.x, unlike v3.0.x, `pool->max_pending` is a configurable value,
with a default value of zero.
Therefore, in the default setting, the conditional expression
`pool->state.pending >= pool->max_pending`
always is true and the number of connections is not increased.

This commit fixes it by using `pool->pending_window`
instead of `pool->max_pending`.

4 years agofix this, too
Alan T. DeKok [Thu, 5 Aug 2021 22:48:06 +0000 (18:48 -0400)] 
fix this, too

4 years agomake check items "const" for comparison
Alan T. DeKok [Thu, 5 Aug 2021 20:45:25 +0000 (16:45 -0400)] 
make check items "const" for comparison

so that we catch issues like commit 653ed7b when compiling, and
not when the server crashes in production.

4 years agomake local editable pair
Alan T. DeKok [Thu, 5 Aug 2021 20:44:18 +0000 (16:44 -0400)] 
make local editable pair

the "check" item is actually "const".  So editing in place is not
a good idea.

4 years agofr_pair_cmp() should take "const"
Alan T. DeKok [Thu, 5 Aug 2021 20:26:04 +0000 (16:26 -0400)] 
fr_pair_cmp() should take "const"

4 years agorework connection management.
Alan T. DeKok [Thu, 5 Aug 2021 20:24:16 +0000 (16:24 -0400)] 
rework connection management.

4 years agocheck is "const"
Alan T. DeKok [Thu, 5 Aug 2021 20:21:55 +0000 (16:21 -0400)] 
check is "const"

4 years agoallocate from the request, which is thread-safe. Helps with #3188
Alan T. DeKok [Thu, 5 Aug 2021 19:00:01 +0000 (15:00 -0400)] 
allocate from the request, which is thread-safe.  Helps with #3188

The "check" item is taken from the "huntgroups" file.  It's in
a statically allocated list which doesn't change, and shouldn't
change during run-time.  Allocating memory in its context is
not thread-safe, and can cause issues

Manual port of commit 7875ca06d1

4 years agoLst (#4169)
James Jones [Thu, 5 Aug 2021 14:44:18 +0000 (09:44 -0500)] 
Lst (#4169)

* Add leftmost skeleton tree API as a choice for priority queues

Relevant paper: "Stronger Quickheaps", Gonzalo Navarro, Rodrigo
Paredes, Patricio Poblete, and Peter Sanders, International
Journal of Foundations of Computer Science, November 2011.

* Remove flst

4 years agoMySQL sqlippool SP: Run as invoker, not definer; close transaction on error (#4171)
Terry Burton [Tue, 3 Aug 2021 21:16:46 +0000 (22:16 +0100)] 
MySQL sqlippool SP: Run as invoker, not definer; close transaction on error (#4171)

In MariaDB/MySQL, stored procedures default to running in the context of
the definer rather than the invoker.

This is a problem in a streaming replication scenario since the definer
is often the root user who has the "super" power to write to a read-only
database (unless super-read-only is enabled, which is not available for
MariaDB), thus breaking the replication timeline.

Additionally, exiting an SP does not finalise any running transaction.
If an exception is raised within the SP (e.g. due to the database being
read-only) we must handle this and finalise the transaction, otherwise
subsequent calls to "SET TRANSACTION ISOLATION LEVEL READ COMMITTED"
will fail ad nauseam until the connection is finally closed.

4 years agoset extra=0 only when min=max. Fixes #4163
Alan T. DeKok [Thu, 29 Jul 2021 13:53:45 +0000 (09:53 -0400)] 
set extra=0 only when min=max.  Fixes #4163

4 years agotypo
Alan T. DeKok [Thu, 29 Jul 2021 11:57:58 +0000 (07:57 -0400)] 
typo

4 years agoformatting, and make it more consistent
Alan T. DeKok [Thu, 29 Jul 2021 10:59:49 +0000 (06:59 -0400)] 
formatting, and make it more consistent

4 years agoFix unnecessary periodic close/open in connection pools (#4161)
Masamichi Hosoda [Thu, 29 Jul 2021 10:57:09 +0000 (19:57 +0900)] 
Fix unnecessary periodic close/open in connection pools (#4161)

When "min" and "max" values of the connection pool setting were the same,
periodic connection closing and opening occurred.
It was different from the closing caused
"uses", "lifetime", and "idle_timeout" settings.
"spare" setting is not helpful since it is capped to zero
by "min" and "max" are the same.

The behavior of the issue is as follows.
When the number of connections was "max" and there was an idol connection,
it was closed without checking "min".
Then, the number of connections dropped below "min" due to the close.
Therefore, a new connection was opened immediately
and the number of connections reached "max"
since "min" and "max" were the same.
These occurred repeatedly.
So periodic close/open happened.

This commit fixes the issue
by adding the "min" check to prevent unnecessary closing connections.

4 years agoFix idle_timeout (#4155)
Masamichi Hosoda [Wed, 28 Jul 2021 23:30:43 +0000 (08:30 +0900)] 
Fix idle_timeout (#4155)

fr_pool_connection_release() recorded connection's last_reserved time
instead of last_released.
Since the last_released time of the connection was not updated,
the starting point of the idle_timeout was
always the connection opened time instead of the connection released time.

This commit fixes it.

4 years agoFix connection_check (#4154)
Masamichi Hosoda [Wed, 28 Jul 2021 19:14:18 +0000 (04:14 +0900)] 
Fix connection_check (#4154)

connection_check() in pool.c did not work
if more than 1 second has passed since the start of radiusd.
This commit makes the function works
as long as more than 1 second has passed since the last time it did work
by fixing a comparison operator.

4 years agov4: Convert %(unbound: ) to new xlat API (#4122)
Nick Porter [Wed, 21 Jul 2021 20:46:34 +0000 (21:46 +0100)] 
v4: Convert %(unbound: ) to new xlat API (#4122)

* Remove un-needed char[] variables

* Define and initialise thread specific data for rlm_unbound

* Define xlat thread data for unbound

* Initialise unbound xlat thread data

* Add unbound_request_t to hold state of running unbound request

* Define xlat_unbound_callback() to be called when unbound event completes

* Define unbound xlat resume callback

* Define xlat_unbound_signal() for cancelling unbound requests

* Define new generic unbound xlat

* Remove old unbound xlats

* Remove un-used items from module inst and un-needed instantiate / detach

* Remove unused rrlabels_tostr()

Parsing of DNS labels done by functions from util/dns.c

* Remove un-used ub_common_fail()

* Add test for rlm_unbound

* Amend docs for unbound xlat

* Remove old unbound callback

* Remove un-used ub_common_wait()

* Always inform unbound when its timeout event happens

This is used for unbound to maintain its statistics about
rtt for given servers.

* Remove unused code

* Add timeout for unbound calls

The timeouts within unbound itself are on individual network calls.
This is our overall timeout on the whole resolution.

* Add resolvconf and hosts options to rlm_unbound

resolvconf - file name of a resolv.conf file to load
hosts - file name of a hosts file to load

* Add destructor for unbound_request_t to cancel pending requests

* Temporarily disable test which trips bug in libunbound

* Ensure ub_cancel() is not called after the request is completed

4 years agoRemove remaining from heap_cycle() (#4149)
James Jones [Wed, 21 Jul 2021 20:45:08 +0000 (15:45 -0500)] 
Remove remaining from heap_cycle() (#4149)

heap_cycle() calloc()s an array and frees it, but never uses it.

4 years agoFix other uses of TLS-Cert
Arran Cudbard-Bell [Wed, 21 Jul 2021 20:44:43 +0000 (15:44 -0500)] 
Fix other uses of TLS-Cert

4 years agoAdd simple fr_pair_debug function
Arran Cudbard-Bell [Wed, 21 Jul 2021 19:56:13 +0000 (14:56 -0500)] 
Add simple fr_pair_debug function

4 years agoDon't access data union if it's a structural attribute
Arran Cudbard-Bell [Wed, 21 Jul 2021 19:52:12 +0000 (14:52 -0500)] 
Don't access data union if it's a structural attribute

4 years agoDon't use abbreviations in attribute names
Arran Cudbard-Bell [Wed, 21 Jul 2021 19:09:35 +0000 (14:09 -0500)] 
Don't use abbreviations in attribute names

Fix trailing \0 in OID -> Attr conversion

4 years agoFix test
Arran Cudbard-Bell [Mon, 19 Jul 2021 22:18:50 +0000 (17:18 -0500)] 
Fix test

4 years agoPopulate randle request pointer
Arran Cudbard-Bell [Mon, 19 Jul 2021 21:56:07 +0000 (16:56 -0500)] 
Populate randle request pointer

4 years agoPull URI escaping code into util library
Arran Cudbard-Bell [Mon, 19 Jul 2021 21:23:54 +0000 (16:23 -0500)] 
Pull URI escaping code into util library

We'll likely need this for utilities at some point

4 years agoFix comments for auth password logging. (#4135)
Thomas Faller [Mon, 19 Jul 2021 19:45:13 +0000 (19:45 +0000)] 
Fix comments for auth password logging. (#4135)

5 years agoany better?
Arran Cudbard-Bell [Thu, 15 Jul 2021 18:16:29 +0000 (13:16 -0500)] 
any better?

5 years agoFix close condition
Arran Cudbard-Bell [Thu, 15 Jul 2021 18:11:56 +0000 (13:11 -0500)] 
Fix close condition

5 years agoBetter one one line
Arran Cudbard-Bell [Thu, 15 Jul 2021 13:47:26 +0000 (08:47 -0500)] 
Better one one line

5 years ago'close' job does this better
Matthew Newton [Thu, 15 Jul 2021 08:57:25 +0000 (09:57 +0100)] 
'close' job does this better

5 years agov4: Define arguments for %(rest: ) xlat and parse / escape URIs (#4127)
Nick Porter [Thu, 15 Jul 2021 02:12:22 +0000 (03:12 +0100)] 
v4: Define arguments for %(rest: ) xlat and parse / escape URIs (#4127)

* Define args for rest xlat

* Define xlat_uri_part_t - for defining parts of URIs for parsing

* Add xlat_parse_uri() to parse defined URI structures.

* Define url_part_escape() to escape part of a URI

* Define rest_uri_parts

* Update rest_xlat() to parse inbound boxes and escape tainted values

* Update syntax for %(rest: ) tests

* Add tests using inbound data for other parts of a rest URI

* Update documentation for %(rest: )

* Ensure we "exdent" before returning

* Add additional test cases for %(rest: )

* Make sure test web server handles different paths correctly

5 years agoMake it clear what log output we want
Arran Cudbard-Bell [Thu, 15 Jul 2021 02:06:56 +0000 (21:06 -0500)] 
Make it clear what log output we want

5 years agoAdd client log output section
Arran Cudbard-Bell [Thu, 15 Jul 2021 01:48:50 +0000 (20:48 -0500)] 
Add client log output section

5 years agoMinor tweaks
Arran Cudbard-Bell [Wed, 14 Jul 2021 17:42:02 +0000 (12:42 -0500)] 
Minor tweaks

5 years agoMailto links don't work
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:59:15 +0000 (10:59 -0500)] 
Mailto links don't work

5 years agoAdd security@freeradius.org link
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:58:11 +0000 (10:58 -0500)] 
Add security@freeradius.org  link

5 years agoFix link to bug report
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:44:21 +0000 (10:44 -0500)] 
Fix link to bug report

5 years agoComma
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:40:48 +0000 (10:40 -0500)] 
Comma

5 years agoUpdate instructions
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:38:55 +0000 (10:38 -0500)] 
Update instructions

5 years agoTry adding line breaks...
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:37:55 +0000 (10:37 -0500)] 
Try adding line breaks...

5 years agoSee if we can formalise the "other" issue template more
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:37:04 +0000 (10:37 -0500)] 
See if we can formalise the "other" issue template more

5 years agoUse the correct label
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:28:53 +0000 (10:28 -0500)] 
Use the correct label

5 years agoFix required tags
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:26:41 +0000 (10:26 -0500)] 
Fix required tags

5 years agoMultiline placeholders don't work
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:25:59 +0000 (10:25 -0500)] 
Multiline placeholders don't work

5 years agoAdd more placeholder text
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:21:47 +0000 (10:21 -0500)] 
Add more placeholder text

5 years agoand another
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:16:21 +0000 (10:16 -0500)] 
and another

5 years agoFix typo
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:15:27 +0000 (10:15 -0500)] 
Fix typo

5 years agoUpdate and rename bug_report.md to bug_report.yml
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:14:41 +0000 (10:14 -0500)] 
Update and rename bug_report.md to bug_report.yml

5 years agos/tag/label
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:02:47 +0000 (10:02 -0500)] 
s/tag/label

5 years agoUse the close tag here too
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:01:31 +0000 (10:01 -0500)] 
Use the close tag here too

5 years agoWe might actually want "other" for something
Arran Cudbard-Bell [Wed, 14 Jul 2021 15:00:46 +0000 (10:00 -0500)] 
We might actually want "other" for something

5 years agoStill give users a chance to open an issue if they actually read the issue text
Arran Cudbard-Bell [Wed, 14 Jul 2021 14:59:32 +0000 (09:59 -0500)] 
Still give users a chance to open an issue if they actually read the issue text

5 years agoTry checking labels instead
Arran Cudbard-Bell [Wed, 14 Jul 2021 14:52:02 +0000 (09:52 -0500)] 
Try checking labels instead

5 years agoProvide more helpful links, make formatting more consistent
Arran Cudbard-Bell [Wed, 14 Jul 2021 14:44:41 +0000 (09:44 -0500)] 
Provide more helpful links, make formatting more consistent

5 years agoSimplify issue links
Arran Cudbard-Bell [Wed, 14 Jul 2021 14:33:53 +0000 (09:33 -0500)] 
Simplify issue links

5 years agoCreate close.yml
Arran Cudbard-Bell [Wed, 14 Jul 2021 14:28:05 +0000 (09:28 -0500)] 
Create close.yml

5 years agoAdd coccinelle semanthic patch mechanism (#3240)
Jorge Pereira [Tue, 13 Jul 2021 14:08:48 +0000 (11:08 -0300)] 
Add coccinelle semanthic patch mechanism (#3240)

It adds the new targets:

make coccinelle.help  - Print this
make coccinelle.clean - Clean up the build/coccinelle
make coccinelle.diff  - Print diffs for files which would be changed by coccinelle.patch
make coccinelle.patch - Apply Coccinelle patches to all source files in the tree.

5 years agomanual port of ee32f2e9b
Alan T. DeKok [Tue, 13 Jul 2021 12:06:37 +0000 (08:06 -0400)] 
manual port of ee32f2e9b

5 years agoRemoved the ability to pass NULL as data argument to fr_heap_extract(). (#4136)
James Jones [Tue, 13 Jul 2021 11:38:18 +0000 (06:38 -0500)] 
Removed the ability to pass NULL as data argument to fr_heap_extract(). (#4136)

It was set up to return fr_heap_pop() if passed NULL, but the only
users of that capability were in heap test code.