]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Fri, 20 May 2022 19:17:32 +0000 (15:17 -0400)]
update comments
Alan T. DeKok [Fri, 20 May 2022 18:53:29 +0000 (14:53 -0400)]
just use talloc_const_free()
Alan T. DeKok [Fri, 20 May 2022 18:52:56 +0000 (14:52 -0400)]
just use talloc_const_free
James Jones [Fri, 20 May 2022 16:27:28 +0000 (11:27 -0500)]
Placate -Wincompatible-pointer-types-discards-qualifiers (#4523)
Alan T. DeKok [Fri, 20 May 2022 16:07:20 +0000 (12:07 -0400)]
re-enable purify.txt tests
With some hacks to do xlat thread instantiation only when running
the xlat_purify tests. If "-p" is passed in other circumstances,
you will get weird and esoteric errors. Oh well.
That will be fixed once we get rid of conditions, and replace them
with the new xlat expressions.
Alan T. DeKok [Fri, 20 May 2022 13:42:23 +0000 (09:42 -0400)]
try to resolve tmpls, and give better errors
Alan T. DeKok [Fri, 20 May 2022 13:41:38 +0000 (09:41 -0400)]
resolve function arguments before the function itself
otherwise the function may steal the arguments into its internal
structures, where they cannot be resolved.
Alan T. DeKok [Fri, 20 May 2022 13:41:18 +0000 (09:41 -0400)]
lists are resolved as attributes
Alan T. DeKok [Fri, 20 May 2022 13:29:15 +0000 (09:29 -0400)]
initialize more fields
Alan T. DeKok [Thu, 19 May 2022 23:23:55 +0000 (19:23 -0400)]
set more flags properly, and try to resolve things.
There's (as yet) no "resolve" callback for the xlat functions,
so we can't parse things like
&Service-Type == Framed-User
The LHS will be an attribute, and the RHS will be TMPL_UNRESOLVED.
The interpreter currently does this resolution in all kinds of
complex pass2_fixup functions. We will need to move those fixups
to common code, and call the custom resolvers from xlat_resolve()
Alan T. DeKok [Thu, 19 May 2022 23:27:25 +0000 (19:27 -0400)]
let's assert at the right point.
Alan T. DeKok [Thu, 19 May 2022 23:06:55 +0000 (19:06 -0400)]
move prototype of xlat_purify()
Alan T. DeKok [Thu, 19 May 2022 23:06:41 +0000 (19:06 -0400)]
heads start out as pure
Alan T. DeKok [Thu, 19 May 2022 23:06:13 +0000 (19:06 -0400)]
initialize more fields
Alan T. DeKok [Thu, 19 May 2022 23:01:03 +0000 (19:01 -0400)]
only set destructors if they're going to do work.
This papers over certain issues with pure functions, and purifying
them. But arguably pure functions should use no instance data,
and should take no destructors. If they do, they're not pure.
Alan T. DeKok [Thu, 19 May 2022 20:12:19 +0000 (16:12 -0400)]
print flags, and don't assume XLAT_TMPLs are all attributes
Alan T. DeKok [Thu, 19 May 2022 20:11:04 +0000 (16:11 -0400)]
let's set can_purify here, too.
Note that we don't deal well with an N-ary operation which
starts off with pure children, and then has impure children
later appended. That needs a bit more thinking
Nick Porter [Fri, 20 May 2022 13:00:39 +0000 (14:00 +0100)]
Fix permissions for mods_config/sql extras in rpms
Arran Cudbard-Bell [Fri, 20 May 2022 12:46:24 +0000 (07:46 -0500)]
Don't assert on resync Close #4522
Jorge Pereira [Thu, 19 May 2022 23:00:49 +0000 (20:00 -0300)]
rlm_couchbase: Fix several issues (#4517)
James Jones [Thu, 19 May 2022 22:59:43 +0000 (17:59 -0500)]
Check return values in rlm_date.c (CID #
1503947 , #
1503971 ) (#4520)
James Jones [Thu, 19 May 2022 22:56:13 +0000 (17:56 -0500)]
Catch the non-OSX cmd->install_path == NULL case (CID #
1504302 ) (#4521)
Alan T. DeKok [Thu, 19 May 2022 18:28:50 +0000 (14:28 -0400)]
add xlat_purify() function
for now, it calls unlang_interpret_synchronous(). We'll fix
that later.
Alan T. DeKok [Thu, 19 May 2022 18:28:03 +0000 (14:28 -0400)]
shut up clang scan
Alan T. DeKok [Thu, 19 May 2022 15:59:54 +0000 (11:59 -0400)]
on second thought, this isn't necessary
Alan T. DeKok [Thu, 19 May 2022 15:38:07 +0000 (11:38 -0400)]
double-check and fix flags.
We now have a "can_purify" flag. This is set to "true" for
pure functions which have pure arguments. And for alternations
which have pure arguments.
%% is set to pure. XLAT_BOX and XLAT_LITERAL are pure, but
they are not "can_purify".
The result is that we tell if there are portions of the tree
which need additional work for purification.
Alan T. DeKok [Thu, 19 May 2022 14:48:26 +0000 (10:48 -0400)]
this loop isn't necessary. It's done by xlat_copy.
Alan T. DeKok [Thu, 19 May 2022 14:39:49 +0000 (10:39 -0400)]
update APIs to allow for "evaluate only one node"
instead of looping through everything
Nick Porter [Thu, 19 May 2022 10:36:15 +0000 (11:36 +0100)]
Add util-linux as dependency for freeradius-config rpm
Required to run the certificate generation post install script
James Jones [Wed, 18 May 2022 21:24:34 +0000 (16:24 -0500)]
Always put something in temporary buffer, if only "" (CID #
1503992 ) (#4519)
From the point where src->dst_type is determined to have fixed
size, fr_value_box_from_substr() works with a local copy... but
if fr_sbuff_remaining() returned zero, nothing was written in the
local copy. With this change, in that case, the local copy is made
an empty string, NUL-terminated.
Nick Porter [Wed, 18 May 2022 10:01:21 +0000 (11:01 +0100)]
Add a second run of installing rpm build dependencies
It has been observed that not all dependencies get installed first time
on rocky 8
Alan T. DeKok [Wed, 18 May 2022 00:30:50 +0000 (20:30 -0400)]
Revert "clean up internal requests if they have no parent"
This reverts commit
9f8b9bb3ad94687b378f5539a1010310a089bc80 .
the interpreter should still clean up some requests which have
no parent, as there are very much cases where those are leaked.
however, until we track all of those issues down, let's not
break CI
Alan T. DeKok [Wed, 18 May 2022 00:17:51 +0000 (20:17 -0400)]
clean up internal requests if they have no parent
Specifically for trigger_exec(), which can be called with
a real interpreter, but no parent for the "request" which is
running the trigger.
Alan T. DeKok [Wed, 18 May 2022 00:15:19 +0000 (20:15 -0400)]
Revert "put yielded increment / decrement into the callbacks"
This reverts commit
a3aee1615ab0986cebe596c536e840e667de2943 .
intp->func.resume() is called when a request _starts_ running
for the first time, too. Which means that we can't decrement
the "yielded" count, because it's already at zero
Alan T. DeKok [Wed, 18 May 2022 00:04:25 +0000 (20:04 -0400)]
add "help" target for laziness
Alan T. DeKok [Tue, 17 May 2022 23:58:36 +0000 (19:58 -0400)]
used
Alan T. DeKok [Tue, 17 May 2022 21:43:11 +0000 (17:43 -0400)]
remove old code and just use unlang_module_yield_to_section()
there are a few other places which use unlang_interpret_synchronous()
which could likely also be converted.
Alan T. DeKok [Tue, 17 May 2022 20:57:05 +0000 (16:57 -0400)]
check for a new event list only once.
Alan T. DeKok [Tue, 17 May 2022 20:55:25 +0000 (16:55 -0400)]
put yielded increment / decrement into the callbacks
which makes the main interpret loop a little clearer
Alan T. DeKok [Tue, 17 May 2022 15:08:19 +0000 (11:08 -0400)]
add dict in preparation for xlat_purify
Alan T. DeKok [Tue, 17 May 2022 14:39:19 +0000 (10:39 -0400)]
Revert "close on error. Fixes #4518"
This reverts commit
4040e326d7bc637f55cdb029ea3c3127de3d2a96 .
this is done by cf_stack_cleanup(), and there are many other paths
in cf_file_include() which do "return -1" without closing the
file.
Jorge Pereira [Tue, 17 May 2022 14:07:20 +0000 (11:07 -0300)]
radsniff: Add '-Z' option allowing to dump the packets (#4504)
* log: Fix fr_pair_list_log() to accept level identation parameter
* log: Fix fr_log_init_file() 'fd' set
* log: Fix fr_log_close() 'dst' check
* radsniff: Add '-Z' option allowing to dump the packets
Alan T. DeKok [Tue, 17 May 2022 13:19:52 +0000 (09:19 -0400)]
return actual offset, not bumped up by 1
Alan T. DeKok [Tue, 17 May 2022 13:19:33 +0000 (09:19 -0400)]
close on error. Fixes #4518
Alan T. DeKok [Tue, 17 May 2022 13:19:16 +0000 (09:19 -0400)]
close on error. Fixes #4518
Jorge Pereira [Tue, 26 Apr 2022 23:46:44 +0000 (20:46 -0300)]
log: Fix fr_log_close() 'dst' check
Jorge Pereira [Tue, 26 Apr 2022 23:36:14 +0000 (20:36 -0300)]
log: Fix fr_log_init_file() 'fd' set
Nick Porter [Tue, 17 May 2022 07:47:04 +0000 (08:47 +0100)]
Ensure module loading errors are printed out
Alan T. DeKok [Mon, 16 May 2022 21:13:06 +0000 (17:13 -0400)]
Alan T. DeKok [Sat, 14 May 2022 17:31:44 +0000 (13:31 -0400)]
typo
Alan T. DeKok [Sat, 14 May 2022 12:46:50 +0000 (08:46 -0400)]
shut up clang scan
Alan T. DeKok [Fri, 13 May 2022 21:48:39 +0000 (17:48 -0400)]
don't free too much
Alan T. DeKok [Fri, 13 May 2022 18:31:08 +0000 (14:31 -0400)]
move xlats to dlists.
Alan T. DeKok [Thu, 12 May 2022 18:20:01 +0000 (14:20 -0400)]
clean up in preparation for moving to lists
Alan T. DeKok [Thu, 12 May 2022 18:01:52 +0000 (14:01 -0400)]
clean up so that there's less magic.
Alan T. DeKok [Thu, 12 May 2022 17:34:54 +0000 (13:34 -0400)]
remove flags from xlat expr tokenize functions.
Alan T. DeKok [Thu, 12 May 2022 02:09:13 +0000 (22:09 -0400)]
sanity check for flags
the caller should't set run-time flags.
Alan T. DeKok [Thu, 12 May 2022 01:58:40 +0000 (21:58 -0400)]
remove flags from xlat tokenize functions.
The flags are now only used for xlat registrations.
Alan T. DeKok [Thu, 12 May 2022 01:38:18 +0000 (21:38 -0400)]
start of API cleanup
Alan T. DeKok [Thu, 12 May 2022 01:34:40 +0000 (21:34 -0400)]
minor clarifications
Alan T. DeKok [Thu, 12 May 2022 01:07:19 +0000 (21:07 -0400)]
xlat tokenize functions now only need head
not ctx, out, and flags
Alan T. DeKok [Thu, 12 May 2022 00:37:52 +0000 (20:37 -0400)]
set flags correctly.
it's probably easier to do this correctly if we have a better API
Alan T. DeKok [Thu, 12 May 2022 00:50:53 +0000 (20:50 -0400)]
xlat_resolve() no longer needs flags
Alan T. DeKok [Wed, 11 May 2022 14:12:30 +0000 (10:12 -0400)]
ensiure that xlat_resolve() can always be passed NULL flags
Alan T. DeKok [Wed, 11 May 2022 13:55:16 +0000 (09:55 -0400)]
no need to pass flags here
Alan T. DeKok [Wed, 11 May 2022 02:22:12 +0000 (22:22 -0400)]
remove xlat flags from tmpl structure
Alan T. DeKok [Wed, 11 May 2022 02:16:54 +0000 (22:16 -0400)]
start of removing xlat_flags_t from tmpl
sometimes go a bit sideways to make progress.
Alan T. DeKok [Tue, 10 May 2022 21:24:31 +0000 (17:24 -0400)]
remove flags from xlat some functions.
expose an API to get at the few flags which are needed.
move tmpls to use the API
Alan T. DeKok [Wed, 11 May 2022 02:01:02 +0000 (22:01 -0400)]
set head flags, too
Jorge Pereira [Mon, 16 May 2022 18:59:48 +0000 (15:59 -0300)]
schedule: Fix potential memory-leak (#4510)
James Jones [Mon, 16 May 2022 16:54:37 +0000 (11:54 -0500)]
Check fr_value_box_from_network(), fr_value_box_cast() returns (CID #
1469115 , #
1503931 ) (#4514)
Alan T. DeKok [Mon, 16 May 2022 16:40:25 +0000 (12:40 -0400)]
re-add flags removed erroneously
Alan T. DeKok [Sun, 15 May 2022 14:09:41 +0000 (10:09 -0400)]
Add explicit paths for OSX
because apparently some of the C compilers aren't built with the
default paths for everything on the system.
Alan T. DeKok [Sat, 14 May 2022 17:37:32 +0000 (13:37 -0400)]
fix up for OSX
newer versions of clang can't find things. So we need to manually
add the paths in.
James Jones [Fri, 13 May 2022 21:30:56 +0000 (16:30 -0500)]
Catch invalid status values in tls_cache_session_ticket_app_data_get (#4509)
James Jones [Fri, 13 May 2022 21:29:49 +0000 (16:29 -0500)]
Make load_noinstall_path() free what it doesn't return (CID #
1504304 ) (#4500)
Nick Porter [Fri, 13 May 2022 21:26:54 +0000 (22:26 +0100)]
v4: Changes needed for fr_pair_list_..._by_da macros (#4508)
James Jones [Fri, 13 May 2022 21:25:13 +0000 (16:25 -0500)]
Add checks of fr_lst_insert() calls (CID #
1503950 , #
1504014 ) (#4512)
James Jones [Fri, 13 May 2022 21:24:40 +0000 (16:24 -0500)]
Check fr_minmax_heap_alloc() return value (CID #
1504069 ) (#4513)
Nick Porter [Thu, 12 May 2022 15:52:39 +0000 (16:52 +0100)]
Define macros for adding a pair to a list and assinging its value (#4507)
James Jones [Thu, 12 May 2022 14:03:46 +0000 (09:03 -0500)]
Just adjust ext when removing "mod_" (CID #
1504300 ) (#4506)
One need only adjust ext by 4 when, in truncate_dll_name(), one
removes "mod_". Then if len exceeds 8 ext still points at the
extension, and coverity can't kvetch about not checking the value
strchr() returns (Using strchr() the second time means
"mumblefrotz.foo.dll" won't behave as expected; does that ever
turn up in practice?)
James Jones [Thu, 12 May 2022 02:47:55 +0000 (21:47 -0500)]
Switch to memmove() for truncate_dll_name() (CID #
1504298 ) (#4495)
with overlapping src/dest, strcpy() gives undefined behavior
James Jones [Thu, 12 May 2022 02:47:39 +0000 (21:47 -0500)]
Remove the needless done_init variables from tests (#4505)
This change should settle CIDs
1504383 -150439, making clear to
Coverity that rand_ctx is indeed initialized.
James Jones [Wed, 11 May 2022 21:06:40 +0000 (16:06 -0500)]
Use fr_fast_rand() to select operation in burn-in (CID #
1503935 , #
1504015 ) (#4503)
James Jones [Wed, 11 May 2022 17:34:27 +0000 (12:34 -0500)]
Convert tests to use fr_fast_rand() rather than srand()/rand() (#4502)
Coverity considers rand() risky, but data structure tests don't
require cryptographically secure pseudorandom numbers. This should
take care of CIDs
1469120 ,
1469179 ,
1503927 ,
1503935 ,
1503941 ,
1503967 ,
1503977 ,
1503990 ,
1504015 ,
1504048 , and
1504054 .
James Jones [Mon, 9 May 2022 21:38:44 +0000 (16:38 -0500)]
Check value returned by fr_pair_value_mem_alloc() (CID #
1503929 ) (#4498)
James Jones [Mon, 9 May 2022 21:38:14 +0000 (16:38 -0500)]
Correct MEM() check of fr_pair_value_mem_alloc() return value (#4497)
Arran Cudbard-Bell [Thu, 5 May 2022 22:27:54 +0000 (00:27 +0200)]
Make python configure script check that it can actually link to the python libraries
Arran Cudbard-Bell [Thu, 5 May 2022 22:27:21 +0000 (00:27 +0200)]
Fix atomic queue alignment on 32bit systems
Arran Cudbard-Bell [Thu, 5 May 2022 22:27:05 +0000 (00:27 +0200)]
stderr and stdout are macros and conflict with these fields
Arran Cudbard-Bell [Thu, 5 May 2022 14:14:50 +0000 (16:14 +0200)]
Allow building without semaphores
Arran Cudbard-Bell [Thu, 5 May 2022 12:55:03 +0000 (14:55 +0200)]
Build build system libraries with HOST_CC
Arran Cudbard-Bell [Thu, 5 May 2022 12:17:00 +0000 (14:17 +0200)]
Print out canonical target names and add "darwin"
Arran Cudbard-Bell [Thu, 5 May 2022 10:39:37 +0000 (12:39 +0200)]
Allow toolset to be set explicitly
Alan T. DeKok [Sat, 7 May 2022 13:42:35 +0000 (09:42 -0400)]
remove unused variable
Alan T. DeKok [Sat, 7 May 2022 13:40:52 +0000 (09:40 -0400)]
minor cleanups
Alan T. DeKok [Sat, 7 May 2022 12:19:49 +0000 (08:19 -0400)]
add "ignore this list" entries.
If we're inserting a new structural member, then we don't need
to undo edits to any children in it's lists. Those edits will be
undone automatically when the parent pair is undone.
We keep a separate list of "lists to ignore", and check that
before doing anything. If the list can be ignored, then we
discard delete / clear / etc.
In inserts, if the VP is structural, then remember its child list,
so that we can ignore edits to it, too.
Alan T. DeKok [Sat, 7 May 2022 12:08:39 +0000 (08:08 -0400)]
rename, as there are too many "list" things here.
James Jones [Sat, 7 May 2022 01:26:16 +0000 (20:26 -0500)]
Remove initial FR_TYPE_NULL check from fr_value_box_from_substr() (CID #
1504016 ) (#4496)
Better to let it be handled in the switch statement.
James Jones [Fri, 6 May 2022 17:36:26 +0000 (12:36 -0500)]
Free result of file_name_stripped() when needed (CID #
1504303 ) (#4494)