]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
15 months agoRemove DHCPv4 encoder for flat list VSAs
Nick Porter [Wed, 2 Oct 2024 16:07:12 +0000 (17:07 +0100)] 
Remove DHCPv4 encoder for flat list VSAs

15 months agotrack configuration versions
Alan T. DeKok [Wed, 2 Oct 2024 20:17:26 +0000 (16:17 -0400)] 
track configuration versions

so we can tell if someone mangles the config, and claims otherwise

15 months agolinelog: Add option to fsync on every write
Arran Cudbard-Bell [Tue, 1 Oct 2024 20:34:38 +0000 (22:34 +0200)] 
linelog: Add option to fsync on every write

15 months agoMove decode failure reasons
Arran Cudbard-Bell [Mon, 30 Sep 2024 19:11:45 +0000 (21:11 +0200)] 
Move decode failure reasons

15 months agounit_test_attribute: Allow setting the current attribute root passed to the decoder
Arran Cudbard-Bell [Mon, 30 Sep 2024 16:32:39 +0000 (18:32 +0200)] 
unit_test_attribute: Allow setting the current attribute root passed to the decoder

15 months agoMove dictionary selection to common code
Arran Cudbard-Bell [Fri, 27 Sep 2024 08:16:46 +0000 (10:16 +0200)] 
Move dictionary selection to common code

15 months agoOnly FR_TYPE_STRUCT need sorted children
Nick Porter [Tue, 24 Sep 2024 11:05:50 +0000 (12:05 +0100)] 
Only FR_TYPE_STRUCT need sorted children

15 months agoRe-enable testing of nested attributes from Perl
Nick Porter [Mon, 23 Sep 2024 10:56:55 +0000 (11:56 +0100)] 
Re-enable testing of nested attributes from Perl

15 months agoDecode nested hashes from Perl to nested attributes
Nick Porter [Thu, 19 Sep 2024 18:36:20 +0000 (19:36 +0100)] 
Decode nested hashes from Perl to nested attributes

15 months agoMore testing of nested attribute data in Perl
Nick Porter [Thu, 19 Sep 2024 14:29:43 +0000 (15:29 +0100)] 
More testing of nested attribute data in Perl

15 months agoCheck passing of octet data
Nick Porter [Thu, 19 Sep 2024 14:28:27 +0000 (15:28 +0100)] 
Check passing of octet data

15 months agoCheck multiple instances of an attribute appear as an array
Nick Porter [Thu, 19 Sep 2024 14:27:56 +0000 (15:27 +0100)] 
Check multiple instances of an attribute appear as an array

15 months agoAdd debugging of nested attributes to sample Perl
Nick Porter [Thu, 19 Sep 2024 14:17:54 +0000 (15:17 +0100)] 
Add debugging of nested attributes to sample Perl

15 months agoConvert structural data into Perl hashes
Nick Porter [Thu, 19 Sep 2024 13:32:54 +0000 (14:32 +0100)] 
Convert structural data into Perl hashes

15 months agoMake Perl variable debug output optional
Nick Porter [Thu, 19 Sep 2024 10:57:52 +0000 (11:57 +0100)] 
Make Perl variable debug output optional

In preparation for nested attributes - the nested structure is printed
out at the top level, so no need to print again at each child level.

15 months agoSimplify Perl debug output building
Nick Porter [Thu, 19 Sep 2024 10:34:21 +0000 (11:34 +0100)] 
Simplify Perl debug output building

15 months agoRemove unused argument
Nick Porter [Thu, 19 Sep 2024 10:24:37 +0000 (11:24 +0100)] 
Remove unused argument

15 months agoVerify that list changes aren't copied back
Nick Porter [Thu, 19 Sep 2024 09:29:56 +0000 (10:29 +0100)] 
Verify that list changes aren't copied back

15 months agoBy default don't replace attribute lists after perl module calls
Nick Porter [Thu, 19 Sep 2024 09:20:31 +0000 (10:20 +0100)] 
By default don't replace attribute lists after perl module calls

15 months agoUpdate CI status badge
Nick Porter [Fri, 20 Sep 2024 20:42:59 +0000 (21:42 +0100)] 
Update CI status badge

