]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Sun, 23 Feb 2025 13:20:48 +0000 (08:20 -0500)]
ensure that groups have a ref extension
Alan T. DeKok [Sun, 23 Feb 2025 12:50:47 +0000 (07:50 -0500)]
refs can't be NULL
Alan T. DeKok [Sun, 23 Feb 2025 12:49:50 +0000 (07:49 -0500)]
the underlying "da" may have already been freed
if it was re-written
Alan T. DeKok [Sun, 23 Feb 2025 12:49:34 +0000 (07:49 -0500)]
make error message clearer
Alan T. DeKok [Sun, 23 Feb 2025 11:33:42 +0000 (06:33 -0500)]
Require '.' or '@' in references
which ends up being a lot clearer than
DEFINE foo bar clone=foo
where the DEFINE is in a child context via BEGIN/END, and the
'clone' ref is in the root context
Update all of the dictionaries to match.
As a bonus, dict_protocol_reference() can now distinguish the
cases of "error" from "reference not found"
Update the antora documentation to match. Create a new
reference page which contains all of the documentation for
references.
Alan T. DeKok [Sun, 23 Feb 2025 11:33:08 +0000 (06:33 -0500)]
add fr_sbuff_eof(), which is easy to remember
Alan T. DeKok [Sun, 23 Feb 2025 10:46:51 +0000 (05:46 -0500)]
add and use "has_fixup" flag.
When we copy an attribute, we need to check if it has pending
fixups. If so, we can't copy it. This gives the admin a
descriptive error, rather than having something go wrong later.
This situation happens when we're cloning an attribute that has
children, and those children have fixups.
A more in-depth fix would be to move the fixup lists to the
fr_dict_t. The cloned attribute could then add itself to a
separate "clone after fixups" list. So the clone could be applied
last, after all of the fixups have been applied.
Part of the fix is checking for pending fixups and complaining.
More of the fix is setting "ref=..." immediately, if it can be
resolved. That way we avoid many pending fixups.
Alan T. DeKok [Sun, 23 Feb 2025 03:59:28 +0000 (22:59 -0500)]
typo
Alan T. DeKok [Sun, 23 Feb 2025 03:01:52 +0000 (22:01 -0500)]
ensure oid_and_value references OID-Tree
Alan T. DeKok [Sun, 23 Feb 2025 02:38:35 +0000 (21:38 -0500)]
ensure that attribute references exist
Alan T. DeKok [Sun, 23 Feb 2025 02:34:48 +0000 (21:34 -0500)]
only leaf types can have values defined
Alan T. DeKok [Sun, 23 Feb 2025 01:51:44 +0000 (20:51 -0500)]
double-check more corner cases
and update dicts to match.
Alan T. DeKok [Sat, 22 Feb 2025 23:45:27 +0000 (18:45 -0500)]
add more OIDs and update the tests
Alan T. DeKok [Sat, 22 Feb 2025 23:45:07 +0000 (18:45 -0500)]
note for more corner cases to fix
Alan T. DeKok [Sat, 22 Feb 2025 23:28:12 +0000 (18:28 -0500)]
decode unknown children, instead of erroring out
Alan T. DeKok [Sat, 22 Feb 2025 23:22:04 +0000 (18:22 -0500)]
rename variable
it's the current attribute which is malformed and should be raw,
not the parent one
Alan T. DeKok [Sat, 22 Feb 2025 22:31:06 +0000 (17:31 -0500)]
add qualifier && cpsuri, and update the tests
Alan T. DeKok [Sat, 22 Feb 2025 22:25:27 +0000 (17:25 -0500)]
allow raw.1 = { ...}
Alan T. DeKok [Sat, 22 Feb 2025 21:58:23 +0000 (16:58 -0500)]
define and use issuerAltName
Alan T. DeKok [Sat, 22 Feb 2025 21:44:51 +0000 (16:44 -0500)]
check return code
Alan T. DeKok [Sat, 22 Feb 2025 19:29:21 +0000 (14:29 -0500)]
is_oid_leaf is only for parent DER type 'sequence'
Alan T. DeKok [Sat, 22 Feb 2025 19:17:52 +0000 (14:17 -0500)]
set and enforce minimum sizes
for a number of dictinary attributes
Alan T. DeKok [Sat, 22 Feb 2025 19:02:18 +0000 (14:02 -0500)]
add 'size=MIN..MAX' and check it in more places
Alan T. DeKok [Sat, 22 Feb 2025 18:19:22 +0000 (13:19 -0500)]
check for more corner cases on decoding
the tag should be what we expect, or at least be compatible with
what we expect.
On decoding set / sequence, ensure that we mark all input data
as consumed, even if we run out of children to decode. That
way the decoder can move to the next DER item, instead of starting
to decode the next item from inside of the set / sequence.
In other words, we don't want the decoder wandering up and down
the eastern seaboard for three days, looking for Vancouver.
Alan T. DeKok [Sat, 22 Feb 2025 17:08:10 +0000 (12:08 -0500)]
more MACRO_RETURN
Alan T. DeKok [Sat, 22 Feb 2025 17:03:09 +0000 (12:03 -0500)]
narrow down string format dicts and tests
For now, we test encoding and decoding of strings by types.
Move conflicting tests to an "ignore" file. Those tests define
the dictionary attribute as one DER type, and then do test
encode / decode as a different DER type
Alan T. DeKok [Sat, 22 Feb 2025 16:21:14 +0000 (11:21 -0500)]
add tag compatible function
some attributes can be encoded in multiple ways, but will all
decode to the same FreeRADIUS data type. Adding a function
allows us to be more flexible about the input data.
Alan T. DeKok [Sat, 22 Feb 2025 16:22:23 +0000 (11:22 -0500)]
print out name instead of raw numbers
Alan T. DeKok [Sat, 22 Feb 2025 15:15:13 +0000 (10:15 -0500)]
check max for allowed values, and set default if it's not set
Alan T. DeKok [Sat, 22 Feb 2025 15:04:45 +0000 (10:04 -0500)]
sequence and set can never be structs
the FreeRADIUS type 'struct' is reserved for bit-packed fields.
Alan T. DeKok [Sat, 22 Feb 2025 14:56:14 +0000 (09:56 -0500)]
reasons are bitstring
Alan T. DeKok [Sat, 22 Feb 2025 14:33:55 +0000 (09:33 -0500)]
remove "is_choice"
iit's not used. The dictionaries instead use type "choice", or
"sequence_of=choice"
Alan T. DeKok [Sat, 22 Feb 2025 14:32:05 +0000 (09:32 -0500)]
other integer types aren't valid
Alan T. DeKok [Sat, 22 Feb 2025 14:06:08 +0000 (09:06 -0500)]
move more run-time checks to asserts
the dictionary parser / validator already checks these things
Alan T. DeKok [Sat, 22 Feb 2025 13:46:57 +0000 (08:46 -0500)]
move clean.coverage to coverage.mk
Alan T. DeKok [Sat, 22 Feb 2025 13:27:42 +0000 (08:27 -0500)]
move validation checks from run-time to load-time
and tighten them up a little bit
Alan T. DeKok [Sat, 22 Feb 2025 13:01:50 +0000 (08:01 -0500)]
tweak error checks and messages
Alan T. DeKok [Sat, 22 Feb 2025 12:48:31 +0000 (07:48 -0500)]
consistently use program name
so that we don't have hard-coded "radiusd.conf" everywhere
Nick Porter [Fri, 21 Feb 2025 15:11:07 +0000 (15:11 +0000)]
Return reply packet type, not rcode
nolade [Mon, 10 Feb 2025 15:10:52 +0000 (10:10 -0500)]
FAQ rework (33 questions) & troubleshooting guide (1st draft).
Build error fix - Concepts index xref resolved.
Updated faq, troubleshooting, added pages. Updated top-level nav file to include new entries.
nolade [Tue, 18 Feb 2025 16:59:44 +0000 (11:59 -0500)]
Partials work for single-source publishing
Alan T. DeKok [Fri, 21 Feb 2025 01:45:30 +0000 (20:45 -0500)]
remove more "&"
Alan T. DeKok [Thu, 20 Feb 2025 22:49:18 +0000 (17:49 -0500)]
just use fr_dbuff_used(). CID #
1642920
Alan T. DeKok [Thu, 20 Feb 2025 19:05:22 +0000 (14:05 -0500)]
quiet coveritry re: bit shift. CID #
1642926
Alan T. DeKok [Thu, 20 Feb 2025 19:02:39 +0000 (14:02 -0500)]
check return CID #
1642924
Alan T. DeKok [Thu, 20 Feb 2025 19:01:38 +0000 (14:01 -0500)]
limit tag value. CID #
1642922
Alan T. DeKok [Thu, 20 Feb 2025 18:58:20 +0000 (13:58 -0500)]
move to common file
now that we support loading the same dictionary from multiple
places
Alan T. DeKok [Thu, 20 Feb 2025 18:57:48 +0000 (13:57 -0500)]
set max at load time rather than run-time
Alan T. DeKok [Thu, 20 Feb 2025 18:55:55 +0000 (13:55 -0500)]
check return code. CID #
1642917 , CID #
1642918 , CID #
1642927
Alan T. DeKok [Thu, 20 Feb 2025 18:54:49 +0000 (13:54 -0500)]
check return code. CID #
1642921
Alan T. DeKok [Thu, 20 Feb 2025 18:53:02 +0000 (13:53 -0500)]
check for len==0. CID #
1642919
Alan T. DeKok [Thu, 20 Feb 2025 16:28:08 +0000 (11:28 -0500)]
allow dictionaries to be used from multiple _different_ locations
In some cases we can't "clone" attributes. So instead we allow
two different source locations to load the same dictionary
Alan T. DeKok [Thu, 20 Feb 2025 16:13:15 +0000 (11:13 -0500)]
remove is_pair
now that we have sequence_of=oid_and_value
Alan T. DeKok [Thu, 20 Feb 2025 14:10:26 +0000 (09:10 -0500)]
move run-time check to load check
Alan T. DeKok [Thu, 20 Feb 2025 14:03:44 +0000 (09:03 -0500)]
add copyright and license
Alan T. DeKok [Thu, 20 Feb 2025 01:24:31 +0000 (20:24 -0500)]
allow sequence_of=oid_and_value
and set_of=oid_and_value
which is a bit clear than 'is_pair'
Alan T. DeKok [Thu, 20 Feb 2025 00:47:25 +0000 (19:47 -0500)]
protocol files depend on the test dictionaries, too
Alan T. DeKok [Wed, 19 Feb 2025 21:15:22 +0000 (16:15 -0500)]
hoist more things during xlat_purify
Alan T. DeKok [Wed, 19 Feb 2025 20:11:55 +0000 (15:11 -0500)]
add note about future improvements
Alan T. DeKok [Wed, 19 Feb 2025 19:09:23 +0000 (14:09 -0500)]
do a better job of purifying xlats
set the can_purify flag in more places, add tests, and do
associated cleanups
Alan T. DeKok [Wed, 19 Feb 2025 18:31:34 +0000 (13:31 -0500)]
remove is_pairs and other cleanup
Also, cut some variables which weren't being used when sorting
set items (reducing code).
Fixed a test case which should not have failed, and changed it
to test an actual failing case.
Alan T. DeKok [Wed, 19 Feb 2025 16:09:40 +0000 (11:09 -0500)]
add migration flag which helps us get rid of "&"
if the flag is set, and the server is passed -C, it will complain
when the callenv config / etc. uses "&"
Alan T. DeKok [Tue, 18 Feb 2025 19:57:05 +0000 (14:57 -0500)]
CALL_ENV_FLAG_ATTRIBUTE also means concat
because we don't parsr multiple _different_ attributes from one
expansion
Alan T. DeKok [Tue, 18 Feb 2025 19:52:18 +0000 (14:52 -0500)]
remove more "&"
Alan T. DeKok [Tue, 18 Feb 2025 19:36:54 +0000 (14:36 -0500)]
remove more '&'
Alan T. DeKok [Tue, 18 Feb 2025 19:33:22 +0000 (14:33 -0500)]
remove '&'
Alan T. DeKok [Tue, 18 Feb 2025 19:29:46 +0000 (14:29 -0500)]
remove '&'
Alan T. DeKok [Tue, 18 Feb 2025 00:29:26 +0000 (19:29 -0500)]
quiet coverity. CID #
1642987
Alan T. DeKok [Mon, 17 Feb 2025 23:53:22 +0000 (18:53 -0500)]
further limit OID encoding
due to rules of first 2 fields are (x*40) + y, if the first
component is 0 or 1, then the second component has to be 0..39
If the first component is 2, then the second component can be
anything.
Alan T. DeKok [Mon, 17 Feb 2025 18:28:57 +0000 (13:28 -0500)]
clean up decode OID.
Nick Porter [Mon, 17 Feb 2025 17:53:09 +0000 (17:53 +0000)]
Remove & from policy files
Alan T. DeKok [Mon, 17 Feb 2025 17:11:27 +0000 (12:11 -0500)]
simplify encode OID and catch parse errors
so that when the OID string is not an OID string, it fails
rather than encoding "something"
Alan T. DeKok [Mon, 17 Feb 2025 16:52:06 +0000 (11:52 -0500)]
move the basic type encoding to its own file
so that we test encoding of all of the data types before we
start testing more complex things.
Add "count" to all of the inputs, too
Alan T. DeKok [Mon, 17 Feb 2025 13:11:51 +0000 (08:11 -0500)]
use DER names in dictionaries
and forbid more FreeRADIUS types earlier in the parsing process,
with better error messages.
Alan T. DeKok [Mon, 17 Feb 2025 12:56:01 +0000 (07:56 -0500)]
convert to more standard DER names
Alan T. DeKok [Mon, 17 Feb 2025 12:52:46 +0000 (07:52 -0500)]
use more descriptive error messages
Alan T. DeKok [Mon, 17 Feb 2025 12:33:10 +0000 (07:33 -0500)]
add comments
Alan T. DeKok [Mon, 17 Feb 2025 12:30:49 +0000 (07:30 -0500)]
do load-time checks, not run-time checks
if the run-time code assumes that "is_pair" is only for type
group, then enforce that when we load the dictionaries.
Alan T. DeKok [Mon, 17 Feb 2025 12:27:08 +0000 (07:27 -0500)]
rearrange to make name and parent available to validation routines
so that the type / flag validation routines have more information
with which to make their decisions.
Alan T. DeKok [Mon, 17 Feb 2025 02:25:20 +0000 (21:25 -0500)]
remove 'option=' where it can be determined automatically
Alan T. DeKok [Mon, 17 Feb 2025 02:22:02 +0000 (21:22 -0500)]
set the attribute number before checking the type and flags
so that the validation functions can double-check the attribute
number.
Alan T. DeKok [Mon, 17 Feb 2025 02:21:42 +0000 (21:21 -0500)]
update error messages with more information
Alan T. DeKok [Mon, 17 Feb 2025 02:16:48 +0000 (21:16 -0500)]
let's use lowercase names for consistency
Alan T. DeKok [Mon, 17 Feb 2025 00:15:48 +0000 (19:15 -0500)]
try to allow just 'option'
In many cases, DER defines something like
ATTRIBUTE foo 1 type option=1
this seems redundant.
We make provisions for allowing just 'option', which could then
take the option number from the attribute number.
However, the function dict_read_process_attribute() initializes
the attribute number _after_ processing the flags / type field.
Once that code has been tweaked to parse the attribute number
first, this new DER code will work. At that point, the DER
dictionaries can be updated with the following Perl script:
perl -p -i -e 'next if !/^ATTR/;s/option=\d+/option/' share/dictionary/der/dictionary*
Alan T. DeKok [Sun, 16 Feb 2025 23:18:10 +0000 (18:18 -0500)]
batten down the hatches a little more.
things which need values should really take the values
Alan T. DeKok [Sun, 16 Feb 2025 22:39:20 +0000 (17:39 -0500)]
remove 'tagnum=' for flags.
it was being used as a synonym for 'option=', and was therefore
not needed.
also remove 'class=', though it's just commented out.
The only uses of it were at the same time as setting 'option=',
and the option parser already sets the class
Alan T. DeKok [Sun, 16 Feb 2025 22:01:03 +0000 (17:01 -0500)]
limit 'der_type=foo' to compatible FreeRADIUS data types.
Except for serialNumber, which is der_type=integer, and FreeRADIUS
type 'octets'. That's because the serial numbers are larger than
64 bits, and we really don't need to see them as decimal values.
Update the decoder to allow this case. The encoder already
allowed it, so we update the encoder with a comment explaining
why it's allowed.
Alan T. DeKok [Sun, 16 Feb 2025 21:35:21 +0000 (16:35 -0500)]
more cross-checks and error messages
Alan T. DeKok [Sun, 16 Feb 2025 21:29:48 +0000 (16:29 -0500)]
use consistent uint64_t for max
Alan T. DeKok [Sun, 16 Feb 2025 21:15:49 +0000 (16:15 -0500)]
don't use uint64_t for 8-bit tags
which also cleans up a lot of uses of PRIu64
Alan T. DeKok [Sun, 16 Feb 2025 21:03:33 +0000 (16:03 -0500)]
more UINT8_MAX cleanups
Alan T. DeKok [Sun, 16 Feb 2025 20:54:53 +0000 (15:54 -0500)]
lower FR_DER_TAG_MAX
there's no reason to make it UINT8_MAX, as we only support a
small number of tags.
Also update the arrays to use
array[FR_DER_TAG_MAX] = { ... }
instead of
array[] = { ..., [TAG_MAX] = false }
Alan T. DeKok [Sun, 16 Feb 2025 20:54:09 +0000 (15:54 -0500)]
be more stringent on allowed values
don't check just the first character.
Only allow tag values which we can encode and decode
Alan T. DeKok [Sun, 16 Feb 2025 20:33:07 +0000 (15:33 -0500)]
perhaps save a bit of space using single bits for booleans
Alan T. DeKok [Sun, 16 Feb 2025 20:27:37 +0000 (15:27 -0500)]
minor cleanups
Alan T. DeKok [Sun, 16 Feb 2025 20:10:25 +0000 (15:10 -0500)]
no need to say it's a tag "num".
it's an enum, and that's good enough
Alan T. DeKok [Sun, 16 Feb 2025 20:07:59 +0000 (15:07 -0500)]
remove unused array
and make other array static
Alan T. DeKok [Sat, 15 Feb 2025 20:57:23 +0000 (15:57 -0500)]
we know this can never fail
Alan T. DeKok [Sat, 15 Feb 2025 15:15:41 +0000 (10:15 -0500)]
rework encode_len() to be even simpler
and add comments which explain the functionality
Alan T. DeKok [Sat, 15 Feb 2025 13:56:55 +0000 (08:56 -0500)]
check return. CID #
1642925