]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoif there's no error() callback, print out why the socket was closed
Alan T. DeKok [Tue, 21 Feb 2023 19:37:27 +0000 (14:37 -0500)] 
if there's no error() callback, print out why the socket was closed

2 years agoStart of documentation on creating and debugging complex policies.
Alan T. DeKok [Tue, 21 Feb 2023 19:16:30 +0000 (14:16 -0500)] 
Start of documentation on creating and debugging complex policies.

2 years agomore debug when we close connections
Alan T. DeKok [Tue, 21 Feb 2023 17:24:44 +0000 (12:24 -0500)] 
more debug when we close connections

2 years agoallow MEMBERS to use "enum=..." for any leaf type
Alan T. DeKok [Tue, 21 Feb 2023 14:20:33 +0000 (09:20 -0500)] 
allow MEMBERS to use "enum=..." for any leaf type

we rely on the rest of the code to do type / whatever sanity checks
there's no need to duplicate them.

2 years agoI wish compilers would give consistent error messages
Alan T. DeKok [Tue, 21 Feb 2023 02:22:18 +0000 (21:22 -0500)] 
I wish compilers would give consistent error messages

2 years agocheck for nested BEGIN-VENDOR among other sanity checks
Alan T. DeKok [Tue, 21 Feb 2023 01:57:46 +0000 (20:57 -0500)] 
check for nested BEGIN-VENDOR among other sanity checks

2 years agoadd final dictionary keywords
Alan T. DeKok [Tue, 21 Feb 2023 01:56:39 +0000 (20:56 -0500)] 
add final dictionary keywords

2 years agorequests are odd, replies are even
Alan T. DeKok [Mon, 20 Feb 2023 22:20:14 +0000 (17:20 -0500)] 
requests are odd, replies are even

2 years agoxlat: Make xlat debug work for nodes again
Arran Cudbard-Bell [Mon, 20 Feb 2023 18:35:21 +0000 (12:35 -0600)] 
xlat: Make xlat debug work for nodes again

...like it was originally intended to be used for

2 years agodocument and clean up "enum=" and "clone="
Alan T. DeKok [Mon, 20 Feb 2023 20:40:48 +0000 (15:40 -0500)] 
document and clean up "enum=" and "clone="

"enum" is for copying values.

"clone" is for copying TLV and STRUCT types

2 years agoencode / decode as nested attributes
Alan T. DeKok [Mon, 20 Feb 2023 20:24:41 +0000 (15:24 -0500)] 
encode / decode as nested attributes

2 years agoFree slab element at the correct place
Nick Porter [Mon, 20 Feb 2023 17:40:32 +0000 (17:40 +0000)] 
Free slab element at the correct place

2 years agoxlat: Formatting
Arran Cudbard-Bell [Mon, 20 Feb 2023 14:48:35 +0000 (08:48 -0600)] 
xlat: Formatting

2 years agoUse talloc_get_type_abort_const() for const variable
Nick Porter [Mon, 20 Feb 2023 10:51:52 +0000 (10:51 +0000)] 
Use talloc_get_type_abort_const() for const variable

2 years agoUse unsigned int to match returned type
Nick Porter [Mon, 20 Feb 2023 09:52:39 +0000 (09:52 +0000)] 
Use unsigned int to match returned type

2 years agoxlat: Fix inverted args
Arran Cudbard-Bell [Sun, 19 Feb 2023 23:26:49 +0000 (17:26 -0600)] 
xlat: Fix inverted args

2 years agoxlat: constify talloc chunk checks
Arran Cudbard-Bell [Sun, 19 Feb 2023 23:19:11 +0000 (17:19 -0600)] 
xlat: constify talloc chunk checks

2 years agoxlat: Quiet clang scan by ensuring print functions succeed
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:53:26 +0000 (16:53 -0600)] 
xlat: Quiet clang scan by ensuring print functions succeed

2 years agoxlat: Add new name format setting functions
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:53:26 +0000 (16:53 -0600)] 
xlat: Add new name format setting functions

We no longer copy a pointer to the buffer in boxed values as if that box is purified the fmt pointer becomes invalidated, and will cause crashes.

2 years agoxlat: Move entry to the start of the expression
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:52:25 +0000 (16:52 -0600)] 
xlat: Move entry to the start of the expression

It's generally the most efficient place to put it when we're traversing linked lists

2 years agotmpl: Fix check for an unspecified attribute
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:51:15 +0000 (16:51 -0600)] 
tmpl: Fix check for an unspecified attribute

