]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agodoc: add letsencrypt howto
Matthew Newton [Wed, 31 Jan 2024 17:43:30 +0000 (17:43 +0000)] 
doc: add letsencrypt howto

2 years agodoc: unlang nav case consistency
Matthew Newton [Tue, 30 Jan 2024 18:33:48 +0000 (18:33 +0000)] 
doc: unlang nav case consistency

2 years agodoc: local variables are not keywords
Matthew Newton [Tue, 30 Jan 2024 18:33:04 +0000 (18:33 +0000)] 
doc: local variables are not keywords

2 years agodoc: fix some antora issues
Matthew Newton [Tue, 30 Jan 2024 17:34:40 +0000 (17:34 +0000)] 
doc: fix some antora issues

2 years agohoist checks for EWOULDBLOCK into function calling read()
Alan T. DeKok [Wed, 31 Jan 2024 15:56:35 +0000 (10:56 -0500)] 
hoist checks for EWOULDBLOCK into function calling read()

2 years agocall _exit() when checking if a debugger is attached.
Alan T. DeKok [Wed, 31 Jan 2024 15:20:19 +0000 (10:20 -0500)] 
call _exit() when checking if a debugger is attached.

Callng exit() not only calls all of the atexit() handlers,
which we don't need for a temporary, throw-away child process,
it also causes many pages to be written to unnecessarily.  Which
causes them to be cloned (due to copy on write), and then the
pages are immediately thrown away.

2 years agoadd asserts
Alan T. DeKok [Wed, 31 Jan 2024 02:49:45 +0000 (21:49 -0500)] 
add asserts

2 years agodelay reading dictionaries until after setting up debug state
Alan T. DeKok [Wed, 31 Jan 2024 14:06:31 +0000 (09:06 -0500)] 
delay reading dictionaries until after setting up debug state

On Linux, fr_get_debug_state() calls fork() to get debugging
status.  It then calls exit(), which calls the atexit() handlers,
which complain that memory isn't cleaned up.

We hoist those checks to above the "read dictionary" call, so that
the atexit() handlers won't trigger.

2 years agoprint system error, not fr_strerror()
Alan T. DeKok [Tue, 30 Jan 2024 22:48:12 +0000 (17:48 -0500)] 
print system error, not fr_strerror()

we also likely need a simple way to say "please close this socket",
other than just returning "socket failed"

2 years agohoist TLS cleanup to before mainconfig cleanup
Alan T. DeKok [Tue, 30 Jan 2024 21:05:41 +0000 (16:05 -0500)] 
hoist TLS cleanup to before mainconfig cleanup

2 years agoadd and use TEST_FINI for acutest
Alan T. DeKok [Tue, 30 Jan 2024 21:03:43 +0000 (16:03 -0500)] 
add and use TEST_FINI for acutest

so that the dictionaries are cleaned up when we exit.

This commit also removes the use of constructors.  While this
change makes the tests slower, we do need everything to be cleaned
up on exit, to avoid errors

2 years agocall request_global_free() after request_global_init()
Alan T. DeKok [Tue, 30 Jan 2024 17:46:13 +0000 (12:46 -0500)] 
call request_global_free() after request_global_init()

2 years agoadd prototype to correct file
Alan T. DeKok [Tue, 30 Jan 2024 15:49:03 +0000 (10:49 -0500)] 
add prototype to correct file

2 years agoadd and use fr_tls_dict_free()
Alan T. DeKok [Tue, 30 Jan 2024 15:11:43 +0000 (10:11 -0500)] 
add and use fr_tls_dict_free()

separate the instance_count for OpenSSL and TLS.

If OpenSSL init doesn't call fr_tls_dict_init(), it shouldn't
call autofree for the tls dict

2 years agoCall dict->proto->free() if we called dict->proto->init()
Alan T. DeKok [Tue, 30 Jan 2024 14:47:53 +0000 (09:47 -0500)] 
Call dict->proto->free() if we called dict->proto->init()

With some complete magic

2 years agoclarify debug text
Alan T. DeKok [Tue, 30 Jan 2024 14:27:59 +0000 (09:27 -0500)] 
clarify debug text

2 years agonope. Back out changes until we fix it
Alan T. DeKok [Tue, 30 Jan 2024 14:04:01 +0000 (09:04 -0500)] 
nope.  Back out changes until we fix it

2 years agoremove extraneous assert
Alan T. DeKok [Tue, 30 Jan 2024 13:47:30 +0000 (08:47 -0500)] 
remove extraneous assert

