]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 years agosimplify and quiet clang scan
Alan T. DeKok [Wed, 22 Jun 2022 12:51:52 +0000 (08:51 -0400)] 
simplify and quiet clang scan

4 years agomore cleanups
Alan T. DeKok [Wed, 22 Jun 2022 12:37:38 +0000 (08:37 -0400)] 
more cleanups

4 years agominor cleanups
Alan T. DeKok [Wed, 22 Jun 2022 12:31:04 +0000 (08:31 -0400)] 
minor cleanups

4 years agobreak out tokenize regex RHS into its own function
Alan T. DeKok [Tue, 21 Jun 2022 23:16:24 +0000 (19:16 -0400)] 
break out tokenize regex RHS into its own function

4 years agomore minimization of function arguments
Alan T. DeKok [Tue, 21 Jun 2022 23:13:18 +0000 (19:13 -0400)] 
more minimization of function arguments

4 years agosimplify logic
Alan T. DeKok [Tue, 21 Jun 2022 22:37:02 +0000 (18:37 -0400)] 
simplify logic

and remove function arguments which are no longer needed.

4 years agoAdd tests for section name resolution
Arran Cudbard-Bell [Tue, 21 Jun 2022 21:40:03 +0000 (16:40 -0500)] 
Add tests for section name resolution

4 years agosudo isn't always available
Arran Cudbard-Bell [Tue, 21 Jun 2022 21:00:05 +0000 (16:00 -0500)] 
sudo isn't always available

4 years agodon't compile regexes for the first pass parsing
Alan T. DeKok [Tue, 21 Jun 2022 21:02:36 +0000 (17:02 -0400)] 
don't compile regexes for the first pass parsing

4 years agowrite out the builddep logs in case we need them
Arran Cudbard-Bell [Tue, 21 Jun 2022 20:47:08 +0000 (15:47 -0500)] 
write out the builddep logs in case we need them

4 years agoProbably didn't want to commit this
Arran Cudbard-Bell [Tue, 21 Jun 2022 20:34:53 +0000 (15:34 -0500)] 
Probably didn't want to commit this

4 years agoGive up on rpm includes for now, we'll look at it again later
Arran Cudbard-Bell [Tue, 21 Jun 2022 20:33:57 +0000 (15:33 -0500)] 
Give up on rpm includes for now, we'll look at it again later

4 years agoSpelling
Arran Cudbard-Bell [Tue, 21 Jun 2022 20:33:13 +0000 (15:33 -0500)] 
Spelling

4 years agoNope...
Arran Cudbard-Bell [Tue, 21 Jun 2022 16:35:40 +0000 (11:35 -0500)] 
Nope...

4 years agoTry again to fix spec include paths
Arran Cudbard-Bell [Tue, 21 Jun 2022 16:26:36 +0000 (11:26 -0500)] 
Try again to fix spec include paths

4 years agoSee if that makes rpmbuild happier...
Arran Cudbard-Bell [Tue, 21 Jun 2022 16:15:26 +0000 (11:15 -0500)] 
See if that makes rpmbuild happier...

4 years agomore clearly separate pre/post expansion parsing.
Alan T. DeKok [Tue, 21 Jun 2022 15:26:19 +0000 (11:26 -0400)] 
more clearly separate pre/post expansion parsing.

We first parse the condition *without* doing variable expansion.
this lets us know how big the condition is.

We then expand the variables and re-parse the condition.

This two-pass method is a temporary hack until we get the new
xlat expressions working.

4 years agoTypo
Arran Cudbard-Bell [Tue, 21 Jun 2022 14:53:42 +0000 (09:53 -0500)] 
Typo

4 years agoAutomatically allocate a frame ctx when asked
Arran Cudbard-Bell [Tue, 21 Jun 2022 14:41:25 +0000 (09:41 -0500)] 
Automatically allocate a frame ctx when asked

4 years agoshut up compiler
Alan T. DeKok [Tue, 21 Jun 2022 12:51:55 +0000 (08:51 -0400)] 
shut up compiler