2 years agoxlat: Move copy function to xlat_alloc.c
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:49:52 +0000 (16:49 -0600)] 
xlat: Move copy function to xlat_alloc.c

2 years agoxlat: Sprinkle verification functions around to catch invalid nodes
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:48:08 +0000 (16:48 -0600)] 
xlat: Sprinkle verification functions around to catch invalid nodes

2 years agoxlat: Formatting
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:45:59 +0000 (16:45 -0600)] 
xlat: Formatting

2 years agoxlat: Fix func docs
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:45:39 +0000 (16:45 -0600)] 
xlat: Fix func docs

2 years agoxlat: Remove ifdef'd out code
Arran Cudbard-Bell [Sun, 19 Feb 2023 22:45:20 +0000 (16:45 -0600)] 
xlat: Remove ifdef'd out code

2 years agotalloc: Add function to strdup buffers with the type set
Arran Cudbard-Bell [Sun, 19 Feb 2023 21:35:33 +0000 (15:35 -0600)] 
talloc:  Add function to strdup buffers with the type set

2 years agoxlat: Automatically alloc list heads
Arran Cudbard-Bell [Sun, 19 Feb 2023 18:18:53 +0000 (12:18 -0600)] 
xlat: Automatically alloc list heads

2 years agoFix warning in slab_tests
Arran Cudbard-Bell [Sun, 19 Feb 2023 18:17:46 +0000 (12:17 -0600)] 
Fix warning in slab_tests

2 years agotalloc: Typo in func docs
Arran Cudbard-Bell [Wed, 15 Feb 2023 14:59:06 +0000 (08:59 -0600)] 
talloc: Typo in func docs

2 years agoxlat: Integrate list allocation into node init
Arran Cudbard-Bell [Mon, 13 Feb 2023 03:35:34 +0000 (21:35 -0600)] 
xlat: Integrate list allocation into node init

2 years agoQuiet vscode
Arran Cudbard-Bell [Mon, 13 Feb 2023 02:32:29 +0000 (20:32 -0600)] 
Quiet vscode

2 years agoEnsure slab element is released on all failure paths
Nick Porter [Sat, 18 Feb 2023 19:20:25 +0000 (19:20 +0000)] 
Ensure slab element is released on all failure paths

And move error label to placate Coverity

2 years agoencode nested VENDOR
Alan T. DeKok [Sat, 18 Feb 2023 14:14:11 +0000 (09:14 -0500)] 
encode nested VENDOR

2 years agoallow encoding and decoding of VENDOR attributes in TACACS
Alan T. DeKok [Sat, 18 Feb 2023 01:38:01 +0000 (20:38 -0500)] 
allow encoding and decoding of VENDOR attributes in TACACS

right now the vendor attr has to be passed to the decode function.

The encoder should arguably be also passed a vendor, and then only
encode that vendor.  But for now it's OK

2 years agoDEFINEs in number-based protocols are always internal
Alan T. DeKok [Fri, 17 Feb 2023 23:03:57 +0000 (18:03 -0500)] 
DEFINEs in number-based protocols are always internal

2 years agoswap TACACS to 'format=string'
Alan T. DeKok [Fri, 17 Feb 2023 22:34:39 +0000 (17:34 -0500)] 
swap TACACS to 'format=string'

2 years agoallow for "format=string" for PROTOCOLs
Alan T. DeKok [Fri, 17 Feb 2023 21:28:32 +0000 (16:28 -0500)] 
allow for "format=string" for PROTOCOLs

in which case most attributes need to be created using DEFINE,
and not using ATTRIBUTE.

But VENDOR and MEMBER of STRUCT can still use number

2 years agomove all of TACACS to DEFINE
Alan T. DeKok [Fri, 17 Feb 2023 14:35:29 +0000 (09:35 -0500)] 
move all of TACACS to DEFINE

2 years agoallow DEFINE for STRUCT
Alan T. DeKok [Fri, 17 Feb 2023 14:00:56 +0000 (09:00 -0500)] 
allow DEFINE for STRUCT

2 years agoclean up uses of DEFINE
Alan T. DeKok [Fri, 17 Feb 2023 14:10:58 +0000 (09:10 -0500)] 
clean up uses of DEFINE

don't add DEFINEs to "child by num" array, as no one should ever
know about the numbers.

Don't set the "internal" flag for string-based attributes.