2 years agocall the proto init() routine from finalize()
Alan T. DeKok [Tue, 30 Jan 2024 12:58:50 +0000 (07:58 -0500)] 
call the proto init() routine from finalize()

so that we can apply fixups, and load any foreign dictionaries.

2 years agoquiet compiler
Alan T. DeKok [Tue, 30 Jan 2024 11:55:08 +0000 (06:55 -0500)] 
quiet compiler

2 years agoThere may already be a packet in the buffer. Helps with #5286
Alan T. DeKok [Tue, 30 Jan 2024 11:49:09 +0000 (06:49 -0500)] 
There may already be a packet in the buffer.  Helps with #5286

2 years agoreset dict_gctx if necessary
Alan T. DeKok [Mon, 29 Jan 2024 20:54:51 +0000 (15:54 -0500)] 
reset dict_gctx if necessary

fr_dict_global_ctx_init() sets dict_gctx, so we need
to clean it up if fr_dict_global_ctx_free() is called

2 years agohandle EWOULDBLOCK. Helps with #5286
Alan T. DeKok [Mon, 29 Jan 2024 19:52:03 +0000 (14:52 -0500)] 
handle EWOULDBLOCK.  Helps with #5286

2 years agoset accept FD to be non blocking. Helps with #5286
Alan T. DeKok [Mon, 29 Jan 2024 19:45:46 +0000 (14:45 -0500)] 
set accept FD to be non blocking.  Helps with #5286

2 years agodisable until we fix loading dictionaries with loops
Alan T. DeKok [Mon, 29 Jan 2024 19:41:20 +0000 (14:41 -0500)] 
disable until we fix loading dictionaries with loops

2 years agonarrow down the checks
Alan T. DeKok [Mon, 29 Jan 2024 19:39:14 +0000 (14:39 -0500)] 
narrow down the checks

2 years agomore checks on init / free
Alan T. DeKok [Mon, 29 Jan 2024 13:50:52 +0000 (08:50 -0500)] 
more checks on init / free

on init, we increment the ref count _before_ autoloading the
dictionaries.  That way if the function is called recursively,
(as when dictionaries reference each other), nothing is done.

On free, assert that the reference count is >0

2 years agoassert that the dictionaries are initialized
Alan T. DeKok [Mon, 29 Jan 2024 13:19:31 +0000 (08:19 -0500)] 
assert that the dictionaries are initialized