4 years agoFix RPM spec and "make rpm" (#4572)
Max Khon [Tue, 21 Jun 2022 12:14:35 +0000 (15:14 +0300)] 
Fix RPM spec and "make rpm" (#4572)

4 years agodefine the macro, and use the correct one for DNS
Alan T. DeKok [Mon, 20 Jun 2022 23:28:56 +0000 (19:28 -0400)] 
define the macro, and use the correct one for DNS

4 years agodisable the new code for now
Alan T. DeKok [Mon, 20 Jun 2022 23:16:12 +0000 (19:16 -0400)] 
disable the new code for now

4 years agodisable the new code for now
Alan T. DeKok [Mon, 20 Jun 2022 23:16:12 +0000 (19:16 -0400)] 
disable the new code for now

4 years agouse "==" and not "="
Alan T. DeKok [Mon, 20 Jun 2022 22:40:35 +0000 (18:40 -0400)] 
use "==" and not "="

4 years agoquiet compiler
Alan T. DeKok [Mon, 20 Jun 2022 22:39:15 +0000 (18:39 -0400)] 
quiet compiler

4 years agoalways initialize output
Alan T. DeKok [Mon, 20 Jun 2022 21:30:57 +0000 (17:30 -0400)] 
always initialize output

4 years agoadd xlat conditions, but ifdef'd out for now
Alan T. DeKok [Mon, 20 Jun 2022 19:50:10 +0000 (15:50 -0400)] 
add xlat conditions, but ifdef'd out for now

4 years agoalso parse xlat conditions
Alan T. DeKok [Mon, 20 Jun 2022 15:31:40 +0000 (11:31 -0400)] 
also parse xlat conditions

temporarily, so that we don't let the new code rot

4 years agomost keywords should use stack-local contexts
Alan T. DeKok [Mon, 20 Jun 2022 15:31:06 +0000 (11:31 -0400)] 
most keywords should use stack-local contexts

so that they are automatically cleaned up

4 years agoskip this test until we rewrite it completely
Alan T. DeKok [Mon, 20 Jun 2022 13:51:56 +0000 (09:51 -0400)] 
skip this test until we rewrite it completely

the LHS should be able to be xlat'd names, but the new edit sections
do it differently

4 years agohoist call to cf_expand_variables() to cf_file.c
Alan T. DeKok [Mon, 20 Jun 2022 11:54:58 +0000 (07:54 -0400)] 
hoist call to cf_expand_variables() to cf_file.c

in preparation for moving to xlat expressions

4 years agoadd sbuff_char_word to match Perls \w
Alan T. DeKok [Sun, 19 Jun 2022 13:20:11 +0000 (09:20 -0400)] 
add sbuff_char_word to match Perls \w

For now, no unicode / UTF-8 support.  Sorry.  :(

4 years agonote todo
Alan T. DeKok [Fri, 17 Jun 2022 12:23:29 +0000 (08:23 -0400)] 
note todo

4 years agowe shouldn't be copying structural groups.
Alan T. DeKok [Sun, 12 Jun 2022 15:14:30 +0000 (11:14 -0400)] 
we shouldn't be copying structural groups.

We may change this later, but for now let's disallow it until all
of the tests pass.

4 years agohandle existence checks for leaf types
Alan T. DeKok [Sun, 12 Jun 2022 15:08:28 +0000 (11:08 -0400)] 
handle existence checks for leaf types

and update results in output list.

4 years agoallow casts for expressions
Alan T. DeKok [Thu, 9 Jun 2022 00:39:33 +0000 (20:39 -0400)] 
allow casts for expressions

(uint32) ( a + b + c...)

which is a bit different from casting a bare tmpl

4 years agohacks to check input terminal sequences.
Alan T. DeKok [Tue, 7 Jun 2022 22:42:20 +0000 (18:42 -0400)] 
hacks to check input terminal sequences.

These really need to be cleaned up, as when we're in the middle
of parsing an expression like

(foo......)

we do NOT want to pay attention to input terminals.  We've hit our
tokenizer, and WE decide what the tokens are.

4 years agoRm and ignore kafka/all.mk
Arran Cudbard-Bell [Mon, 20 Jun 2022 15:46:21 +0000 (10:46 -0500)] 
Rm and ignore kafka/all.mk

4 years agoAdd type from format inference for time deltas
Arran Cudbard-Bell [Mon, 20 Jun 2022 14:20:54 +0000 (09:20 -0500)] 
Add type from format inference for time deltas

4 years agoFR_TYPE_REQUIRED is redundant if there's a default
Arran Cudbard-Bell [Fri, 17 Jun 2022 23:32:07 +0000 (18:32 -0500)] 
FR_TYPE_REQUIRED is redundant if there's a default

4 years agoLimit when the documentation builds run
Arran Cudbard-Bell [Fri, 17 Jun 2022 22:31:28 +0000 (17:31 -0500)] 
Limit when the documentation builds run

4 years agoAdd the start of a kafka producer
Arran Cudbard-Bell [Sat, 18 Jun 2022 01:34:25 +0000 (20:34 -0500)] 
Add the start of a kafka producer

Adds a basic configuration mapping system for librdkafka

4 years agoAdd functions to concat talloced arrays of strings
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:39:58 +0000 (16:39 -0500)] 
Add functions to concat talloced arrays of strings

4 years agoFR_TYPE_REQUIRED is redundant when we have a default
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:39:38 +0000 (16:39 -0500)] 
FR_TYPE_REQUIRED is redundant when we have a default

4 years agosubs should be mutable
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:39:23 +0000 (16:39 -0500)] 
subs should be mutable

