]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 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

3 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)

3 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.

3 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.

3 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.

3 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.

3 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

3 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.

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

3 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

3 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.

3 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

3 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

3 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()

3 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()

3 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

3 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

3 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

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

3 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

3 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.

3 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

3 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

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

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

3 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

3 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

3 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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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.

3 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

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

3 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)

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

3 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

3 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

3 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.

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

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

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

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

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

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

3 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

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

3 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

3 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

3 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

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

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

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

This reverts commit 270e21e9ed5ed5358f5537627c27dff322669b79.

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

3 years agoCID 1504058
Arran Cudbard-Bell [Sun, 11 Dec 2022 22:03:25 +0000 (16:03 -0600)] 
CID 1504058

3 years agoCID 1469156
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:51:41 +0000 (15:51 -0600)] 
CID 1469156

3 years agoWas an actual error
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:40:30 +0000 (15:40 -0600)] 
Was an actual error

3 years agoTypo
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:26:17 +0000 (15:26 -0600)] 
Typo

3 years agoFix tmpl_attr_unspec not declared extern
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:25:55 +0000 (15:25 -0600)] 
Fix tmpl_attr_unspec not declared extern

3 years agoTypo
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:22:31 +0000 (15:22 -0600)] 
Typo

3 years agoFix errors when clangd can't find sanitizer/lsan_interface.h
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:22:25 +0000 (15:22 -0600)] 
Fix errors when clangd can't find sanitizer/lsan_interface.h

3 years agoMissed
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:18:20 +0000 (15:18 -0600)] 
Missed

3 years agoCID 1506690
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:16:53 +0000 (15:16 -0600)] 
CID 1506690

3 years agoCID 1508479
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:08:13 +0000 (15:08 -0600)] 
CID 1508479

3 years agoDon't use the unsafe value box copy macro
Arran Cudbard-Bell [Sun, 11 Dec 2022 21:04:48 +0000 (15:04 -0600)] 
Don't use the unsafe value box copy macro

3 years agoCoverity fixes
Arran Cudbard-Bell [Sun, 11 Dec 2022 20:34:44 +0000 (14:34 -0600)] 
Coverity fixes

3 years agoUse the latest commit from freebsd-vm
Arran Cudbard-Bell [Sun, 11 Dec 2022 20:34:08 +0000 (14:34 -0600)] 
Use the latest commit from freebsd-vm

3 years agoFix ordering issue
Arran Cudbard-Bell [Sun, 11 Dec 2022 15:25:26 +0000 (09:25 -0600)] 
Fix ordering issue

3 years agoSee if SSHFS is any more reliable
Arran Cudbard-Bell [Sun, 11 Dec 2022 04:08:47 +0000 (22:08 -0600)] 
See if SSHFS is any more reliable

3 years agoFix arg order
Arran Cudbard-Bell [Sat, 10 Dec 2022 23:24:49 +0000 (17:24 -0600)] 
Fix arg order

3 years agoRemove nonnull until we can figure out how to make it work correctly with NDEBUG
Arran Cudbard-Bell [Sat, 10 Dec 2022 23:19:08 +0000 (17:19 -0600)] 
Remove nonnull until we can figure out how to make it work correctly with NDEBUG

3 years agoMinor fixes
Arran Cudbard-Bell [Sat, 10 Dec 2022 21:56:47 +0000 (15:56 -0600)] 
Minor fixes

3 years ago100000 was a bit silly anyway
Arran Cudbard-Bell [Sat, 10 Dec 2022 21:41:11 +0000 (15:41 -0600)] 
100000 was a bit silly anyway

3 years agoSet NOTE_EXIT in fr_event_pid_early_exit to avoid assert
Arran Cudbard-Bell [Sat, 10 Dec 2022 21:19:28 +0000 (15:19 -0600)] 
Set NOTE_EXIT in fr_event_pid_early_exit to avoid assert

3 years agoRework our wrapper code around user events, and add a surrogate user event on process...
Arran Cudbard-Bell [Sat, 10 Dec 2022 21:01:45 +0000 (15:01 -0600)] 
Rework our wrapper code around user events, and add a surrogate user event on process early exit

3 years agoFix crash on start introduced by 181ae63889075fd475f007c62eabc78ac9e83265
Arran Cudbard-Bell [Sat, 10 Dec 2022 15:55:42 +0000 (09:55 -0600)] 
Fix crash on start introduced by 181ae63889075fd475f007c62eabc78ac9e83265

3 years agoIncrease timeout for fuzzers
Arran Cudbard-Bell [Sat, 10 Dec 2022 15:22:15 +0000 (09:22 -0600)] 
Increase timeout for fuzzers

Some tweaks to try and get backtraces on timeout

3 years agoReturn a more useful exit status
Arran Cudbard-Bell [Sat, 10 Dec 2022 00:26:13 +0000 (18:26 -0600)] 
Return a more useful exit status

3 years agoTypo
Arran Cudbard-Bell [Sat, 10 Dec 2022 00:13:59 +0000 (18:13 -0600)] 
Typo

