]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoType and func macros don't use semicolons in other places
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:43:31 +0000 (13:43 -0600)] 
Type and func macros don't use semicolons in other places

2 years agoAnother attempt at accepting NULL macro args
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:43:16 +0000 (13:43 -0600)] 
Another attempt at accepting NULL macro args

2 years agoAllow global at exit init functions to return error codes
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:06:20 +0000 (13:06 -0600)] 
Allow global at exit init functions to return error codes

2 years agoToo many semicolons
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:06:02 +0000 (13:06 -0600)] 
Too many semicolons

2 years agoFix -Werror=address complaints... maybe
Arran Cudbard-Bell [Thu, 12 Jan 2023 18:40:34 +0000 (12:40 -0600)] 
Fix -Werror=address complaints... maybe

2 years agoAllow NULL init and free functions for fr_atexit_global_once
Arran Cudbard-Bell [Thu, 12 Jan 2023 16:08:28 +0000 (10:08 -0600)] 
Allow NULL init and free functions for fr_atexit_global_once

2 years agoTests for slab allocator
Nick Porter [Wed, 21 Dec 2022 19:25:07 +0000 (19:25 +0000)] 
Tests for slab allocator

2 years agoDefine a talloc based slab allocator
Nick Porter [Wed, 21 Dec 2022 19:09:55 +0000 (19:09 +0000)] 
Define a talloc based slab allocator

Allows regularly re-used objects to be allocated from a slab once and
reused.

2 years agoJust sneak this in there...
Arran Cudbard-Bell [Wed, 11 Jan 2023 15:24:07 +0000 (09:24 -0600)] 
Just sneak this in there...

2 years agoFix rpmbuilding for Alma Linux
Arran Cudbard-Bell [Wed, 11 Jan 2023 15:09:02 +0000 (09:09 -0600)] 
Fix rpmbuilding for Alma Linux

2 years agoRemove confe file
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:33:48 +0000 (14:33 -0600)] 
Remove confe file

2 years agorpmbuild really wants these flags together
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:28:29 +0000 (14:28 -0600)] 
rpmbuild really wants these flags together

2 years agoDoesn't seem necessary to use perl here... and rpmbuild seems to sub it anyway
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:24:52 +0000 (14:24 -0600)] 
Doesn't seem necessary to use perl here... and rpmbuild seems to sub it anyway

2 years agoFix typo. refs #4836 (#4843)
Jorge Pereira [Tue, 10 Jan 2023 16:50:30 +0000 (13:50 -0300)] 
Fix typo. refs #4836 (#4843)

2 years agoForce openSSL version check literals to unsigned long
Arran Cudbard-Bell [Tue, 10 Jan 2023 16:15:10 +0000 (10:15 -0600)] 
Force openSSL version check literals to unsigned long

2 years agoCorrect syntax of debug_ policies
Nick Porter [Tue, 10 Jan 2023 11:50:16 +0000 (11:50 +0000)] 
Correct syntax of debug_ policies