15 months agoSet correct depth on cloned child attributes
Nick Porter [Fri, 20 Sep 2024 16:03:59 +0000 (17:03 +0100)] 
Set correct depth on cloned child attributes

15 months agoDownload PGP key from inkbridgenetworks.com
Nick Porter [Fri, 20 Sep 2024 13:34:49 +0000 (14:34 +0100)] 
Download PGP key from inkbridgenetworks.com

15 months agoAdd support for Linux SLL2 link type to radsniff
Nick Porter [Fri, 20 Sep 2024 12:47:17 +0000 (13:47 +0100)] 
Add support for Linux SLL2 link type to radsniff

15 months agoclear cursor on non-editable, too
Alan T. DeKok [Thu, 19 Sep 2024 12:22:53 +0000 (08:22 -0400)] 
clear cursor on non-editable, too

15 months agomove to "edit" flag for foreach / edits
Alan T. DeKok [Wed, 18 Sep 2024 16:32:21 +0000 (12:32 -0400)] 
move to "edit" flag for foreach / edits

which does more protection than using immutable, and catches more
cases.

15 months agoallow for structural types to have flags
Alan T. DeKok [Wed, 18 Sep 2024 15:07:02 +0000 (11:07 -0400)] 
allow for structural types to have flags

by doing some sneaky overlaps of data structures.

15 months agofr_pair_delete() returns "int", not prev pair
Alan T. DeKok [Tue, 17 Sep 2024 19:25:27 +0000 (15:25 -0400)] 
fr_pair_delete() returns "int", not prev pair

15 months agouse fr_pair_foreach() instead of manual loop
Alan T. DeKok [Tue, 17 Sep 2024 19:21:50 +0000 (15:21 -0400)] 
use fr_pair_foreach() instead of manual loop

which means we don't care about the return value of fr_pair_delete()

15 months agoCorrect comment
Nick Porter [Thu, 19 Sep 2024 08:31:43 +0000 (09:31 +0100)] 
Correct comment

15 months agoPacify UBSAN
Nick Porter [Tue, 17 Sep 2024 15:53:08 +0000 (16:53 +0100)] 
Pacify UBSAN

15 months agoLookup the correct status code
Nick Porter [Tue, 17 Sep 2024 12:40:45 +0000 (13:40 +0100)] 
Lookup the correct status code

15 months agoConvert rlm_sql_sqlite to use trunk connections
Nick Porter [Fri, 6 Sep 2024 12:43:32 +0000 (13:43 +0100)] 
Convert rlm_sql_sqlite to use trunk connections

15 months agoHandle requeueing of trunk requests on always writeable connections
Nick Porter [Tue, 17 Sep 2024 12:40:13 +0000 (13:40 +0100)] 
Handle requeueing of trunk requests on always writeable connections

15 months agoAllow for expected behaviour of synchronous SQL drivers
Nick Porter [Fri, 6 Sep 2024 12:36:42 +0000 (13:36 +0100)] 
Allow for expected behaviour of synchronous SQL drivers

15 months agoSQL drivers that don't have connection_notify are always writable
Nick Porter [Fri, 6 Sep 2024 12:35:36 +0000 (13:35 +0100)] 
SQL drivers that don't have connection_notify are always writable

15 months agoTidy up sqlite driver
Nick Porter [Thu, 5 Sep 2024 18:38:19 +0000 (19:38 +0100)] 
Tidy up sqlite driver

All the #ifdef function checks were for functions which have been
released at least 13 years ago.

16 months agoSkip to next xlat arg after handling empty group
Nick Porter [Mon, 16 Sep 2024 20:17:16 +0000 (21:17 +0100)] 
Skip to next xlat arg after handling empty group

16 months agoCall correct module
Nick Porter [Mon, 16 Sep 2024 17:21:03 +0000 (18:21 +0100)] 
Call correct module

16 months agoprint quotes around string values
Alan T. DeKok [Mon, 16 Sep 2024 13:05:11 +0000 (09:05 -0400)] 
print quotes around string values

which make the debug output more clear

16 months agoupdate for key data and key name
Alan T. DeKok [Mon, 16 Sep 2024 12:23:44 +0000 (08:23 -0400)] 
update for key data and key name

