]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agoUnused macros
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:52:43 +0000 (22:52 +0000)] 
Unused macros

5 years agoFix uninitialised fields
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:52:28 +0000 (22:52 +0000)] 
Fix uninitialised fields

5 years agoMake NULL escape rules static
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:48:10 +0000 (22:48 +0000)] 
Make NULL escape rules static

5 years agoVarious stupid issues in value.c
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:47:53 +0000 (22:47 +0000)] 
Various stupid issues in value.c

5 years agoUnused
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:36:05 +0000 (22:36 +0000)] 
Unused

5 years agoMore stupid warnings
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:35:10 +0000 (22:35 +0000)] 
More stupid warnings

5 years agoFix stupid vla warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 22:09:18 +0000 (22:09 +0000)] 
Fix stupid vla warning

5 years agoPedantic
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:48:10 +0000 (21:48 +0000)] 
Pedantic

5 years agoUsed arg
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:44:18 +0000 (21:44 +0000)] 
Used arg

5 years agoJust toggle the individual bit
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:41:28 +0000 (21:41 +0000)] 
Just toggle the individual bit

5 years agoFix stupid -Wassign-enum warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:37:46 +0000 (21:37 +0000)] 
Fix stupid -Wassign-enum warning

5 years agoBad function cast
Arran Cudbard-Bell [Sat, 16 Jan 2021 21:24:56 +0000 (21:24 +0000)] 
Bad function cast

5 years agoFix bad terminator in par test arrays
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:18:31 +0000 (18:18 +0000)] 
Fix bad terminator in par test arrays

5 years agoMore zero length array struct members
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:16:52 +0000 (18:16 +0000)] 
More zero length array struct members

5 years agoUnused macro
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:16:39 +0000 (18:16 +0000)] 
Unused macro

5 years agoFix -Wmissing-noreturn
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:14:14 +0000 (18:14 +0000)] 
Fix -Wmissing-noreturn

5 years agoDead code
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:11:23 +0000 (18:11 +0000)] 
Dead code

5 years agoActually used
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:08:42 +0000 (18:08 +0000)] 
Actually used

5 years agoExtra semi
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:07:46 +0000 (18:07 +0000)] 
Extra semi

5 years agoMark cap table len as static
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:02:06 +0000 (18:02 +0000)] 
Mark cap table len as static

5 years agoNot inline
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:57 +0000 (18:01 +0000)] 
Not inline

5 years agoUnused args are used
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:43 +0000 (18:01 +0000)] 
Unused args are used

5 years agoFix dead code in tacacs encode
Arran Cudbard-Bell [Sat, 16 Jan 2021 18:01:33 +0000 (18:01 +0000)] 
Fix dead code in tacacs encode

5 years agoCapital W
Arran Cudbard-Bell [Sat, 16 Jan 2021 17:50:04 +0000 (17:50 +0000)] 
Capital W

5 years agoFix arguments inside of preprocessor condition warning
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:27:16 +0000 (16:27 +0000)] 
Fix arguments inside of preprocessor condition warning

5 years agoTypo
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:26:35 +0000 (16:26 +0000)] 
Typo

5 years agoFix various pedantic warnings
Arran Cudbard-Bell [Sat, 16 Jan 2021 16:23:47 +0000 (16:23 +0000)] 
Fix various pedantic warnings

5 years agovariable is used
Alan T. DeKok [Sat, 16 Jan 2021 16:18:25 +0000 (11:18 -0500)] 
variable is used

5 years agoremove unused macro
Alan T. DeKok [Sat, 16 Jan 2021 16:15:53 +0000 (11:15 -0500)] 
remove unused macro

5 years agoshut up stupid clang
Alan T. DeKok [Sat, 16 Jan 2021 16:15:23 +0000 (11:15 -0500)] 
shut up stupid clang

5 years agovariable is used
Alan T. DeKok [Sat, 16 Jan 2021 16:13:36 +0000 (11:13 -0500)] 
variable is used

5 years agoAlways provide a session state
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

5 years agoApparently we have leaks
Arran Cudbard-Bell [Sat, 16 Jan 2021 12:37:26 +0000 (12:37 +0000)] 
Apparently we have leaks