2 years agorlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute (#4841)
Terry Burton [Mon, 9 Jan 2023 23:24:09 +0000 (23:24 +0000)] 
rlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute (#4841)

* rlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute

* More than just SP is allowed between header attributes and values

* Simplify content_type use

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
2 years agoeapol_test-build.sh log output should be to stderr
Nick Porter [Mon, 9 Jan 2023 13:36:42 +0000 (13:36 +0000)] 
eapol_test-build.sh log output should be to stderr

stdout is where the path to the final binary is output.

2 years agoUpdate default delay for rlm_delay
Nick Porter [Fri, 6 Jan 2023 19:36:17 +0000 (19:36 +0000)] 
Update default delay for rlm_delay

Due to the option being parsed as a tmpl, if it is 1.0, it becomes a
float, which doesn't have a cast to fr_time_delta_t.

Adding the time unit, makes it a string which parses fine.

2 years agoHandle corner case in using fr_sbuff_is...() functions on markers (#4839)
Nick Porter [Fri, 6 Jan 2023 16:53:26 +0000 (16:53 +0000)] 
Handle corner case in using fr_sbuff_is...() functions on markers (#4839)

* Corner case fix for calling an fr_sbuff_is... function on a marker

Previously if fr_sbuff_is_...() was called on a marker and the buffer
had advanced past the end, then the function always returned false,
regardless of the character the marker was pointing at.

* Test to check fr_sbuff_is..() handles markers regardless of buffer position

* Correct parsing <num>.0 into fr_time_delta_t

2 years agorlm_rest: Don't skip alternate REST-HTTP-Header entries (#4838)
Terry Burton [Fri, 6 Jan 2023 16:34:54 +0000 (16:34 +0000)] 
rlm_rest: Don't skip alternate REST-HTTP-Header entries (#4838)

2 years agoOnly cleanup child processes if the exec has been populated
Nick Porter [Fri, 6 Jan 2023 11:16:03 +0000 (11:16 +0000)] 
Only cleanup child processes if the exec has been populated

2 years agoAdd error message when delay value fails to parse
Nick Porter [Fri, 6 Jan 2023 11:14:34 +0000 (11:14 +0000)] 
Add error message when delay value fails to parse

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:55 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:33 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

2 years agoRevert "util: Add new fr_dict_global_set_lib_dir() function (#4835)"
Arran Cudbard-Bell [Thu, 5 Jan 2023 20:12:49 +0000 (15:12 -0500)] 
Revert "util: Add new fr_dict_global_set_lib_dir() function (#4835)"

This reverts commit 2a1a9df08f4baf7d76592325d39c9dd1dd704912.

2 years agoutil: Add new fr_dict_global_set_lib_dir() function (#4835)
Jorge Pereira [Thu, 5 Jan 2023 19:57:28 +0000 (16:57 -0300)] 
util: Add new fr_dict_global_set_lib_dir() function (#4835)

It helps to add extra directories to be checked during library load.

2 years agoUse correct value for last argument of delay_add()
Nick Porter [Thu, 5 Jan 2023 17:54:20 +0000 (17:54 +0000)] 
Use correct value for last argument of delay_add()

2 years agoAlign worker bounds on max_request_time with docs
Nick Porter [Thu, 5 Jan 2023 17:07:07 +0000 (17:07 +0000)] 
Align worker bounds on max_request_time with docs

2 years agomax_request_time is a fr_time_delta_t not uint32_t
Nick Porter [Thu, 5 Jan 2023 17:05:54 +0000 (17:05 +0000)] 
max_request_time is a fr_time_delta_t not uint32_t

2 years agoeapol_test: Add new 'HOSTAPD_REPO' variable (#4834)
Jorge Pereira [Thu, 5 Jan 2023 15:40:16 +0000 (12:40 -0300)] 
eapol_test: Add new 'HOSTAPD_REPO' variable (#4834)

It allows us to build the 'eapol_test' using external repos like:

$ HOSTAPD_REPO="https://github.com/NetworkRADIUS/hostap" \
  HOSTAPD_GIT_TAG="feature/get_radius_reply" \
  ./scripts/ci/eapol_test-build.sh
$

2 years agouse enums when upcasting for comparisons
Alan T. DeKok [Fri, 30 Dec 2022 15:17:02 +0000 (10:17 -0500)] 
use enums when upcasting for comparisons

Note that (for now), we're not doing it in tmpl_cast_in_place(),
which *explicitly* avoids passing enums when casting.

We're also not doing it for expression / math calculations, as
it doesn't make sense to do

Service-Type = Framed-User + 1

It might make sense to use enums for IP address calculations? e.g.

Framed-IP-Address = network & mask

but at that point, you might as well just use attributes or local
variables for everything.

This is in preparation for updating the parser to force the user
to use single-quoted strings for enum names, as in:

Service-Type == 'Framed-User'

Which then means we'll also have to update the printing routines
to always print quotation marks around enums, and then update the
users file, SQL, detail file, etc.

2 years agouser-visible error messages shouldn't have function names in them
Alan T. DeKok [Thu, 29 Dec 2022 19:12:09 +0000 (14:12 -0500)] 
user-visible error messages shouldn't have function names in them

2 years agowe can't define ENUMs for strings or structural types
Alan T. DeKok [Thu, 29 Dec 2022 19:10:57 +0000 (14:10 -0500)] 
we can't define ENUMs for strings or structural types

2 years agonotes for when we parse expressions
Alan T. DeKok [Thu, 29 Dec 2022 18:57:48 +0000 (13:57 -0500)] 
notes for when we parse expressions

2 years agoascend.h is no longer used
Alan T. DeKok [Wed, 28 Dec 2022 22:04:28 +0000 (17:04 -0500)] 
ascend.h is no longer used

2 years agofr_dict_attr_by_oid() first check if the 'err' is valid (#4830)
Jorge Pereira [Tue, 27 Dec 2022 13:52:17 +0000 (10:52 -0300)] 
fr_dict_attr_by_oid() first check if the 'err' is valid (#4830)

2 years agofr_dict_attr_by_oid() should parse the entire input string
Alan T. DeKok [Tue, 27 Dec 2022 13:43:22 +0000 (08:43 -0500)] 
fr_dict_attr_by_oid() should parse the entire input string

if it doesn't, then the input string contains a valid attribute,
but then ends with an invalid character, or with an unknown
attribute.

2 years agoallow unknown attributes to be TLVs
Alan T. DeKok [Thu, 22 Dec 2022 14:55:44 +0000 (09:55 -0500)] 
allow unknown attributes to be TLVs

Fix up printing so that we can swap from known ancestors to
unknown da's, and still print things correctly.

Fix up pair verification to allow TLVs as unknown attributes.

Update the RADIUS decoder to check if unknown attributes can be
decoded as TLVs.  And if so, do so.  The odds of anything else
decoding correctly as a TLV are vanishingly small.

Add tests for encoding and decoding unknown TLVs.  Previously we
could represent them and encode them as OID strings, but the decoding
process would only decode them as a top-level "unknown", with
an opaque blob of data for contents.  It now decodes them as OID
strings, too.

2 years agoRemove annotation inside macro definition (#4829)
James Jones [Wed, 21 Dec 2022 19:06:05 +0000 (13:06 -0600)] 
Remove annotation inside macro definition (#4829)

Such annotations have no effect, so they're just clutter.

2 years agoensure that type_size and length are set for unknown vendors
Alan T. DeKok [Wed, 21 Dec 2022 17:46:08 +0000 (12:46 -0500)] 
ensure that type_size and length are set for unknown vendors

that information is used to encode attributes.

2 years agothis is no longer used
Alan T. DeKok [Wed, 21 Dec 2022 15:36:15 +0000 (10:36 -0500)] 
this is no longer used

2 years agojust allocate a vendor, and let the rest of the code figure it out
Alan T. DeKok [Wed, 21 Dec 2022 15:35:29 +0000 (10:35 -0500)] 
just allocate a vendor, and let the rest of the code figure it out

and fix unknown child allocation, which was using the wrong parent.

2 years agocorrect comment
Alan T. DeKok [Wed, 21 Dec 2022 15:25:36 +0000 (10:25 -0500)] 
correct comment

2 years agouse the correct API here.
Alan T. DeKok [Wed, 21 Dec 2022 15:24:59 +0000 (10:24 -0500)] 
use the correct API here.

There's no need to create a vendor intermediary

2 years agodon't use talloc_parent()
Alan T. DeKok [Wed, 21 Dec 2022 15:08:24 +0000 (10:08 -0500)] 
don't use talloc_parent()

passing a ctx is easy, and rather a lot faster.

2 years agoremove needs_async flag
Alan T. DeKok [Fri, 16 Dec 2022 17:40:48 +0000 (12:40 -0500)] 
remove needs_async flag

as it is no longer used

2 years agoremove xlat_sync_required()
Alan T. DeKok [Fri, 16 Dec 2022 14:33:25 +0000 (09:33 -0500)] 
remove xlat_sync_required()

synchronous xlats now call unlang_interpret_synchronous(), and
thus can deal with async xlats

2 years agotmpl_async_required() already calls xlat_async_required()
Alan T. DeKok [Thu, 15 Dec 2022 20:38:34 +0000 (15:38 -0500)] 
tmpl_async_required() already calls xlat_async_required()

2 years agoremove FR_TYPE_NON_BLOCKING
Alan T. DeKok [Thu, 15 Dec 2022 19:55:53 +0000 (14:55 -0500)] 
remove FR_TYPE_NON_BLOCKING

as it's not really used or needed, now that the synchronous xlat
code can call unlang_interpret_synchronous()

2 years agoadd assert to match commit b5c9a3cd25121
Alan T. DeKok [Thu, 15 Dec 2022 15:13:36 +0000 (10:13 -0500)] 
add assert to match commit b5c9a3cd25121

2 years agoFix missing headers so clangd stops complaining
Arran Cudbard-Bell [Thu, 15 Dec 2022 18:06:26 +0000 (12:06 -0600)] 
Fix missing headers so clangd stops complaining

2 years agoPrint the size of fr_rb_tree_t in radsize
Arran Cudbard-Bell [Thu, 15 Dec 2022 17:44:04 +0000 (11:44 -0600)] 
Print the size of fr_rb_tree_t in radsize

2 years agoalways set our_parent
Alan T. DeKok [Thu, 15 Dec 2022 14:57:44 +0000 (09:57 -0500)] 
always set our_parent

2 years agoopendir may fail. Fixes #4827
Alan T. DeKok [Thu, 15 Dec 2022 14:19:12 +0000 (09:19 -0500)] 
opendir may fail.  Fixes #4827

2 years agostill go to "next" attribute if there's no data encoded
Alan T. DeKok [Wed, 14 Dec 2022 13:12:35 +0000 (08:12 -0500)] 
still go to "next" attribute if there's no data encoded

RFC 2865 Section 5 days of length zero (0) MUST NOT be sent;
omit the entire attribute instead.

2 years agoour_parent cannot be NULL here
Alan T. DeKok [Tue, 13 Dec 2022 19:34:46 +0000 (14:34 -0500)] 
our_parent cannot be NULL here

2 years agoCatch uses of uninitialised fields
Arran Cudbard-Bell [Thu, 15 Dec 2022 02:27:10 +0000 (20:27 -0600)] 
Catch uses of uninitialised fields

2 years agoFix invalid test
Arran Cudbard-Bell [Thu, 15 Dec 2022 02:23:34 +0000 (20:23 -0600)] 
Fix invalid test

2 years agoFix field alignment issue
Arran Cudbard-Bell [Thu, 15 Dec 2022 01:03:22 +0000 (19:03 -0600)] 
Fix field alignment issue

2 years agoMove size_t into a struct with the variable length value fields
Arran Cudbard-Bell [Wed, 14 Dec 2022 23:54:11 +0000 (17:54 -0600)] 
Move size_t into a struct with the variable length value fields

Re-arrange fields in fr_value_box_t to take size from 104 bytes -> 64bytes

2 years agoShrink fr_dlist_head_t by packing the offset with num_elements
Arran Cudbard-Bell [Wed, 14 Dec 2022 23:50:34 +0000 (17:50 -0600)] 
Shrink fr_dlist_head_t by packing the offset with num_elements

2 years agoMove vb size field into a struct with the ptr types in fr_value_box_t
Arran Cudbard-Bell [Wed, 14 Dec 2022 23:46:29 +0000 (17:46 -0600)] 
Move vb size field into a struct with the ptr types in fr_value_box_t

Print some extra size information in radsize

2 years agoUnused macros
Arran Cudbard-Bell [Wed, 14 Dec 2022 23:39:25 +0000 (17:39 -0600)] 
Unused macros

2 years agoOnly use vb_length for variable sized values
Arran Cudbard-Bell [Wed, 14 Dec 2022 23:39:18 +0000 (17:39 -0600)] 
Only use vb_length for variable sized values

2 years agoMake clangd happy when parsing unit_test_attribute.c
Arran Cudbard-Bell [Wed, 14 Dec 2022 22:45:24 +0000 (16:45 -0600)] 
Make clangd happy when parsing unit_test_attribute.c

2 years agotypo, so we do short-circuit
Alan T. DeKok [Tue, 13 Dec 2022 16:22:34 +0000 (11:22 -0500)] 
typo, so we do short-circuit

2 years agoprint full paths in debug mode if we have them
Alan T. DeKok [Tue, 13 Dec 2022 16:08:19 +0000 (11:08 -0500)] 
print full paths in debug mode if we have them

so we're printing the tmpl name which created this VP, and not
just the name of the VP

2 years agoinherit internal flag from parent
Alan T. DeKok [Tue, 13 Dec 2022 15:50:54 +0000 (10:50 -0500)] 
inherit internal flag from parent

so we can do

&reply += {
     &26.80.10 = 0xabcdef
}

and have it show up in a RADIUS packet

2 years agoallocate real message only if we are sending a reply
Alan T. DeKok [Tue, 13 Dec 2022 15:06:29 +0000 (10:06 -0500)] 
allocate real message only if we are sending a reply

2 years agouse better names for function parameters
Alan T. DeKok [Tue, 13 Dec 2022 14:19:23 +0000 (09:19 -0500)] 
use better names for function parameters

2 years agotypo and clean up "stop" handling.
Alan T. DeKok [Tue, 13 Dec 2022 14:13:29 +0000 (09:13 -0500)] 
typo and clean up "stop" handling.

The main unlang_interpret_stop() should take care of interpreter
issues, so the worker "stop" callbac shouldn't do that.

2 years agoset STOP_PROCESSING on stop
Alan T. DeKok [Tue, 13 Dec 2022 12:59:14 +0000 (07:59 -0500)] 
set STOP_PROCESSING on stop

cancel used to do this, but no longer

2 years agoCID 1517660
Alan T. DeKok [Mon, 12 Dec 2022 20:59:59 +0000 (15:59 -0500)] 
CID 1517660

2 years agoippool_script(): fix EVALSHA with wait (#4826)
Max Khon [Tue, 13 Dec 2022 02:25:12 +0000 (04:25 +0200)] 
ippool_script(): fix EVALSHA with wait (#4826)

2 years agoAdd '-o coa_port'
Alan T. DeKok [Mon, 12 Dec 2022 20:50:55 +0000 (15:50 -0500)] 
Add '-o coa_port'

2 years agoextract condition pseudo-parsing into its own function
Alan T. DeKok [Sun, 11 Dec 2022 16:46:48 +0000 (11:46 -0500)] 
extract condition pseudo-parsing into its own function

2 years agoadd fr_skip_xlat() to mirror fr_skip_string()
Alan T. DeKok [Sun, 11 Dec 2022 15:37:29 +0000 (10:37 -0500)] 
add fr_skip_xlat() to mirror fr_skip_string()

which now takes an "end" ptr, and is a bit more intelligent

2 years agomake conditional parser use fr_skip_string()
Alan T. DeKok [Sun, 11 Dec 2022 15:11:16 +0000 (10:11 -0500)] 
make conditional parser use fr_skip_string()

in the interest of common code.

2 years agoallow (...) in xlat arguments
Alan T. DeKok [Sun, 11 Dec 2022 14:47:26 +0000 (09:47 -0500)] 
allow (...) in xlat arguments

2 years agolist_as_attr fixes
Alan T. DeKok [Sat, 10 Dec 2022 16:55:12 +0000 (11:55 -0500)] 
list_as_attr fixes

2 years agomove to v4 syntax
Alan T. DeKok [Tue, 29 Nov 2022 08:44:13 +0000 (03:44 -0500)] 
move to v4 syntax

2 years agotypo
Alan T. DeKok [Mon, 28 Nov 2022 19:44:55 +0000 (14:44 -0500)] 
typo

2 years agobetter debug output
Alan T. DeKok [Mon, 28 Nov 2022 00:16:11 +0000 (19:16 -0500)] 
better debug output

2 years agoFix arg order
Arran Cudbard-Bell [Mon, 12 Dec 2022 05:50:47 +0000 (23:50 -0600)] 
Fix arg order

2 years agoproto_detail_file.c needs main_config.h too
Arran Cudbard-Bell [Mon, 12 Dec 2022 05:01:23 +0000 (23:01 -0600)] 
proto_detail_file.c needs main_config.h too

2 years agoRe-arrange some includes
Arran Cudbard-Bell [Mon, 12 Dec 2022 04:11:09 +0000 (22:11 -0600)] 
Re-arrange some includes

2 years agoWe always need to initialise the request code so we have the list attributes
Arran Cudbard-Bell [Mon, 12 Dec 2022 04:07:38 +0000 (22:07 -0600)] 
We always need to initialise the request code so we have the list attributes

2 years agoLists should not be capitalised
Arran Cudbard-Bell [Mon, 12 Dec 2022 04:06:59 +0000 (22:06 -0600)] 
Lists should not be capitalised

2 years agoNo strlcpy in the make framework
Arran Cudbard-Bell [Sun, 11 Dec 2022 23:14:22 +0000 (17:14 -0600)] 
No strlcpy in the make framework

2 years agoCID 1503903
Arran Cudbard-Bell [Sun, 11 Dec 2022 22:15:33 +0000 (16:15 -0600)] 
CID 1503903

2 years agoCID 1503983
Arran Cudbard-Bell [Sun, 11 Dec 2022 22:14:32 +0000 (16:14 -0600)] 
CID 1503983

2 years agoTypo
Arran Cudbard-Bell [Sun, 11 Dec 2022 22:11:32 +0000 (16:11 -0600)] 
Typo

This reverts commit 270e21e9ed5ed5358f5537627c27dff322669b79.

2 years agoCID 1503986
Arran Cudbard-Bell [Sun, 11 Dec 2022 22:07:42 +0000 (16:07 -0600)] 
CID 1503986