2 years agoonly the FLAGS keyword can modify the base flags
Alan T. DeKok [Fri, 17 Feb 2023 14:03:35 +0000 (09:03 -0500)] 
only the FLAGS keyword can modify the base flags

2 years agodecode using the correct field
Alan T. DeKok [Fri, 17 Feb 2023 13:25:52 +0000 (08:25 -0500)] 
decode using the correct field

2 years agofree hp on error, too. Fixes #4903
Alan T. DeKok [Fri, 17 Feb 2023 13:03:39 +0000 (08:03 -0500)] 
free hp on error, too.  Fixes #4903

2 years agoallow for different parent attribute when decoding arguments
Alan T. DeKok [Fri, 17 Feb 2023 03:02:06 +0000 (22:02 -0500)] 
allow for different parent attribute when decoding arguments

in preparation for allowing client-specific vendors.

2 years agoEnable IMAP tests
Nick Porter [Thu, 16 Feb 2023 13:44:39 +0000 (13:44 +0000)] 
Enable IMAP tests

2 years agoAmend imap-setup.sh to work on Docker CI runners
Nick Porter [Thu, 16 Feb 2023 14:28:48 +0000 (14:28 +0000)] 
Amend imap-setup.sh to work on Docker CI runners

2 years agoRework and tidy rlm_imap tests
Nick Porter [Thu, 16 Feb 2023 13:37:17 +0000 (13:37 +0000)] 
Rework and tidy rlm_imap tests

- Handle timeouts as success - usually due to slow CI hosts
- Add migration flag tmpl_tokenize_all_nested to access
&TLS-Certificate.Issuer
- Tidy logic for tests which expect an Access-Reject

2 years agoSet test IMAP server to respond quickly to rejects
Nick Porter [Thu, 16 Feb 2023 12:18:25 +0000 (12:18 +0000)] 
Set test IMAP server to respond quickly to rejects

Helps avoid spurious timeouts in CI tests

2 years agoAdd a sane default timeout
Nick Porter [Thu, 16 Feb 2023 12:30:57 +0000 (12:30 +0000)] 
Add a sane default timeout

2 years agoDifferentiate between login failure and module failure
Nick Porter [Thu, 16 Feb 2023 12:30:29 +0000 (12:30 +0000)] 
Differentiate between login failure and module failure

2 years agoMove setting of consistent CURL options to element initialiser
Nick Porter [Thu, 16 Feb 2023 12:29:35 +0000 (12:29 +0000)] 
Move setting of consistent CURL options to element initialiser

2 years agoUse CURL handles from slab in place of one off allocated
Nick Porter [Thu, 16 Feb 2023 12:27:46 +0000 (12:27 +0000)] 
Use CURL handles from slab in place of one off allocated

2 years agoAdd slab to rlm_imap_thead_t and initialise and free with thread
Nick Porter [Thu, 16 Feb 2023 12:25:01 +0000 (12:25 +0000)] 
Add slab to rlm_imap_thead_t and initialise and free with thread

2 years agoAdd CURL connection config to rlm_imap
Nick Porter [Thu, 16 Feb 2023 12:20:50 +0000 (12:20 +0000)] 
Add CURL connection config to rlm_imap

2 years agoSet version of python-config on MacOS
Nick Porter [Fri, 17 Feb 2023 09:40:09 +0000 (09:40 +0000)] 
Set version of python-config on MacOS

2 years agotypo
Alan T. DeKok [Fri, 17 Feb 2023 02:58:37 +0000 (21:58 -0500)] 
typo

2 years agocorrect header usage
Alan T. DeKok [Fri, 17 Feb 2023 02:43:16 +0000 (21:43 -0500)] 
correct header usage

2 years agomore updates for dictionaries.
Alan T. DeKok [Fri, 17 Feb 2023 02:43:06 +0000 (21:43 -0500)] 
more updates for dictionaries.

For now, BEGIN-FOO and END-FOO are not (yet) documented.

2 years agowe can't add VALUEs for ALIASes
Alan T. DeKok [Fri, 17 Feb 2023 00:18:38 +0000 (19:18 -0500)] 
we can't add VALUEs for ALIASes

the values should be added only for the attribute

2 years agostart of detailed dictionary documentation
Alan T. DeKok [Thu, 16 Feb 2023 21:31:45 +0000 (16:31 -0500)] 
start of detailed dictionary documentation

2 years agomark up DEFINEs as having only names, not numbers.
Alan T. DeKok [Thu, 16 Feb 2023 20:31:28 +0000 (15:31 -0500)] 
mark up DEFINEs as having only names, not numbers.