5 years agoDon't leak sate ctxs and store the request ctx
Arran Cudbard-Bell [Fri, 15 Jan 2021 22:19:30 +0000 (22:19 +0000)] 
Don't leak sate ctxs and store the request ctx

5 years agocheck for child ctx
Arran Cudbard-Bell [Fri, 15 Jan 2021 22:09:52 +0000 (22:09 +0000)] 
check for child ctx

5 years agoshouldn't have been comitted
Arran Cudbard-Bell [Fri, 15 Jan 2021 21:51:26 +0000 (21:51 +0000)] 
shouldn't have been comitted

5 years agoFix more talloc parenting issues
Arran Cudbard-Bell [Fri, 15 Jan 2021 21:39:04 +0000 (21:39 +0000)] 
Fix more talloc parenting issues

5 years agoBrackets!
Arran Cudbard-Bell [Fri, 15 Jan 2021 20:57:28 +0000 (20:57 +0000)] 
Brackets!

5 years agoSwap out the list heads for pairs
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

5 years agoclean up final uses of dict_attr_size
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.

5 years agofix data types
Alan T. DeKok [Fri, 15 Jan 2021 16:42:56 +0000 (11:42 -0500)] 
fix data types

5 years agocall fr_value_box_from_network()
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

5 years agouse the actual length of the value box, instead of the dict size
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

5 years agouse network sizes instead of dict sizes
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

5 years agotests for paircmp() against strings and attributes
Alan T. DeKok [Fri, 15 Jan 2021 15:19:49 +0000 (10:19 -0500)] 
tests for paircmp() against strings and attributes

5 years agoremove references to v3.1
Alan T. DeKok [Fri, 15 Jan 2021 15:19:18 +0000 (10:19 -0500)] 
remove references to v3.1

5 years agoGive access to type size info without explicit use of dict_attr_sizes[]
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.