2 years agoPacify coverity (CID #1587346)
Nick Porter [Mon, 29 Jan 2024 17:33:10 +0000 (17:33 +0000)] 
Pacify coverity (CID #1587346)

2 years agoAllow request to be optional in PostgreSQL escape function
Nick Porter [Mon, 29 Jan 2024 16:48:24 +0000 (16:48 +0000)] 
Allow request to be optional in PostgreSQL escape function

2 years agoUse correct SQLite syntax for id column to reference ROWID
Nick Porter [Mon, 29 Jan 2024 16:47:42 +0000 (16:47 +0000)] 
Use correct SQLite syntax for id column to reference ROWID

2 years agoadded foreign decode to DHCPv6 and tests
Alan T. DeKok [Sun, 28 Jan 2024 22:17:18 +0000 (17:17 -0500)] 
added foreign decode to DHCPv6 and tests

2 years agojust return on error on TLV decode
Alan T. DeKok [Sun, 28 Jan 2024 21:09:35 +0000 (16:09 -0500)] 
just return on error on TLV decode

2 years agocheck slen
Alan T. DeKok [Sun, 28 Jan 2024 17:21:17 +0000 (12:21 -0500)] 
check slen

2 years agoremove unnecessary comment
Alan T. DeKok [Sun, 28 Jan 2024 17:16:58 +0000 (12:16 -0500)] 
remove unnecessary comment

2 years agoadd foreign encoder to DHCPv6
Alan T. DeKok [Sun, 28 Jan 2024 17:06:40 +0000 (12:06 -0500)] 
add foreign encoder to DHCPv6

update dictionaries and tests

2 years agouse consistent names
Alan T. DeKok [Sun, 28 Jan 2024 16:57:10 +0000 (11:57 -0500)] 
use consistent names

2 years agodon't modify slen on return
Alan T. DeKok [Sun, 28 Jan 2024 16:49:56 +0000 (11:49 -0500)] 
don't modify slen on return

2 years agohoist encode foreign ref to common function
Alan T. DeKok [Sun, 28 Jan 2024 16:37:58 +0000 (11:37 -0500)] 
hoist encode foreign ref to common function

2 years agoset ref correctly. don't set it to itself :(
Alan T. DeKok [Sun, 28 Jan 2024 16:37:28 +0000 (11:37 -0500)] 
set ref correctly.  don't set it to itself :(

and don't over-ride the current dictionary

2 years agoadd foreign handlers for DHCPv6
Alan T. DeKok [Sun, 28 Jan 2024 16:22:37 +0000 (11:22 -0500)] 
add foreign handlers for DHCPv6

2 years agothis attribute encodes other DHCPv6 options, not TLVs
Alan T. DeKok [Sun, 28 Jan 2024 16:21:17 +0000 (11:21 -0500)] 
this attribute encodes other DHCPv6 options, not TLVs

2 years agoupdate test for code changes
Alan T. DeKok [Sun, 28 Jan 2024 15:26:14 +0000 (10:26 -0500)] 
update test for code changes

2 years agoslen maybe SSIZE_MIN :(
Alan T. DeKok [Sun, 28 Jan 2024 15:12:31 +0000 (10:12 -0500)] 
slen maybe SSIZE_MIN :(

2 years agoprint actual reasons
Alan T. DeKok [Sun, 28 Jan 2024 14:54:06 +0000 (09:54 -0500)] 
print actual reasons

2 years agoclean up corner cases for decoder as found by fuzzer
Alan T. DeKok [Sun, 28 Jan 2024 14:53:44 +0000 (09:53 -0500)] 
clean up corner cases for decoder as found by fuzzer

2 years agojust return on error on TLV decode
Alan T. DeKok [Sun, 28 Jan 2024 14:46:22 +0000 (09:46 -0500)] 
just return on error on TLV decode

2 years agodhcp attributes can have zeeo length
Alan T. DeKok [Sun, 28 Jan 2024 14:20:52 +0000 (09:20 -0500)] 
dhcp attributes can have zeeo length

2 years agouse thread-local buffer for decoding
Alan T. DeKok [Sat, 27 Jan 2024 21:41:32 +0000 (16:41 -0500)] 
use thread-local buffer for decoding

to save on heap memory allocation

2 years agochange scope of variable
Alan T. DeKok [Sat, 27 Jan 2024 20:58:22 +0000 (15:58 -0500)] 
change scope of variable

2 years agouse tmp_ctx for decoding, not decode_ctx
Alan T. DeKok [Sat, 27 Jan 2024 16:38:20 +0000 (11:38 -0500)] 
use tmp_ctx for decoding, not decode_ctx

2 years agoadd fragmentation for encoding VSAs
Alan T. DeKok [Sat, 27 Jan 2024 15:53:16 +0000 (10:53 -0500)] 
add fragmentation for encoding VSAs

2 years agoencode groups for VSAs
Alan T. DeKok [Sat, 27 Jan 2024 14:52:18 +0000 (09:52 -0500)] 
encode groups for VSAs

update the dictionaries, and the tests

2 years agoRevert "disable until we figure out why it passes locally but not in CI"
Alan T. DeKok [Sat, 27 Jan 2024 14:30:39 +0000 (09:30 -0500)] 
Revert "disable until we figure out why it passes locally but not in CI"

This reverts commit 7aa50d26d3a963509f3f08ba80385b2e0ed55b17.

2 years agomash protocol names to lowercase
Alan T. DeKok [Sat, 27 Jan 2024 14:47:34 +0000 (09:47 -0500)] 
mash protocol names to lowercase

the names in the dictionaries are case insensitive, but the
file names are lowercase.

2 years agodon't overwrite the upstream error message
Alan T. DeKok [Sat, 27 Jan 2024 14:29:44 +0000 (09:29 -0500)] 
don't overwrite the upstream error message

2 years agoensure the list is freed
Alan T. DeKok [Sat, 27 Jan 2024 13:31:01 +0000 (08:31 -0500)] 
ensure the list is freed

2 years agoVP isn't used
Alan T. DeKok [Fri, 26 Jan 2024 22:11:58 +0000 (17:11 -0500)] 
VP isn't used

2 years agodisable until we figure out why it passes locally but not in CI
Alan T. DeKok [Fri, 26 Jan 2024 21:55:02 +0000 (16:55 -0500)] 
disable until we figure out why it passes locally but not in CI

2 years agoclean up corner case for loading name
Alan T. DeKok [Fri, 26 Jan 2024 21:46:13 +0000 (16:46 -0500)] 
clean up corner case for loading name

2 years agoreturn NULL on error
Alan T. DeKok [Fri, 26 Jan 2024 21:28:20 +0000 (16:28 -0500)] 
return NULL on error

2 years agoadd init/free to fr_dict_protocol_t
Alan T. DeKok [Fri, 26 Jan 2024 21:14:53 +0000 (16:14 -0500)] 
add init/free to fr_dict_protocol_t

and call them for autoref dictionaries

2 years agomove encode_group to its own function
Alan T. DeKok [Fri, 26 Jan 2024 21:14:28 +0000 (16:14 -0500)] 
move encode_group to its own function

so that we can re-use it for VSAs

2 years agoadd foreign decoder for RADIUS and DHCPv4
Alan T. DeKok [Fri, 26 Jan 2024 16:35:16 +0000 (11:35 -0500)] 
add foreign decoder for RADIUS and DHCPv4

2 years agoadd note on how to handle ALIAS
Alan T. DeKok [Fri, 26 Jan 2024 16:34:41 +0000 (11:34 -0500)] 
add note on how to handle ALIAS

which "jumps ahead" in the tree

2 years agoremove limitation which isn't needed
Alan T. DeKok [Fri, 26 Jan 2024 15:06:32 +0000 (10:06 -0500)] 
remove limitation which isn't needed

2 years agocorrectly handle inter-dictionary dependencies.
Alan T. DeKok [Fri, 26 Jan 2024 13:54:24 +0000 (08:54 -0500)] 
correctly handle inter-dictionary dependencies.

when adding them, make the "next" one depend on the one which
loaded it.  Then add the "next" one to the autofree list for the
current dictionary.

When freeing the global context, walk through all of the
dictionaries and free the autoref references first. Then walk through
them again, freeing the externally loaded references.

2 years agoencode foreign references
Alan T. DeKok [Fri, 26 Jan 2024 03:04:20 +0000 (22:04 -0500)] 
encode foreign references

2 years agomake tag limitations more narrow
Alan T. DeKok [Fri, 26 Jan 2024 15:07:43 +0000 (10:07 -0500)] 
make tag limitations more narrow

in preparation for adding groups

2 years agoallow encoding for foreign options
Alan T. DeKok [Fri, 26 Jan 2024 02:59:57 +0000 (21:59 -0500)] 
allow encoding for foreign options

2 years agoexport fr_dict_protocol_t
Alan T. DeKok [Fri, 26 Jan 2024 02:48:35 +0000 (21:48 -0500)] 
export fr_dict_protocol_t

2 years agoencode functions take a "const" list
Alan T. DeKok [Fri, 26 Jan 2024 02:25:08 +0000 (21:25 -0500)] 
encode functions take a "const" list

2 years agoRemove unneeded headers
Nick Porter [Wed, 24 Jan 2024 13:56:09 +0000 (13:56 +0000)] 
Remove unneeded headers

2 years agoRemove unused module option
Nick Porter [Mon, 22 Jan 2024 19:34:45 +0000 (19:34 +0000)] 
Remove unused module option

2 years agoAlign sqlippool behaviour with redis_ippool
Nick Porter [Mon, 22 Jan 2024 13:55:44 +0000 (13:55 +0000)] 
Align sqlippool behaviour with redis_ippool

by updating `gateway` on each address update.

2 years agosqlippool_queries don't use SQL-User-Name attribute, so don't create it
Nick Porter [Mon, 22 Jan 2024 12:31:00 +0000 (12:31 +0000)] 
sqlippool_queries don't use SQL-User-Name attribute, so don't create it

2 years agoMore appropriate debug messages
Nick Porter [Fri, 19 Jan 2024 17:47:40 +0000 (17:47 +0000)] 
More appropriate debug messages

2 years agoRemove un-used pool_name
Nick Porter [Fri, 19 Jan 2024 16:58:02 +0000 (16:58 +0000)] 
Remove un-used pool_name

2 years agoMore tidying up of sqlippool method names
Nick Porter [Fri, 19 Jan 2024 16:15:34 +0000 (16:15 +0000)] 
More tidying up of sqlippool method names

2 years agoReplace mod_accounting with named methods
Nick Porter [Fri, 19 Jan 2024 16:14:07 +0000 (16:14 +0000)] 
Replace mod_accounting with named methods

2 years agoBump github cache action version for newer node.js
Nick Porter [Fri, 26 Jan 2024 08:03:19 +0000 (08:03 +0000)] 
Bump github cache action version for newer node.js

2 years agoVarious fixes
Arran Cudbard-Bell [Fri, 26 Jan 2024 02:04:04 +0000 (20:04 -0600)] 
Various fixes

2 years agoFix redundant declarations
Arran Cudbard-Bell [Fri, 26 Jan 2024 01:02:06 +0000 (19:02 -0600)] 
Fix redundant declarations

2 years agoReplace vb->safe with vb->safe_for
Arran Cudbard-Bell [Fri, 26 Jan 2024 00:19:33 +0000 (18:19 -0600)] 
Replace vb->safe with vb->safe_for

This is usually a pointer to a function used for escaping.  This is still only partially integrated and requires more work.

2 years agoMove instantiation functions in rlm_sql
Arran Cudbard-Bell [Fri, 26 Jan 2024 00:05:24 +0000 (18:05 -0600)] 
Move instantiation functions in rlm_sql

2 years agoMove fr_assert() check of mutex-guarded data after the lock (CID #1587069)
James Jones [Thu, 25 Jan 2024 21:56:41 +0000 (15:56 -0600)] 
Move fr_assert() check of mutex-guarded data after the lock (CID #1587069)

2 years agoFix typos in src
Dimitri Papadopoulos [Thu, 25 Jan 2024 21:52:09 +0000 (22:52 +0100)] 
Fix typos in src

Misspellings found by codespell.

2 years agoUpdate GitHub Actions
Dimitri Papadopoulos [Thu, 25 Jan 2024 22:21:21 +0000 (23:21 +0100)] 
Update GitHub Actions

This should fix this warning:

FreeBSD build

Node.js 16 actions are deprecated. Please update the following
actions to use Node.js 20: actions/checkout@v3, actions/cache@v3,
cross-platform-actions/action@v0.21.0. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

2 years agoMake foreign dictionary references work.
Alan T. DeKok [Thu, 25 Jan 2024 22:08:33 +0000 (17:08 -0500)] 
Make foreign dictionary references work.

2 years agotypo
Alan T. DeKok [Thu, 25 Jan 2024 17:14:43 +0000 (12:14 -0500)] 
typo

2 years agoFix typos in debian
Dimitri Papadopoulos [Thu, 25 Jan 2024 22:07:17 +0000 (23:07 +0100)] 
Fix typos in debian

Misspellings found by codespell.

2 years agoFix typos in doc
Dimitri Papadopoulos [Thu, 25 Jan 2024 22:03:11 +0000 (23:03 +0100)] 
Fix typos in doc

Misspellings found by codespell.

2 years agoFix typos in scripts
Dimitri Papadopoulos [Thu, 25 Jan 2024 21:58:06 +0000 (22:58 +0100)] 
Fix typos in scripts

Misspellings found by codespell.

2 years agoCorrect auth vector reference
Nick Porter [Thu, 25 Jan 2024 20:55:39 +0000 (20:55 +0000)] 
Correct auth vector reference

2 years agoHandle coverity defects in do_xlats() error messages (CID #1533664)
James Jones [Tue, 26 Sep 2023 20:26:11 +0000 (15:26 -0500)] 
Handle coverity defects in do_xlats() error messages (CID #1533664)

2 years agoHoist remaining locks after tests of fr_io_client ht (CIDs below)
James Jones [Tue, 21 Nov 2023 15:56:51 +0000 (09:56 -0600)] 
Hoist remaining locks after tests of fr_io_client ht (CIDs below)

CIDS: 155170615517031551699

2 years agomutexes near returns (CID #1551697, #1551698)
James Jones [Wed, 22 Nov 2023 18:56:30 +0000 (12:56 -0600)] 
mutexes near returns (CID #1551697, #1551698)

1551697 Guard reference to is_exiting if HAVE_PTHREADS defined
1551698 Annotate leaving exfiles opened for exclusive use locked

2 years agoAdd needed lock/unlock to access t->inst->list (CID 1551705)
James Jones [Mon, 22 Jan 2024 22:36:16 +0000 (16:36 -0600)] 
Add needed lock/unlock to access t->inst->list (CID 1551705)

2 years agoChange redhat similarly to debian
Dimitri Papadopoulos [Mon, 25 Dec 2023 15:53:34 +0000 (16:53 +0100)] 
Change redhat similarly to debian

2 years agoAddress ssues raised durign review
Dimitri Papadopoulos [Mon, 25 Dec 2023 15:48:09 +0000 (16:48 +0100)] 
Address ssues raised durign review