16 months agofix dcursor counting, and add test-case
Alan T. DeKok [Sun, 15 Sep 2024 16:37:48 +0000 (12:37 -0400)] 
fix dcursor counting, and add test-case

16 months agoremove unnecessary debugging
Alan T. DeKok [Sun, 15 Sep 2024 12:34:22 +0000 (08:34 -0400)] 
remove unnecessary debugging

16 months agoAdd test of enum key for rlm_files
Nick Porter [Mon, 16 Sep 2024 09:07:36 +0000 (10:07 +0100)] 
Add test of enum key for rlm_files

16 months agoAllow use of enums as rlm_files key values
Nick Porter [Mon, 16 Sep 2024 08:54:08 +0000 (09:54 +0100)] 
Allow use of enums as rlm_files key values

16 months agotypo
Alan T. DeKok [Sat, 14 Sep 2024 21:11:44 +0000 (17:11 -0400)] 
typo

16 months agocheck if key exists before updating it
Alan T. DeKok [Sat, 14 Sep 2024 21:00:34 +0000 (17:00 -0400)] 
check if key exists before updating it

16 months agoinitialize variable
Alan T. DeKok [Sat, 14 Sep 2024 12:41:05 +0000 (08:41 -0400)] 
initialize variable

16 months agofixes for numerical key in xlats
Alan T. DeKok [Fri, 13 Sep 2024 23:04:32 +0000 (19:04 -0400)] 
fixes for numerical key in xlats

16 months agoreturn correct value
Alan T. DeKok [Fri, 13 Sep 2024 14:54:35 +0000 (10:54 -0400)] 
return correct value

16 months agotests for assigning via refs
Alan T. DeKok [Fri, 13 Sep 2024 14:38:11 +0000 (10:38 -0400)] 
tests for assigning via refs

and update indentation stuff in edit.c, which apparently wasn't
being fixed correctly for this corner case

16 months agoLHS can be expansions, so allow it
Alan T. DeKok [Fri, 13 Sep 2024 13:54:06 +0000 (09:54 -0400)] 
LHS can be expansions, so allow it

16 months agoparse key variable, create it, and test it
Alan T. DeKok [Fri, 13 Sep 2024 12:55:07 +0000 (08:55 -0400)] 
parse key variable, create it, and test it

string path "foo.bar.baz[0]" for attributes, and a numerical index
for xlat expansions

16 months agoadd tmpl_dcursor_print()
Alan T. DeKok [Fri, 13 Sep 2024 12:44:07 +0000 (08:44 -0400)] 
add tmpl_dcursor_print()

which prints out the path to the current vp

16 months agoadd syntax parsing for key,value in foreach
Alan T. DeKok [Thu, 12 Sep 2024 19:58:39 +0000 (15:58 -0400)] 
add syntax parsing for key,value in foreach

foreach string key, integer value (...)

missing:

* key da / variable is not created
* there's no way to turn a tmpl_dcursor into a string

so we will first need to add a tmpl_dcursor_print() to print
the dcursor

16 months agoargv[argc] is not valid
Alan T. DeKok [Fri, 13 Sep 2024 13:38:42 +0000 (09:38 -0400)] 
argv[argc] is not valid

16 months agoremove '&'
Alan T. DeKok [Thu, 12 Sep 2024 19:52:36 +0000 (15:52 -0400)] 
remove '&'

16 months agorename key -> value
Alan T. DeKok [Thu, 12 Sep 2024 19:08:08 +0000 (15:08 -0400)] 
rename key -> value

in preparation for adding an actual key

16 months agoAdd test for try with missing catch for rcode
Nick Porter [Thu, 12 Sep 2024 19:27:33 +0000 (20:27 +0100)] 
Add test for try with missing catch for rcode

16 months agoFailure to catch isn't really an error
Nick Porter [Thu, 12 Sep 2024 19:20:12 +0000 (20:20 +0100)] 
Failure to catch isn't really an error

The policy may well be intentionally not catching some rcodes.

16 months agoSkip to correct next frame when there is no matching 'catch'
Nick Porter [Thu, 12 Sep 2024 19:18:58 +0000 (20:18 +0100)] 
Skip to correct next frame when there is no matching 'catch'