And add assertions to the internal encoder so that we don't
accidentally encode the meaningless number.  The internal encoder
should instead encode the name of the attribute.

2 years agoadd DEFINE to the dictionary formatter
Alan T. DeKok [Thu, 16 Feb 2023 02:20:13 +0000 (21:20 -0500)] 
add DEFINE to the dictionary formatter

2 years agouse consistent names
Alan T. DeKok [Wed, 15 Feb 2023 21:38:49 +0000 (16:38 -0500)] 
use consistent names

2 years agomove automatic ID allocation to parent da
Alan T. DeKok [Wed, 15 Feb 2023 21:33:33 +0000 (16:33 -0500)] 
move automatic ID allocation to parent da

where it can be used by multiple entities

2 years agoallow DEFINE, which is like ATTRIBUTE, but with no numbers
Alan T. DeKok [Wed, 15 Feb 2023 19:11:50 +0000 (14:11 -0500)] 
allow DEFINE, which is like ATTRIBUTE, but with no numbers

2 years agoAdd reserve_mru option to slab allocator
Nick Porter [Thu, 16 Feb 2023 18:18:00 +0000 (18:18 +0000)] 
Add reserve_mru option to slab allocator

With this option "true", reservations are taken from the tail of the
dlists - which is where elements are returned when freed.

This gives an approximation of MRU allocation.

2 years agoSuppress warnings about unused slab functions
Nick Porter [Thu, 16 Feb 2023 13:45:57 +0000 (13:45 +0000)] 
Suppress warnings about unused slab functions

2 years agoUse autoload da for LDAP-Sync-Base-DN
Nick Porter [Wed, 15 Feb 2023 20:16:53 +0000 (20:16 +0000)] 
Use autoload da for LDAP-Sync-Base-DN

2 years agoCI: Use specific instance of rest module to test timeout
Nick Porter [Wed, 15 Feb 2023 18:50:27 +0000 (18:50 +0000)] 
CI: Use specific instance of rest module to test timeout

Avoids slow CI hosts triggering timeouts on other tests

2 years agoRevert "remove unused dynamic client code"
Alan T. DeKok [Wed, 15 Feb 2023 17:43:16 +0000 (12:43 -0500)] 
Revert "remove unused dynamic client code"

This reverts commit fc7fac717e9188259f613f57624294b2f6c4de48.

2 years agoAdd test of rest response timeout
Nick Porter [Wed, 15 Feb 2023 10:41:13 +0000 (10:41 +0000)] 
Add test of rest response timeout

2 years agoUpdate default rest configuration to use connections rather than pool
Nick Porter [Thu, 9 Feb 2023 09:14:47 +0000 (09:14 +0000)] 
Update default rest configuration to use connections rather than pool

2 years agoUse pseudo slab element destructor to reset rest request
Nick Porter [Fri, 3 Feb 2023 17:30:45 +0000 (17:30 +0000)] 
Use pseudo slab element destructor to reset rest request

2 years agoRemove pool from rlm_rest
Nick Porter [Thu, 2 Feb 2023 10:17:29 +0000 (10:17 +0000)] 
Remove pool from rlm_rest

2 years agoUse timeout setting from the connection configuration
Nick Porter [Thu, 2 Feb 2023 10:17:03 +0000 (10:17 +0000)] 
Use timeout setting from the connection configuration

2 years agoUse connection handles from the slab rather than the pool
Nick Porter [Thu, 2 Feb 2023 10:16:35 +0000 (10:16 +0000)] 
Use connection handles from the slab rather than the pool

2 years agoInstantiate and free slab with thread
Nick Porter [Thu, 2 Feb 2023 10:06:35 +0000 (10:06 +0000)] 
Instantiate and free slab with thread

2 years agoDefine rest slab element initialisation callback
Nick Porter [Thu, 2 Feb 2023 10:04:46 +0000 (10:04 +0000)] 
Define rest slab element initialisation callback

2 years agoAdd slab to rlm_rest_thread_t
Nick Porter [Thu, 2 Feb 2023 10:03:47 +0000 (10:03 +0000)] 
Add slab to rlm_rest_thread_t

2 years agoAdd libcurl connection config to rlm_rest
Nick Porter [Mon, 13 Feb 2023 16:31:52 +0000 (16:31 +0000)] 
Add libcurl connection config to rlm_rest

