]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Fri, 28 Feb 2025 00:47:26 +0000 (19:47 -0500)]
hoist decode_oid_and_value() to its own function
which avoids the sequence / set decoder checking for the flag.
rename the is_pair flag to is_oid_and_value, which is clearer.
rename other functions to match
Alan T. DeKok [Thu, 27 Feb 2025 23:02:40 +0000 (18:02 -0500)]
typos
Alan T. DeKok [Thu, 27 Feb 2025 22:21:03 +0000 (17:21 -0500)]
use fr_strerror_*_push() more consistently
which helps to figure out just where the error is.
The DER data is _deeply_ nested. If we just say
failed decoding boolean
then the poor user has no idea which boolean it is. Giving a
little bit of extra context goes a long way to having someone
figure out where the error is.
Alan T. DeKok [Thu, 27 Feb 2025 22:04:50 +0000 (17:04 -0500)]
hoist expected tag into the decode_hdr() function
Alan T. DeKok [Thu, 27 Feb 2025 21:45:18 +0000 (16:45 -0500)]
rearrange / redo decode x509extensions functiono
more sanity checks, and less "back and forth" decoding with
markers
Alan T. DeKok [Thu, 27 Feb 2025 14:58:45 +0000 (09:58 -0500)]
clean up extension decoding
Alan T. DeKok [Thu, 27 Feb 2025 16:10:19 +0000 (11:10 -0500)]
hoist "set length" to before calling any decode function
Alan T. DeKok [Thu, 27 Feb 2025 14:52:50 +0000 (09:52 -0500)]
clean up OID decoding
Alan T. DeKok [Thu, 27 Feb 2025 14:42:44 +0000 (09:42 -0500)]
move OID decoding to wrapper function
to avoid conditions in the hot path
Alan T. DeKok [Thu, 27 Feb 2025 13:15:48 +0000 (08:15 -0500)]
add flags->is_option
and clean up decoding of option vs tag. Sometimes it might not
have done the right thing
Nick Porter [Thu, 27 Feb 2025 13:51:04 +0000 (13:51 +0000)]
Add fallthrough to LDAP tests
Nick Porter [Thu, 27 Feb 2025 13:49:46 +0000 (13:49 +0000)]
Add fallthrough options to sample LDAP module config
Nick Porter [Thu, 27 Feb 2025 12:20:07 +0000 (12:20 +0000)]
Add fallthrough attributes to RADIUS and TACACS profile schemas
Nick Porter [Thu, 27 Feb 2025 12:18:38 +0000 (12:18 +0000)]
Check and fallthrough attributes are needed for autz profile processing
Nick Porter [Thu, 27 Feb 2025 12:17:38 +0000 (12:17 +0000)]
Add fallthrough handling to LDAP profiles
Nick Porter [Thu, 27 Feb 2025 12:14:52 +0000 (12:14 +0000)]
Free condition results early
Nick Porter [Wed, 26 Feb 2025 20:17:43 +0000 (20:17 +0000)]
Add fallthrough_attr to LDAP query
Nick Porter [Wed, 26 Feb 2025 20:14:10 +0000 (20:14 +0000)]
Add profile fallthrough options to rlm_ldap
Alan T. DeKok [Wed, 26 Feb 2025 19:33:43 +0000 (14:33 -0500)]
add encoder, decoder, and tests for combo-ip
Alan T. DeKok [Wed, 26 Feb 2025 19:33:30 +0000 (14:33 -0500)]
options have to have class Context
Alan T. DeKok [Wed, 26 Feb 2025 19:17:36 +0000 (14:17 -0500)]
don't print timeout
Alan T. DeKok [Wed, 26 Feb 2025 18:46:30 +0000 (13:46 -0500)]
ensure that sets are only TLVs
nothing in the standard dictionaries uses SETs as groups.
They're groups only in the test dictionaries. And there is no
encoding difference between SET of tlv and SET of group.
Alan T. DeKok [Wed, 26 Feb 2025 16:18:22 +0000 (11:18 -0500)]
more checks on attributes
disallow duplicates for choices and sequences of choices
enforce parent set of / sequence of
set restrictions in preparation for doing less of this at run-time
Alan T. DeKok [Wed, 26 Feb 2025 18:30:26 +0000 (13:30 -0500)]
hoist the attr_ref_set() to before calling attr_valid()
so that the validation routine can check the refs
Alan T. DeKok [Wed, 26 Feb 2025 15:23:49 +0000 (10:23 -0500)]
FreeRADIUS type 'struct' is always a bit string
Because (for now) all of the dictionary entries are packed bits
A struct CANNOT be a sequence or a set, as our structs are always
packed fields, without any headers.
Perhaps in the future a struct could be an octetstring, which would
then be an opaque data type which is carried within DER.
Alan T. DeKok [Wed, 26 Feb 2025 15:09:43 +0000 (10:09 -0500)]
add assertions to check for bad dictionaries
Alan T. DeKok [Wed, 26 Feb 2025 15:09:23 +0000 (10:09 -0500)]
typo in AF_INET6
Alan T. DeKok [Wed, 26 Feb 2025 12:54:38 +0000 (07:54 -0500)]
tweak error messages
Alan T. DeKok [Wed, 26 Feb 2025 12:54:16 +0000 (07:54 -0500)]
print out the dictionary name, too
Nick Porter [Wed, 26 Feb 2025 19:03:06 +0000 (19:03 +0000)]
Allow status check "update" section without a list
As per the example in the sample module config
Nick Porter [Wed, 26 Feb 2025 16:44:56 +0000 (16:44 +0000)]
Use a struct to contain LDAP profile options
to match `user` and `group`
Alan T. DeKok [Wed, 26 Feb 2025 11:03:32 +0000 (06:03 -0500)]
Clarify SQLite returns error 14 "Can't open file"
print a better message if the file exists, or is not readable
Alan T. DeKok [Wed, 26 Feb 2025 10:52:58 +0000 (05:52 -0500)]
use fr_strerror_printf() instead of immediate ERROR
Alan T. DeKok [Tue, 25 Feb 2025 21:57:49 +0000 (16:57 -0500)]
tweak encode IP prefix
Alan T. DeKok [Tue, 25 Feb 2025 21:25:54 +0000 (16:25 -0500)]
encode and decode IPv4 and IPv6 prefixes
Alan T. DeKok [Tue, 25 Feb 2025 20:01:06 +0000 (15:01 -0500)]
Add encode / decode of ipv4add and ipv6addr
RFC 3779 defines a format for IP addresses, and IP prefixes
Nick Porter [Tue, 25 Feb 2025 12:28:45 +0000 (12:28 +0000)]
Track number of LDAP profiles applied
So that %ldap.profile() only returns true if at least one is applied.
The use of check_attribute to control application of LDAP profiles can
mean that the query succeeds and returns objects, but none of them get
applied - which should be treated equivalent to the query not returning
any objects
Nick Porter [Mon, 24 Feb 2025 17:38:17 +0000 (17:38 +0000)]
Correct comment about ASCII GETDATA response
The status is driven from the FreeRADIUS packet type.
Nick Porter [Mon, 24 Feb 2025 17:35:10 +0000 (17:35 +0000)]
Authorization status is automatically set from the packet type
Nick Porter [Mon, 24 Feb 2025 16:35:13 +0000 (16:35 +0000)]
Instances of the same attribute should be together
Nick Porter [Mon, 24 Feb 2025 15:53:11 +0000 (15:53 +0000)]
Restore accidentally deleted tacacsCommand
Nick Porter [Mon, 24 Feb 2025 15:37:02 +0000 (15:37 +0000)]
Patches care about whitespace
Nick Porter [Mon, 24 Feb 2025 15:24:51 +0000 (15:24 +0000)]
Fix up Debian patch
Until the main config gets re-named
Nick Porter [Mon, 24 Feb 2025 14:05:19 +0000 (14:05 +0000)]
Add profile priority / condition attrs to TACACS profiles in LDAP schema
Alan T. DeKok [Sun, 23 Feb 2025 20:43:24 +0000 (15:43 -0500)]
allocation may fail. CID #
1643157
Alan T. DeKok [Sun, 23 Feb 2025 20:31:30 +0000 (15:31 -0500)]
update tests for encoding raw DER values
Alan T. DeKok [Sun, 23 Feb 2025 20:29:31 +0000 (15:29 -0500)]
copy protocol extensions for unknown / raw attributes
which lets the der encoder create "raw" fields with the
correct DER tag.
Alan T. DeKok [Sun, 23 Feb 2025 20:27:02 +0000 (15:27 -0500)]
check child da flags for is_raw
and rename child_vp --> child
Alan T. DeKok [Sun, 23 Feb 2025 19:58:21 +0000 (14:58 -0500)]
tweak error message
Alan T. DeKok [Sun, 23 Feb 2025 19:42:15 +0000 (14:42 -0500)]
cache flags
so we don't get the extension multiple times for each attribute
that we encode.
Alan T. DeKok [Sun, 23 Feb 2025 16:22:30 +0000 (11:22 -0500)]
add support for optional flag and update the dictionaries
Alan T. DeKok [Sun, 23 Feb 2025 15:12:47 +0000 (10:12 -0500)]
more cleanups
* use "clone=..." for more things
* use "value" instead of "value-thing"
* use "attribute" instead of "attribute-thing"
* change names to match the specs
Alan T. DeKok [Sun, 23 Feb 2025 15:04:18 +0000 (10:04 -0500)]
allow attributes named 'value'
Alan T. DeKok [Sun, 23 Feb 2025 14:45:13 +0000 (09:45 -0500)]
cleanups
* lowercase most of the hex in the tests
* start documenting the DER types
* move all RelativeDistinguishedName to "clone="
which then changes the output of the tests, as the copied
versions differed in case, and sometimes in contents
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