16 months agoBetter revision of redis cluster node fail handling
Nick Porter [Thu, 12 Sep 2024 18:23:08 +0000 (19:23 +0100)] 
Better revision of redis cluster node fail handling

16 months agoBetter handling of the result of redis cluster node failure
Nick Porter [Thu, 12 Sep 2024 10:23:37 +0000 (11:23 +0100)] 
Better handling of the result of redis cluster node failure

16 months agoCorrect handling of MySQL connection openning immediately
Nick Porter [Fri, 6 Sep 2024 15:27:01 +0000 (16:27 +0100)] 
Correct handling of MySQL connection openning immediately

16 months agoAllow connections to transition INIT -> CONNECTED
Nick Porter [Fri, 6 Sep 2024 12:29:13 +0000 (13:29 +0100)] 
Allow connections to transition INIT -> CONNECTED

Required to use trunks / connecitons where connections are made
synchronously, e.g. SQLite, or where connections return
immediately

16 months agoTypo
Nick Porter [Fri, 6 Sep 2024 12:19:52 +0000 (13:19 +0100)] 
Typo

16 months agoDon't add a list if the tmpl rules say no list
Nick Porter [Thu, 12 Sep 2024 09:05:11 +0000 (10:05 +0100)] 
Don't add a list if the tmpl rules say no list

16 months agoAdd tests of ip address / prefix maths
Nick Porter [Thu, 12 Sep 2024 08:26:34 +0000 (09:26 +0100)] 
Add tests of ip address / prefix maths

16 months agoCorrect check for prefix size when doing prefix + offset
Nick Porter [Thu, 12 Sep 2024 08:23:56 +0000 (09:23 +0100)] 
Correct check for prefix size when doing prefix + offset

16 months agoRevert "Allow smaller uint types when calculating IPv4 prefix"
Nick Porter [Thu, 12 Sep 2024 07:57:48 +0000 (08:57 +0100)] 
Revert "Allow smaller uint types when calculating IPv4 prefix"

This reverts commit b0d9e73d9c97202f941717b7f0c63a8a132daf59.

Incorrect interpretation of intent - the uint arg is a netmask
so should be 32 bits

16 months agomore sanity checks on local flags
Alan T. DeKok [Wed, 11 Sep 2024 17:55:42 +0000 (13:55 -0400)] 
more sanity checks on local flags

16 months agoset local flag for local variables, and updated error message
Alan T. DeKok [Wed, 11 Sep 2024 14:36:50 +0000 (10:36 -0400)] 
set local flag for local variables, and updated error message

16 months agomore descriptive errors
Alan T. DeKok [Wed, 11 Sep 2024 13:29:09 +0000 (09:29 -0400)] 
more descriptive errors

16 months agocheck the right parent
Alan T. DeKok [Wed, 11 Sep 2024 13:27:57 +0000 (09:27 -0400)] 
check the right parent

the outer parent_map is taken from starting to parse the section.
map_afrom_cs() will parse multiple child sections, and call the
validation function for each one.  But will only pass the top-level
parent_map.

So fixup the ref to use the actual parent when there are multiple
levels

16 months agoAllow smaller uint types when calculating IPv4 prefix
Nick Porter [Wed, 11 Sep 2024 19:52:41 +0000 (20:52 +0100)] 
Allow smaller uint types when calculating IPv4 prefix

16 months agoSet correct prefix for IPv4 address
Nick Porter [Wed, 11 Sep 2024 19:49:47 +0000 (20:49 +0100)] 
Set correct prefix for IPv4 address

16 months agoRegister an extremely generic set of arguments Closes #5351
Arran Cudbard-Bell [Tue, 10 Sep 2024 16:58:58 +0000 (10:58 -0600)] 
Register an extremely generic set of arguments Closes #5351

16 months agomove assert to descriptive run-time error
Alan T. DeKok [Tue, 10 Sep 2024 19:07:11 +0000 (15:07 -0400)] 
move assert to descriptive run-time error

16 months agofix edit issues with nested VSAs
Alan T. DeKok [Tue, 10 Sep 2024 18:51:06 +0000 (14:51 -0400)] 
fix edit issues with nested VSAs