4 years agoBundle the dictionary files with WASM code
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:39:08 +0000 (16:39 -0500)] 
Bundle the dictionary files with WASM code

4 years agoAdd support for mapping tables which map strings to string
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:38:50 +0000 (16:38 -0500)] 
Add support for mapping tables which map strings to string

4 years agoAdd useful utility functions
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:38:20 +0000 (16:38 -0500)] 
Add useful utility functions

4 years agoMore support for dynamic defaults
Arran Cudbard-Bell [Fri, 17 Jun 2022 21:37:04 +0000 (16:37 -0500)] 
More support for dynamic defaults

4 years agoinitialize 'c'
Alan T. DeKok [Fri, 17 Jun 2022 14:05:08 +0000 (10:05 -0400)] 
initialize 'c'

4 years agohoist unresolved xlats, too
Alan T. DeKok [Thu, 9 Jun 2022 00:51:23 +0000 (20:51 -0400)] 
hoist unresolved xlats, too

4 years agoadd "cast" xlat, for cases where we don't have the full parser
Alan T. DeKok [Wed, 8 Jun 2022 23:58:24 +0000 (19:58 -0400)] 
add "cast" xlat, for cases where we don't have the full parser

4 years agofix regex flag handling
Alan T. DeKok [Wed, 8 Jun 2022 21:08:55 +0000 (17:08 -0400)] 
fix regex flag handling

4 years agopass in flags, too
Alan T. DeKok [Wed, 8 Jun 2022 15:23:09 +0000 (11:23 -0400)] 
pass in flags, too

4 years agodon't stop on ret>0, stop *recursing*
Alan T. DeKok [Wed, 8 Jun 2022 13:28:16 +0000 (09:28 -0400)] 
don't stop on ret>0, stop *recursing*

and continue with the next node

4 years agowalk function arguments first.
Alan T. DeKok [Wed, 8 Jun 2022 13:26:12 +0000 (09:26 -0400)] 
walk function arguments first.

because the instantiation function can move the arguments into
it's private data structure

4 years agorename to be clearer
Alan T. DeKok [Tue, 7 Jun 2022 22:43:59 +0000 (18:43 -0400)] 
rename to be clearer

4 years agoadd tmpl_value_list_insert_tail() which does casting, too.
Alan T. DeKok [Tue, 7 Jun 2022 22:35:27 +0000 (18:35 -0400)] 
add tmpl_value_list_insert_tail() which does casting, too.

instead of similar code scattered everywhere.

4 years agoallow if (!fail) to work correctly.
Alan T. DeKok [Tue, 7 Jun 2022 22:33:57 +0000 (18:33 -0400)] 
allow if (!fail) to work correctly.

4 years agoallocate from the correct parent
Alan T. DeKok [Tue, 7 Jun 2022 21:33:56 +0000 (17:33 -0400)] 
allocate from the correct parent

4 years ago-NULL and ~NULL is an error. !NULL is true.
Alan T. DeKok [Tue, 7 Jun 2022 20:52:58 +0000 (16:52 -0400)] 
-NULL and ~NULL is an error.  !NULL is true.

4 years agoslight tweak to debugging message
Alan T. DeKok [Tue, 7 Jun 2022 20:48:11 +0000 (16:48 -0400)] 
slight tweak to debugging message

4 years agotypo
Alan T. DeKok [Tue, 7 Jun 2022 16:23:49 +0000 (12:23 -0400)] 
typo

4 years agoAllow %{date:+%A} to mean "Monday"
Alan T. DeKok [Tue, 14 Jun 2022 22:00:52 +0000 (17:00 -0500)] 
Allow %{date:+%A} to mean "Monday"

which mirrors the "date +%A" command on Unix.

Also update the documentation and add examples.