5 years agoAdd fr_pair_list_empty() to test for empty lists of fr_pair_ts (#3846)
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

5 years agodon't install local HTML files
Alan T. DeKok [Fri, 15 Jan 2021 14:18:45 +0000 (09:18 -0500)] 
don't install local HTML files

5 years agojust do "adoc -> man" into the local "man" directory
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

5 years agoprintf \t is more portable
Alan T. DeKok [Fri, 15 Jan 2021 14:05:41 +0000 (09:05 -0500)] 
printf \t is more portable

5 years agoadd support for casts on existence checks on cond_eval()
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.

5 years agoclear out vpt for the NULL case
Alan T. DeKok [Thu, 14 Jan 2021 15:31:03 +0000 (10:31 -0500)] 
clear out vpt for the NULL case

5 years agoquiet here, too
Alan T. DeKok [Thu, 14 Jan 2021 15:06:36 +0000 (10:06 -0500)] 
quiet here, too

5 years agoquiet clang scan
Alan T. DeKok [Thu, 14 Jan 2021 14:50:25 +0000 (09:50 -0500)] 
quiet clang scan

5 years agosuppress 'make install' doc if there's no asciidoctor or pandoc
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

5 years agomore gratuitous renaming to keep people happy
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

5 years agoMight not have any capture data
Arran Cudbard-Bell [Thu, 14 Jan 2021 12:14:14 +0000 (12:14 +0000)] 
Might not have any capture data

5 years agoDon't free runtime-compiled regular expressions if they've been assigned to the request
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

5 years agoFix typo in build framework which stopped regex named capture groups running with...
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

5 years agoDifferent way of doing sanity checks for regexes
Arran Cudbard-Bell [Wed, 13 Jan 2021 22:10:05 +0000 (22:10 +0000)] 
Different way of doing sanity checks for regexes

5 years agoinstall the docs on `make install` target
Alan T. DeKok [Wed, 13 Jan 2021 21:41:39 +0000 (16:41 -0500)] 
install the docs on `make install` target

5 years agonormalize paths before sort (i.e. unique), not after
Alan T. DeKok [Wed, 13 Jan 2021 21:41:11 +0000 (16:41 -0500)] 
normalize paths before sort (i.e. unique), not after

5 years agoStrip unused args from cond_do_regex
Arran Cudbard-Bell [Wed, 13 Jan 2021 19:31:34 +0000 (19:31 +0000)] 
Strip unused args from cond_do_regex

5 years agoprecompile regexes
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

5 years agofix installation of "man" files.
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

5 years agoUpdate Palo Alto Dictonary (#3842)
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

5 years agoremove unused function
Alan T. DeKok [Tue, 12 Jan 2021 21:22:22 +0000 (16:22 -0500)] 
remove unused function

5 years agoallow (&LDAP-Group == &Filter-Id)
Alan T. DeKok [Tue, 12 Jan 2021 20:48:14 +0000 (15:48 -0500)] 
allow (&LDAP-Group == &Filter-Id)

with the appropriate casts!

5 years agoensure that the RHS is cast to the correct data type
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

5 years agoadd new attr to attr comparison functions
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

5 years agoforbid list / regex for switch / case
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

5 years agohoist more sanity checks to cond_promote_values()
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.

5 years agoclear box _before_ exiting
Alan T. DeKok [Mon, 11 Jan 2021 21:04:41 +0000 (16:04 -0500)] 
clear box _before_ exiting

5 years agoadd and/or to cond_debug()
Alan T. DeKok [Mon, 11 Jan 2021 19:13:42 +0000 (14:13 -0500)] 
add and/or to cond_debug()

5 years agoremove check_list from paircmp() functions
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

5 years agoremove Prefix and Suffix comparisons
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.

5 years agodefine and use paircmp_virtual()
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

5 years agofr_ext_debug() Fix invalid reference (#3840)
Jorge Pereira [Tue, 12 Jan 2021 09:11:10 +0000 (06:11 -0300)] 
fr_ext_debug() Fix invalid reference (#3840)

5 years agoAdd Key Identifier extensions to server.cnf
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.

5 years agoBecause we're not allocating radiuses
Arran Cudbard-Bell [Mon, 11 Jan 2021 18:06:36 +0000 (18:06 +0000)] 
Because we're not allocating radiuses

5 years agoadded cond_realize_tmpl()
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

5 years agoadd assertion and ensure data has the correct type.
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.

5 years agowe no longer allow unresolved tmpls in the cond_eval()
Alan T. DeKok [Sun, 10 Jan 2021 19:57:43 +0000 (14:57 -0500)] 
we no longer allow unresolved tmpls in the cond_eval()

5 years agomove to switch statements / arrays
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

5 years agoallow bare words for xlat's
Alan T. DeKok [Sun, 10 Jan 2021 17:40:08 +0000 (12:40 -0500)] 
allow bare words for xlat's

5 years agoallow string/octets cast for regexes
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.

5 years agoall tmpls have now been resolved
Alan T. DeKok [Sun, 10 Jan 2021 15:06:21 +0000 (10:06 -0500)] 
all tmpls have now been resolved

5 years agohoist "move attr to LHS" from normalise to promote function
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.

5 years agoensure that the LHS of regexes are resolved
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.

5 years agoallow RHS cast
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

5 years agotreat TMPL_TYPE_EXEC as FR_TYPE_STRING, too
Alan T. DeKok [Sun, 10 Jan 2021 14:34:03 +0000 (09:34 -0500)] 
treat TMPL_TYPE_EXEC as FR_TYPE_STRING, too

5 years agoresolve ALL tmpls before passing them to cond_eval()
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.

5 years agoxlats are strings for the purpose of conditional comparisons
Alan T. DeKok [Sat, 9 Jan 2021 22:20:34 +0000 (17:20 -0500)] 
xlats are strings for the purpose of conditional comparisons

5 years agodon't parse double/single quoted strings as booleans
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

5 years agoensure that the "case" tmpl is always resolved
Alan T. DeKok [Sat, 9 Jan 2021 21:51:04 +0000 (16:51 -0500)] 
ensure that the "case" tmpl is always resolved

5 years agoexpose fr_cond_promote_types() and call it from unlang pass2
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

5 years agoremove unused variables
Alan T. DeKok [Sat, 9 Jan 2021 20:38:18 +0000 (15:38 -0500)] 
remove unused variables

5 years agoremove old functions and simplify
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.

5 years agoupdate cond_promote_types() to resolve unresolved tmpls
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