]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:52:43 +0000 (22:52 +0000)]
Unused macros
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:52:28 +0000 (22:52 +0000)]
Fix uninitialised fields
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:48:10 +0000 (22:48 +0000)]
Make NULL escape rules static
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:47:53 +0000 (22:47 +0000)]
Various stupid issues in value.c
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:36:05 +0000 (22:36 +0000)]
Unused
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:35:10 +0000 (22:35 +0000)]
More stupid warnings
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:09:18 +0000 (22:09 +0000)]
Fix stupid vla warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:48:10 +0000 (21:48 +0000)]
Pedantic
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:44:18 +0000 (21:44 +0000)]
Used arg
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:41:28 +0000 (21:41 +0000)]
Just toggle the individual bit
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:37:46 +0000 (21:37 +0000)]
Fix stupid -Wassign-enum warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:24:56 +0000 (21:24 +0000)]
Bad function cast
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:18:31 +0000 (18:18 +0000)]
Fix bad terminator in par test arrays
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:16:52 +0000 (18:16 +0000)]
More zero length array struct members
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:16:39 +0000 (18:16 +0000)]
Unused macro
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:14:14 +0000 (18:14 +0000)]
Fix -Wmissing-noreturn
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:11:23 +0000 (18:11 +0000)]
Dead code
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:08:42 +0000 (18:08 +0000)]
Actually used
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:07:46 +0000 (18:07 +0000)]
Extra semi
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:02:06 +0000 (18:02 +0000)]
Mark cap table len as static
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:57 +0000 (18:01 +0000)]
Not inline
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:43 +0000 (18:01 +0000)]
Unused args are used
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:33 +0000 (18:01 +0000)]
Fix dead code in tacacs encode
Arran Cudbard-Bell [Sat, 16 Jan 2021 17:50:04 +0000 (17:50 +0000)]
Capital W
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:27:16 +0000 (16:27 +0000)]
Fix arguments inside of preprocessor condition warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:26:35 +0000 (16:26 +0000)]
Typo
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:23:47 +0000 (16:23 +0000)]
Fix various pedantic warnings
Alan T. DeKok [Sat, 16 Jan 2021 16:18:25 +0000 (11:18 -0500)]
variable is used
Alan T. DeKok [Sat, 16 Jan 2021 16:15:53 +0000 (11:15 -0500)]
remove unused macro
Alan T. DeKok [Sat, 16 Jan 2021 16:15:23 +0000 (11:15 -0500)]
shut up stupid clang
Alan T. DeKok [Sat, 16 Jan 2021 16:13:36 +0000 (11:13 -0500)]
variable is used
Arran Cudbard-Bell [Sat, 16 Jan 2021 13:52:08 +0000 (13:52 +0000)]
Always provide a session state
This won't matter when we use a pool of them
# Conflicts:
# src/lib/server/state.c
Arran Cudbard-Bell [Sat, 16 Jan 2021 12:37:26 +0000 (12:37 +0000)]
Apparently we have leaks
Arran Cudbard-Bell [Fri, 15 Jan 2021 22:19:30 +0000 (22:19 +0000)]
Don't leak sate ctxs and store the request ctx
Arran Cudbard-Bell [Fri, 15 Jan 2021 22:09:52 +0000 (22:09 +0000)]
check for child ctx
Arran Cudbard-Bell [Fri, 15 Jan 2021 21:51:26 +0000 (21:51 +0000)]
shouldn't have been comitted
Arran Cudbard-Bell [Fri, 15 Jan 2021 21:39:04 +0000 (21:39 +0000)]
Fix more talloc parenting issues
Arran Cudbard-Bell [Fri, 15 Jan 2021 20:57:28 +0000 (20:57 +0000)]
Brackets!
Arran Cudbard-Bell [Fri, 15 Jan 2021 20:46:34 +0000 (20:46 +0000)]
Swap out the list heads for pairs
Rework the support for child session state to make it simpler
Fix a ton of pair parenting issues
Alan T. DeKok [Fri, 15 Jan 2021 19:26:37 +0000 (14:26 -0500)]
clean up final uses of dict_attr_size
the struct validation code now checks if (a) the da contains
a known fixed size, or (b) it's a FR_TYPE_VALUE. That covers
the same situations as before.
It still doesn't allow for variable-sized fields like dns labels,
but that will have to be another step.
now that dict_attr_size isn't used, it's removed.
Alan T. DeKok [Fri, 15 Jan 2021 16:42:56 +0000 (11:42 -0500)]
fix data types
Alan T. DeKok [Fri, 15 Jan 2021 16:19:15 +0000 (11:19 -0500)]
call fr_value_box_from_network()
instead of re-implementing a subset of that functionality
and add a test case for it
Alan T. DeKok [Fri, 15 Jan 2021 15:56:40 +0000 (10:56 -0500)]
use the actual length of the value box, instead of the dict size
which is more protocol-specific
Alan T. DeKok [Fri, 15 Jan 2021 15:51:14 +0000 (10:51 -0500)]
use network sizes instead of dict sizes
and put things into macros like commit
74d0467 , for simplicity
Alan T. DeKok [Fri, 15 Jan 2021 15:19:49 +0000 (10:19 -0500)]
tests for paircmp() against strings and attributes
Alan T. DeKok [Fri, 15 Jan 2021 15:19:18 +0000 (10:19 -0500)]
remove references to v3.1
James Jones [Thu, 14 Jan 2021 22:20:59 +0000 (16:20 -0600)]
Give access to type size info without explicit use of dict_attr_sizes[]
The change provides min_size() and max_size() macros and a Boolean
function, is_fixed_size(). All take an fr_type_t value and do the
subscripting of dict_attr_sizes for the user. References to
dict_attr_sizes[] other than definition and initialization have
been changed to use these, to exercise them and I believe make
the intent of the rewritten code clearer.
Nick Porter [Fri, 15 Jan 2021 14:21:27 +0000 (14:21 +0000)]
Add fr_pair_list_empty() to test for empty lists of fr_pair_ts (#3846)
In anticipation of migration to dlists
Alan T. DeKok [Fri, 15 Jan 2021 14:18:45 +0000 (09:18 -0500)]
don't install local HTML files
Alan T. DeKok [Fri, 15 Jan 2021 14:17:15 +0000 (09:17 -0500)]
just do "adoc -> man" into the local "man" directory
where they can be commited to git, like the "conf -> adoc"
conversions, and where the "install" process no longer needs
asciidoctor or pandoc
Alan T. DeKok [Fri, 15 Jan 2021 14:05:41 +0000 (09:05 -0500)]
printf \t is more portable
Alan T. DeKok [Fri, 15 Jan 2021 01:28:36 +0000 (20:28 -0500)]
add support for casts on existence checks on cond_eval()
the parser doesn't support it yet, and there are no test cases.
but it should eventually work.
Alan T. DeKok [Thu, 14 Jan 2021 15:31:03 +0000 (10:31 -0500)]
clear out vpt for the NULL case
Alan T. DeKok [Thu, 14 Jan 2021 15:06:36 +0000 (10:06 -0500)]
quiet here, too
Alan T. DeKok [Thu, 14 Jan 2021 14:50:25 +0000 (09:50 -0500)]
quiet clang scan
Alan T. DeKok [Thu, 14 Jan 2021 14:33:29 +0000 (09:33 -0500)]
suppress 'make install' doc if there's no asciidoctor or pandoc
Alan T. DeKok [Thu, 14 Jan 2021 13:54:19 +0000 (08:54 -0500)]
more gratuitous renaming to keep people happy
and comment the code to explain why it's not *quite* the same
as the grandparent commit
Arran Cudbard-Bell [Thu, 14 Jan 2021 12:14:14 +0000 (12:14 +0000)]
Might not have any capture data
Arran Cudbard-Bell [Thu, 14 Jan 2021 11:53:19 +0000 (11:53 +0000)]
Don't free runtime-compiled regular expressions if they've been assigned to the request
Arran Cudbard-Bell [Thu, 14 Jan 2021 11:06:42 +0000 (11:06 +0000)]
Fix typo in build framework which stopped regex named capture groups running with libpcre2
Arran Cudbard-Bell [Wed, 13 Jan 2021 22:10:05 +0000 (22:10 +0000)]
Different way of doing sanity checks for regexes
Alan T. DeKok [Wed, 13 Jan 2021 21:41:39 +0000 (16:41 -0500)]
install the docs on `make install` target
Alan T. DeKok [Wed, 13 Jan 2021 21:41:11 +0000 (16:41 -0500)]
normalize paths before sort (i.e. unique), not after
Arran Cudbard-Bell [Wed, 13 Jan 2021 19:31:34 +0000 (19:31 +0000)]
Strip unused args from cond_do_regex
Alan T. DeKok [Wed, 13 Jan 2021 17:53:23 +0000 (12:53 -0500)]
precompile regexes
so that we don't expand and compile the RHS of TMPL_TYPE_REGEX_XLAT
for every attribute we're trying to match
Alan T. DeKok [Wed, 13 Jan 2021 17:51:51 +0000 (12:51 -0500)]
fix installation of "man" files.
make "install.man" also do "install.doc.man"
remove the "order dependency" on the "man" directory, and add in
a manual "mkdir".
The top-level Makefile has a wildcard rule for the man files
which just happens to match the directories, because GNU Make is
too stupid to know what's a directory and what's a file
Alexis La Goutte [Wed, 13 Jan 2021 13:24:32 +0000 (14:24 +0100)]
Update Palo Alto Dictonary (#3842)
From https://docs.paloaltonetworks.com/resources/radius-dictionary.html
Alan T. DeKok [Tue, 12 Jan 2021 21:22:22 +0000 (16:22 -0500)]
remove unused function
Alan T. DeKok [Tue, 12 Jan 2021 20:48:14 +0000 (15:48 -0500)]
allow (&LDAP-Group == &Filter-Id)
with the appropriate casts!
Alan T. DeKok [Tue, 12 Jan 2021 20:47:47 +0000 (15:47 -0500)]
ensure that the RHS is cast to the correct data type
Alan T. DeKok [Tue, 12 Jan 2021 15:50:07 +0000 (10:50 -0500)]
add new attr to attr comparison functions
which removes all of the old code.
also update the "switch" handler to create conditions which
match what the cond_eval() code is expecting
Alan T. DeKok [Tue, 12 Jan 2021 13:13:27 +0000 (08:13 -0500)]
forbid list / regex for switch / case
we can _probably_ allow regexes for case, but that requires
additional changes to switch.c. The condition created there
must satisfy the requirements of the run-time evaluator
Alan T. DeKok [Tue, 12 Jan 2021 13:12:38 +0000 (08:12 -0500)]
hoist more sanity checks to cond_promote_values()
and ensure that for regexes, LHS is always cast to string.
This ensures less work for the run-time evaluator.
Alan T. DeKok [Mon, 11 Jan 2021 21:04:41 +0000 (16:04 -0500)]
clear box _before_ exiting
Alan T. DeKok [Mon, 11 Jan 2021 19:13:42 +0000 (14:13 -0500)]
add and/or to cond_debug()
Alan T. DeKok [Mon, 11 Jan 2021 15:32:22 +0000 (10:32 -0500)]
remove check_list from paircmp() functions
now that prefix / suffix are gone, it's no longer needed
Alan T. DeKok [Mon, 11 Jan 2021 14:05:47 +0000 (09:05 -0500)]
remove Prefix and Suffix comparisons
nothing in the default config uses them any more.
They are historical crap and should have been removed a while ago.
Alan T. DeKok [Mon, 11 Jan 2021 13:57:23 +0000 (08:57 -0500)]
define and use paircmp_virtual()
which only takes one VP, and only does comparisons to virtual
attributes.
This is the first step in getting rid of the old paircmp() API
Jorge Pereira [Tue, 12 Jan 2021 09:11:10 +0000 (06:11 -0300)]
fr_ext_debug() Fix invalid reference (#3840)
Emil Renner Berthing [Mon, 11 Jan 2021 19:22:37 +0000 (20:22 +0100)]
Add Key Identifier extensions to server.cnf
The Intel Wireless Daemon (iwd, alternative to wpa_supplicant) heavily
relies on Linux kernel interfaces for all its crypto, but the Linux
kernel doesn't seem to accept certificates without these extensions and
hence TLS will fail without them.
Arran Cudbard-Bell [Mon, 11 Jan 2021 18:06:36 +0000 (18:06 +0000)]
Because we're not allocating radiuses
Alan T. DeKok [Mon, 11 Jan 2021 03:38:22 +0000 (22:38 -0500)]
added cond_realize_tmpl()
which does a bit more than the previous code in order to
realize a tmpl
commented out for now, but all of the tests pass
Alan T. DeKok [Sun, 10 Jan 2021 20:07:52 +0000 (15:07 -0500)]
add assertion and ensure data has the correct type.
because it has always been parsed as a real data type, we
no longer need / print a cast.
Alan T. DeKok [Sun, 10 Jan 2021 19:57:43 +0000 (14:57 -0500)]
we no longer allow unresolved tmpls in the cond_eval()
Alan T. DeKok [Sun, 10 Jan 2021 19:33:53 +0000 (14:33 -0500)]
move to switch statements / arrays
so that types don't need to be ordered
Alan T. DeKok [Sun, 10 Jan 2021 17:40:08 +0000 (12:40 -0500)]
allow bare words for xlat's
Alan T. DeKok [Sun, 10 Jan 2021 15:23:10 +0000 (10:23 -0500)]
allow string/octets cast for regexes
and if there's no cast, add a cast to string. This change
removes one more run-time check.
Alan T. DeKok [Sun, 10 Jan 2021 15:06:21 +0000 (10:06 -0500)]
all tmpls have now been resolved
Alan T. DeKok [Sun, 10 Jan 2021 14:59:04 +0000 (09:59 -0500)]
hoist "move attr to LHS" from normalise to promote function
because promotion is called from the unlang compiler, and
normalise isn't.
We don't really need to normalise conditions with dynamically
defined attributes. It's useful and nice, but not critical.
Alan T. DeKok [Sun, 10 Jan 2021 14:52:56 +0000 (09:52 -0500)]
ensure that the LHS of regexes are resolved
by casting them to strings, so it's explicit what we are comparing
against.
Alan T. DeKok [Sun, 10 Jan 2021 14:38:19 +0000 (09:38 -0500)]
allow RHS cast
because most of the time we can just promote things as necessary
Alan T. DeKok [Sun, 10 Jan 2021 14:34:03 +0000 (09:34 -0500)]
treat TMPL_TYPE_EXEC as FR_TYPE_STRING, too
Alan T. DeKok [Sat, 9 Jan 2021 22:21:52 +0000 (17:21 -0500)]
resolve ALL tmpls before passing them to cond_eval()
which means that cond_eval() just has to "realize" the tmpls
before evaluating. Which makes its life a lot easier.
We also add assertions to cond_eval() in order to force that
all of the callers have realized the tmpls.
It makes no sense to call cond_eval() on things which are
tmpl_is_unresolved(). *Someone* should have determined what that
thing is.
Alan T. DeKok [Sat, 9 Jan 2021 22:20:34 +0000 (17:20 -0500)]
xlats are strings for the purpose of conditional comparisons
Alan T. DeKok [Sat, 9 Jan 2021 22:19:37 +0000 (17:19 -0500)]
don't parse double/single quoted strings as booleans
we should instead use 0/1 or bare true/false
Alan T. DeKok [Sat, 9 Jan 2021 21:51:04 +0000 (16:51 -0500)]
ensure that the "case" tmpl is always resolved
Alan T. DeKok [Sat, 9 Jan 2021 20:46:37 +0000 (15:46 -0500)]
expose fr_cond_promote_types() and call it from unlang pass2
so that we can do all of the normalizations / checks necessary,
and not just whatever hacks have gone into the compiler
Alan T. DeKok [Sat, 9 Jan 2021 20:38:18 +0000 (15:38 -0500)]
remove unused variables
Alan T. DeKok [Sat, 9 Jan 2021 19:57:51 +0000 (14:57 -0500)]
remove old functions and simplify
we now have cond_cast_tmpl(), which casts a tmpl_t, and resolves
it if necessary. It also checks for IP addr -> prefix casting,
as that depends on the values, and can't be done in fr_type_promote()
We now also have cond_promote_types(), which checks LHS / RHS
for casts, ensures that they're compatible, and calls cond_cast_tmpl()
in order to cast the LHS / RHS tmpl to the appropriate type.
As a result, some unit tests have changed. Generally more things
are now allowed, as the compiler is smarter.
The one (minor) regression is that we don't do compile-time checks
for things like (&Attr-uint8 > 256), which should arguably be a
parse error. Instead, the RHS is a 16-bit value, so we promote
the LHS to a 16-bit value. It ends up being a run-time check
which is always false.
Alan T. DeKok [Fri, 8 Jan 2021 22:56:04 +0000 (17:56 -0500)]
update cond_promote_types() to resolve unresolved tmpls
which changes the test outputs a bit, but that seems OK