3 years agoAdd ocspd verifycert boolean (#4800)
Craig Huckabee [Sat, 10 Dec 2022 00:11:36 +0000 (19:11 -0500)] 
Add ocspd verifycert boolean (#4800)

* Add verifycert boolean to disable OCSP server certificate validation

* Fix typo

Co-authored-by: Craig Huckabee <craig.huckabee@niwc.navy.mil>
3 years agolua_release_cmd: fix returning device mismatch (#4725)
Max Khon [Sat, 10 Dec 2022 00:11:09 +0000 (00:11 +0000)] 
lua_release_cmd: fix returning device mismatch (#4725)

3 years agoDeal with dl_open_by_name() toctou (CIS #1400053) (#4799)
James Jones [Sat, 10 Dec 2022 00:09:09 +0000 (18:09 -0600)] 
Deal with dl_open_by_name() toctou (CIS #1400053) (#4799)

* Deal with dl_open_by_name() toctou (CIS #1400053)

dl_open_by_name() gives you the option of looking though a list of
directories for a library, using the dlopen() function. If a dlopen()
succeeds, dl_open_by_name() succeeds and all is well. If it fails,
though, the question is why? If it doesn't exist in that directory,
you want to try the next on the list. If it does, permissions are
likely to be the problem, so report the issue and return failure.

The previous code uses access() on the path if the dlopen() fails,
hence toctou.

Unfortunately, there's not a good way to deal with it.

There is no dlopenat(), so one can't avoid toctou with dlopenat()
followed by accessat(). The only indication of why dlopen() failed
is in the string returned by dlerror()... which only guarantees
that the string is human-readable, NUL-terminated, and doesn't end
with a newline.

Looking at the result of dlerror() when the dlopen() for the
directory list fails suggests that it has the following format:

path COLON SPACE <message> COLON SPACE strerror_output

In the particular cases in the tests, that last part was always
"No such file or directory", what strerror() returns for the
ENOENT dl_open_by_name() is checking for.

As the least bad alternative, the code looks in the dlerror()
output for fr_syserror(ENOENT) to decide.

* Add note

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agoCheck return on encoding of max values (CID #1517909) (#4803)
James Jones [Sat, 10 Dec 2022 00:07:38 +0000 (18:07 -0600)] 
Check return on encoding of max values (CID #1517909) (#4803)

Coverity only gripes about FLAG_LENGTH_UINT16, but if it needs
checking, so does the FLAG_LENGTH_UINT8 case.

3 years agoHandle fr_event_timer_in_query() error return in ldap_xlat() (CID #1504007) (#4804)
James Jones [Sat, 10 Dec 2022 00:07:23 +0000 (18:07 -0600)] 
Handle fr_event_timer_in_query() error return in ldap_xlat() (CID #1504007) (#4804)

3 years agoIncrease the max number of -e commands (#4812)
Max Khon [Sat, 10 Dec 2022 00:06:44 +0000 (00:06 +0000)] 
Increase the max number of -e commands (#4812)

3 years agoAdd support for setting timeouts in jlibtool
Arran Cudbard-Bell [Sat, 10 Dec 2022 00:00:54 +0000 (18:00 -0600)] 
Add support for setting timeouts in jlibtool

For tests, this means the child receives kill(SIGKILL) after 30 seconds if it's not completed, so we don't block CI indefinitely.

3 years agoEither clang 15 or whatever standard library is being used complains about it bitterly
Arran Cudbard-Bell [Fri, 9 Dec 2022 21:41:43 +0000 (15:41 -0600)] 
Either clang 15 or whatever standard library is being used complains about it bitterly

3 years agoMake sure the file descriptors are available in case the PID wait callback is trigger...
Arran Cudbard-Bell [Fri, 9 Dec 2022 20:25:34 +0000 (14:25 -0600)] 
Make sure the file descriptors are available in case the PID wait callback is triggered early

3 years agodon't remove the .d file, it's an output file
Alan T. DeKok [Fri, 9 Dec 2022 16:17:05 +0000 (11:17 -0500)] 
don't remove the .d file, it's an output file

which is needed by the target rule

3 years agoadd docs for redundant, etc. as modules and as xlats
Alan T. DeKok [Fri, 9 Dec 2022 15:34:56 +0000 (10:34 -0500)] 
add docs for redundant, etc. as modules and as xlats

3 years agoFix exec issues on macOS
Arran Cudbard-Bell [Fri, 9 Dec 2022 14:30:07 +0000 (08:30 -0600)] 
Fix exec issues on macOS

This appears to be a behavioural difference between macOS and Linux, where waitid will non-deterministically return 0 or 1 even if the process has exited consistently.

3 years agoRemove EXEC_SYNC_WITH_CHILD hacks
Arran Cudbard-Bell [Fri, 9 Dec 2022 14:09:31 +0000 (08:09 -0600)] 
Remove EXEC_SYNC_WITH_CHILD hacks

They don't work...

3 years agoTypo
Arran Cudbard-Bell [Fri, 9 Dec 2022 13:37:03 +0000 (07:37 -0600)] 
Typo

3 years agoWait for the child to be live before continuing
Arran Cudbard-Bell [Fri, 9 Dec 2022 13:24:50 +0000 (07:24 -0600)] 
Wait for the child to be live before continuing

3 years agorest: Duplicate the pool section (#4825)
Terry Burton [Fri, 9 Dec 2022 13:12:17 +0000 (13:12 +0000)] 
rest: Duplicate the pool section (#4825)