4 years agoallow %{date:} as a synonym for %{date:now}
Alan T. DeKok [Tue, 14 Jun 2022 21:54:05 +0000 (16:54 -0500)] 
allow %{date:} as a synonym for %{date:now}

4 years agoReassure coverity about the value passed to print_config() (CID #1504310) (#4563)
James Jones [Thu, 16 Jun 2022 18:39:55 +0000 (13:39 -0500)] 
Reassure coverity about the value passed to print_config() (CID #1504310) (#4563)

We can see that print_config() is only called in one spot, from
parse_long_op(), which passes as value the addresss of an auto array
that is guaranteed to contain a possibly empty NUL-terminated string,
suitable for the printc* macros. This being a separatly-compiled
program, we take the portable approach of asserting value is non-
NULL, which we know is true and should convince coverity.

4 years agoMore annotation of Coverity false positives. (#4568)
James Jones [Thu, 16 Jun 2022 18:39:32 +0000 (13:39 -0500)] 
More annotation of Coverity false positives. (#4568)

This deals with the following CIDs: 15046621469149

4 years agoMake room for NUL in the extreme case in xlat_config_escape(). (#4569)
James Jones [Thu, 16 Jun 2022 18:38:31 +0000 (13:38 -0500)] 
Make room for NUL in the extreme case in xlat_config_escape(). (#4569)

The VLA escaped[] can handle the probably unlikely worst case of
every character from the value box requiring MIME encoding...
except that a NUL is appended, so one might as well accommodate
it in that worst case.

4 years agoFix typo
Arran Cudbard-Bell [Thu, 16 Jun 2022 18:16:21 +0000 (13:16 -0500)] 
Fix typo

4 years agoSlightly more efficient way of determining trailing zeros for size printing
Arran Cudbard-Bell [Thu, 16 Jun 2022 14:36:54 +0000 (09:36 -0500)] 
Slightly more efficient way of determining trailing zeros for size printing

4 years agoMinor style issue
Arran Cudbard-Bell [Thu, 16 Jun 2022 14:10:11 +0000 (09:10 -0500)] 
Minor style issue

4 years agoFix fuzzer crash
Arran Cudbard-Bell [Thu, 16 Jun 2022 13:54:45 +0000 (08:54 -0500)] 
Fix fuzzer crash

4 years agoAdd case that exercises fr_size_to_str() bug and correct the bug. (#4567)
James Jones [Thu, 16 Jun 2022 13:59:58 +0000 (08:59 -0500)] 
Add case that exercises fr_size_to_str() bug and correct the bug. (#4567)

Unfortunately it really needs to know the number of trailing
zeroes in the decimal form as well as binary, which will slow
things to an extent.

4 years agoDHCPv4: Fix sending Lease-Unknown and Lease-Unassigned responses (#4566)
Max Khon [Wed, 15 Jun 2022 20:39:26 +0000 (23:39 +0300)] 
DHCPv4: Fix sending Lease-Unknown and Lease-Unassigned responses (#4566)

4 years agoFix rpm build (#4565)
Max Khon [Wed, 15 Jun 2022 20:24:04 +0000 (23:24 +0300)] 
Fix rpm build (#4565)

4 years agoQuiet GCC
Arran Cudbard-Bell [Wed, 15 Jun 2022 17:20:43 +0000 (12:20 -0500)] 
Quiet GCC

4 years agoFix DHCP Release processing (#4564)
Max Khon [Wed, 15 Jun 2022 16:21:38 +0000 (19:21 +0300)] 
Fix DHCP Release processing (#4564)

4 years agoAdd separate size printing/parsing functions
Arran Cudbard-Bell [Wed, 15 Jun 2022 16:14:38 +0000 (11:14 -0500)] 
Add separate size printing/parsing functions

4 years agoAdd fr_perror_to_str to help with wasm debugging
Arran Cudbard-Bell [Tue, 14 Jun 2022 18:30:58 +0000 (13:30 -0500)] 
Add fr_perror_to_str to help with wasm debugging

4 years agoAdd flag to disable dictionary permissions checks
Arran Cudbard-Bell [Tue, 14 Jun 2022 18:30:35 +0000 (13:30 -0500)] 
Add flag to disable dictionary permissions checks

4 years agoInitialise the group field for all structural types
Arran Cudbard-Bell [Mon, 13 Jun 2022 14:59:09 +0000 (09:59 -0500)] 
Initialise the group field for all structural types

4 years agoAdd size printing/parsing
Arran Cudbard-Bell [Wed, 8 Jun 2022 16:09:54 +0000 (12:09 -0400)] 
Add size printing/parsing

4 years agoCheck for NULL return from fr_rb_find(). (#4558)
James Jones [Tue, 14 Jun 2022 14:16:58 +0000 (09:16 -0500)] 
Check for NULL return from fr_rb_find(). (#4558)

4 years agoStill more voiding of calls we know will work. (#4552)
James Jones [Tue, 14 Jun 2022 02:33:13 +0000 (21:33 -0500)] 
Still more voiding of calls we know will work. (#4552)

This deals with the following CIDs:
15039741504043150418215041831504184

4 years agoMissing changes related to e17c8b6879 (#4560)
Jorge Pereira [Tue, 14 Jun 2022 02:31:25 +0000 (23:31 -0300)] 
Missing changes related to e17c8b6879 (#4560)

4 years agoUse MEM() on unchecked fr_value_box_alloc_null() calls (CID #1504028) (#4559)
James Jones [Mon, 13 Jun 2022 23:16:32 +0000 (18:16 -0500)] 
Use MEM() on unchecked fr_value_box_alloc_null() calls (CID #1504028) (#4559)

4 years agoDHCPv4: add back Lease-Query support (#4555) 4557/head
Max Khon [Sun, 12 Jun 2022 14:09:53 +0000 (17:09 +0300)] 
DHCPv4: add back Lease-Query support (#4555)

4 years agoJust use the standard fr_ipaddr_cmp function
Arran Cudbard-Bell [Fri, 10 Jun 2022 23:59:44 +0000 (18:59 -0500)] 
Just use the standard fr_ipaddr_cmp function

4 years agoInitialise ipaddr types correctly in fr_value_box_init
Arran Cudbard-Bell [Fri, 10 Jun 2022 23:59:02 +0000 (18:59 -0500)] 
Initialise ipaddr types correctly in fr_value_box_init

4 years agoFix garbage test that leads to bad pairs in the test pair list
Arran Cudbard-Bell [Fri, 10 Jun 2022 23:58:29 +0000 (18:58 -0500)] 
Fix garbage test that leads to bad pairs in the test pair list

4 years agoMake fr_ipaddr_cmp more efficient by only comparing used bytes
Arran Cudbard-Bell [Fri, 10 Jun 2022 23:58:02 +0000 (18:58 -0500)] 
Make fr_ipaddr_cmp more efficient by only comparing used bytes

4 years agoMore magic WASM flags
Arran Cudbard-Bell [Thu, 9 Jun 2022 04:09:12 +0000 (23:09 -0500)] 
More magic WASM flags

4 years agoon dup, increment both
Alan T. DeKok [Sat, 11 Jun 2022 22:11:39 +0000 (18:11 -0400)] 
on dup, increment both

4 years agomore "order array"
Alan T. DeKok [Sat, 11 Jun 2022 22:11:27 +0000 (18:11 -0400)] 
more "order array"

4 years agoAlways verify fr_sbuff_term_t order when using WITH_VERIFY_PTR
Alan T. DeKok [Sat, 11 Jun 2022 19:35:54 +0000 (15:35 -0400)] 
Always verify fr_sbuff_term_t order when using WITH_VERIFY_PTR

and remove calls to qsort.  Since the input arrays must be sorted,
we can simple do an O(n+m) walk over the input arrays

4 years agoorder terminals
Alan T. DeKok [Sat, 11 Jun 2022 19:00:16 +0000 (15:00 -0400)] 
order terminals

4 years agocompare fields, and don't use memcmp()
Alan T. DeKok [Fri, 10 Jun 2022 13:50:38 +0000 (09:50 -0400)] 
compare fields, and don't use memcmp()

4 years agomake it clearer what we're doing
Alan T. DeKok [Fri, 10 Jun 2022 13:49:16 +0000 (09:49 -0400)] 
make it clearer what we're doing

hex numbers look more like IP addresses than decimal numbers

4 years agoMake Coverity happy with encode_nas_filter_rule() (CID #1503928) (#4554)
James Jones [Fri, 10 Jun 2022 01:32:20 +0000 (20:32 -0500)] 
Make Coverity happy with encode_nas_filter_rule() (CID #1503928) (#4554)

encode_nas_filter_rule() is never passed a cursor for which
fr_dcursor_current() returns NULL, so the check at the top
of the loop can be eliminated. Coverity should see the assertions
and not complain about the FR_DBUFF_IN_BYTES_RETURN().O