2 years agoDefine and parse config for libcurl connections
Nick Porter [Thu, 2 Feb 2023 09:58:54 +0000 (09:58 +0000)] 
Define and parse config for libcurl connections

2 years agoSet a safe default for elements_per_slab
Nick Porter [Wed, 15 Feb 2023 10:15:18 +0000 (10:15 +0000)] 
Set a safe default for elements_per_slab

Typically it will often be the same as min_elements, so that is a
sensible default if the caller has not set it.

2 years agoMove slab allocator parameters into a struct
Nick Porter [Wed, 15 Feb 2023 10:09:55 +0000 (10:09 +0000)] 
Move slab allocator parameters into a struct

2 years agoallow (and test) xlat expansions in RHS leaf assignments
Alan T. DeKok [Wed, 15 Feb 2023 15:28:34 +0000 (10:28 -0500)] 
allow (and test) xlat expansions in RHS leaf assignments

2 years agoshut up stupid compilers
Alan T. DeKok [Wed, 15 Feb 2023 15:25:59 +0000 (10:25 -0500)] 
shut up stupid compilers

who don't know that variable declarations are not code, and
therefore aren't unused code.

2 years agoSet talloc type on temporary slab elements
Nick Porter [Wed, 15 Feb 2023 10:11:10 +0000 (10:11 +0000)] 
Set talloc type on temporary slab elements

2 years agoEnsure slab.h is only included once
Nick Porter [Wed, 15 Feb 2023 10:05:57 +0000 (10:05 +0000)] 
Ensure slab.h is only included once

2 years agoCI: Tidy SQL map test
Nick Porter [Wed, 15 Feb 2023 11:09:35 +0000 (11:09 +0000)] 
CI: Tidy SQL map test

2 years agoCI: Use two priority values in SQL tests to ensure row sequence
Nick Porter [Wed, 15 Feb 2023 11:08:13 +0000 (11:08 +0000)] 
CI: Use two priority values in SQL tests to ensure row sequence

Without an ORDER BY clause, there is no guarantee that records will be
retrieved in any particular sequence.

2 years agouse "buffer" which is raw data, instead of "pkt" which is a struct
Alan T. DeKok [Tue, 14 Feb 2023 22:53:46 +0000 (17:53 -0500)] 
use "buffer" which is raw data, instead of "pkt" which is a struct

If we take a pointer to the end of the struct, Coverity complains
that we're over-running the struct, even if there's lots of data
in the buffer where the struct is pointing

2 years agocheck for not found and not copied
Alan T. DeKok [Tue, 14 Feb 2023 22:45:49 +0000 (17:45 -0500)] 
check for not found and not copied

2 years agodon't include the challenge
Alan T. DeKok [Tue, 14 Feb 2023 22:41:16 +0000 (17:41 -0500)] 
don't include the challenge

2 years agoalways initialize the packet header correctly.
Alan T. DeKok [Tue, 14 Feb 2023 22:39:44 +0000 (17:39 -0500)] 
always initialize the packet header correctly.

if we're passed an original packet, set the sequence number, etc.
from the sequence number.  And don't double-skip (or not at all)
the packet header.

2 years agotry to quiet Coverity
Alan T. DeKok [Tue, 14 Feb 2023 22:14:05 +0000 (17:14 -0500)] 
try to quiet Coverity

2 years agoEnsure HTTP response code is reset between calls
Nick Porter [Tue, 14 Feb 2023 17:01:08 +0000 (17:01 +0000)] 
Ensure HTTP response code is reset between calls

2 years agoCorrect naming of slab element destructor
Nick Porter [Tue, 14 Feb 2023 17:16:37 +0000 (17:16 +0000)] 
Correct naming of slab element destructor

2 years agoWS
Nick Porter [Tue, 14 Feb 2023 17:01:27 +0000 (17:01 +0000)] 
WS

2 years agoUpload the result of preprocessing a modeling file (#4892)
James Jones [Tue, 14 Feb 2023 15:16:09 +0000 (09:16 -0600)] 
Upload the result of preprocessing a modeling file (#4892)

We can't run cov-make-library ourselves, which is the only command
that lets you say where to find header files. So, we'll preprocess
a single model file that includes whatever we choose to model the
stubs for, grouped at least by the source file they come from, each
group starting with #include directives appearing in the source file.

2 years agodepend on the process module, too
Alan T. DeKok [Tue, 14 Feb 2023 13:06:08 +0000 (08:06 -0500)] 
depend on the process module, too