key off of operator, not edit list for copying VPs

just always copy VPs, as in some cases they're not created as a
child of the LHS VP, and then things blow up

16 months agoAdd .adoc file about adding gdb commands with Python (#5420)
James Jones [Tue, 10 Sep 2024 18:37:26 +0000 (13:37 -0500)] 
Add .adoc file about adding gdb commands with Python (#5420)

16 months agoAdd Ingate Systems AB dictionary (#5418)
Paul Donald [Tue, 10 Sep 2024 18:37:11 +0000 (20:37 +0200)] 
Add Ingate Systems AB dictionary (#5418)

16 months agotypo (#5412)
James Jones [Tue, 10 Sep 2024 18:36:40 +0000 (13:36 -0500)] 
typo (#5412)

16 months agoCorrects a grammatical error and adds some clarification.
James Jones [Tue, 27 Aug 2024 13:46:55 +0000 (08:46 -0500)] 
Corrects a grammatical error and adds some clarification.

16 months agoHelp Coverity realize we really are checking buffer[1] (CID #1419883)
James Jones [Thu, 22 Aug 2024 13:55:10 +0000 (08:55 -0500)] 
Help Coverity realize we really are checking buffer[1] (CID #1419883)

Coverity appears to be confused by the check in a conditional expression,
so we pull it out into a real live if statement.

16 months agoAnnotate overflow issues in lo_read() (CID #1604601)
James Jones [Tue, 13 Aug 2024 21:11:41 +0000 (16:11 -0500)] 
Annotate overflow issues in lo_read() (CID #1604601)

Coverity sets itself up in a vicious cycle:
1. It considers the loop check expression to be tainted because
   total is tainted, so outlen is tainted, too.
2. Because of that, outlen - total (passed to read()) is deemed
   overflowed, so the return value r is considered overflowed.
3. Returning total, which is considered overflowed, is another issue.
4. r, which is considered overflowed, is added to r--which is why
   total considered to have overflowed and hence be tainted.

Once we changed the code to not add r to total in the EINTR case,
one can, but Coverity cannot, infer that total will only take on
values in {0,1,...,outlen}, and since both have the same type, total
can represent all such values. read(), as a standard function, is
one it should have a model for, but it doesn't seem to include the
property that the returned value is less than or equal to the passed
number of bytes to read(), and it doesn't have a way to let us
represent it in a custom model.

16 months agoAnnotate overflow in event_fd_func_index_build() (CID #164609)
James Jones [Mon, 12 Aug 2024 14:34:39 +0000 (09:34 -0500)] 
Annotate overflow in event_fd_func_index_build() (CID #164609)

Coverity-only check won't work, because the only one that makes
sense would be for pos == 0... but the while loop condition,
which Coverity can see, checks exactly that, leaving us with
annotation.

16 months agoUpdate mods-available/rest to use urlquote instead of url.quote
Stephen Blackwell [Tue, 30 Jul 2024 20:40:43 +0000 (14:40 -0600)] 
Update mods-available/rest to use urlquote instead of url.quote

Signed-off-by: Stephen Blackwell <C-Stephen.Blackwell@charter.com>
16 months agoUpdate ndb schema.sql
Matt [Sat, 27 Jul 2024 03:06:39 +0000 (11:06 +0800)] 
Update ndb schema.sql

Fix radusergroup table structure - add missing id primary key column

16 months agoAdd Coverity-only check to avoid false positive overflow (CID 1604621)
James Jones [Thu, 8 Aug 2024 21:15:05 +0000 (16:15 -0500)] 
Add Coverity-only check to avoid false positive overflow (CID 1604621)

Coverity doesn't know at this point that fr_high_bit_pos() will
necessarily return a value between 5 and 64, so that ret will
have a value in {1, 2, ..., 8}, NOT 2305843009213693952. We add
a check only coverity will see to convince it there is no overflow.

16 months agoRevise write_all() to avoid overflow (CID #1604608)
James Jones [Thu, 8 Aug 2024 13:35:02 +0000 (08:35 -0500)] 
Revise write_all() to avoid overflow (CID #1604608)

write_all() len parameter is changed to size_t so len - done is
calculated as size_t to try to avoid an over or underflow Coverity
claims occurs. For simplicity and to avoid another overflow complaint,
write_all() now returns 0 for success and -1 for error.

16 months agoCheck fr_size_to_str() return in kafka_config_dflt_single (CID #1604624)
James Jones [Thu, 25 Jul 2024 20:51:38 +0000 (15:51 -0500)] 
Check fr_size_to_str() return in kafka_config_dflt_single (CID #1604624)

16 months agoAdd coverity-only check to _fr_dbuff_in_uint64v() (CID #1604617)
James Jones [Tue, 30 Jul 2024 19:32:45 +0000 (14:32 -0500)] 
Add coverity-only check to _fr_dbuff_in_uint64v() (CID #1604617)

Coverity doesn't realize that the value fr_high_bit_pos() returns
is necessarily between 4 and 64, so that ret is between 1 and 8
so that sizeof(uint64_t) - ret will never underflow. We add the
test for Coverity only to pacify it.

16 months agoAdd coverity-only check for underflow (CID #1604625)
James Jones [Mon, 29 Jul 2024 18:35:12 +0000 (13:35 -0500)] 
Add coverity-only check for underflow  (CID #1604625)

Check accumulation of total to pacify Coverity in fr_writev()

16 months agoAdd coverity-only check to pacify coverity (CID #1604622)
James Jones [Thu, 25 Jul 2024 14:53:20 +0000 (09:53 -0500)] 
Add coverity-only check to pacify coverity (CID #1604622)

16 months agoAdd a coverity-only check to pacify Coverity (CID #1604620)
James Jones [Tue, 23 Jul 2024 19:50:19 +0000 (14:50 -0500)] 
Add a coverity-only check to pacify Coverity (CID #1604620)

16 months agoAnnotate yet another "hash *= FNV_MAGIC_PRIME" (CID#1604612)
James Jones [Mon, 15 Jul 2024 20:36:51 +0000 (15:36 -0500)] 
Annotate yet another "hash *= FNV_MAGIC_PRIME" (CID#1604612)

Like 1604607 and 1604626, this is an FNV hash, and Coverity
complains about the multiplication by FNV_MAGIC_PRIME.

16 months agoDeal with unlikely overflows in minmax_heap_extend() (CID #1604610)
James Jones [Fri, 12 Jul 2024 17:19:14 +0000 (12:19 -0500)] 
Deal with unlikely overflows in minmax_heap_extend() (CID #1604610)

Since n_size is sometimes set to UINT_MAX, the size calculation in
talloc_realloc() may overflow as written; ditto for the failure
error message.

16 months agoAnnotate false positive overflow_const issues (CID #1604607, #1604626)
James Jones [Wed, 3 Jul 2024 17:38:20 +0000 (12:38 -0500)] 
Annotate false positive overflow_const issues (CID #1604607, #1604626)

Coverity sees the initialization of hash and the multiplication by
FNV_MAGIC_PRIME and points out that the product is too large for a
uint32_t, but because the multiplication is done in an unsigned type,
that is defined behavior and the intended behavior for the hash
functions.

16 months agoAnnotate Coverity false positive for the parse-only case (CID #1604604)
James Jones [Mon, 1 Jul 2024 14:46:44 +0000 (09:46 -0500)] 
Annotate Coverity false positive for the parse-only case (CID #1604604)

out is assigned NULL, and for the parse-only case stays that way. Then
call_env_result() is called, which doesn't dereference out in the
parse-only case, but Coverity doesn't realize it and hence complains.

16 months agoAnnotate bogus overflow complaint (CID 1604606)
James Jones [Fri, 28 Jun 2024 15:43:05 +0000 (10:43 -0500)] 
Annotate bogus overflow complaint (CID 1604606)

Coverity complains about "mask <<= 1", but mask has an unsigned
type, so that's perfectly valid and its behavior defined.

16 months agoRemove needless manipulation of out in do_xlats()
James Jones [Tue, 6 Feb 2024 15:16:40 +0000 (09:16 -0600)] 
Remove needless manipulation of out in do_xlats()