]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Thu, 22 Oct 2020 14:37:02 +0000 (10:37 -0400)]
use "text" instead of "varchar".
there's no reason to fix these fields at a small size
Matthew Newton [Thu, 22 Oct 2020 09:27:43 +0000 (10:27 +0100)]
rlm_python: Anchor with a space so we don't mangle the middle of flags
See #3693
Stephen Blackwell [Thu, 22 Oct 2020 00:18:09 +0000 (20:18 -0400)]
rlm_smtp with unit test (#3547)
* rlm_smtp with unit test
* Fix typo, remove extraneous info.
Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
James Jones [Wed, 7 Oct 2020 22:12:26 +0000 (17:12 -0500)]
Make the underlying dbuff version of fr_radius_encode_pair() visible
This makes it possible to switch users of fr_radius_encode_pair()
over to dbuffs individually rather than all at once.
Alan T. DeKok [Wed, 21 Oct 2020 19:22:11 +0000 (15:22 -0400)]
typo
Alan T. DeKok [Wed, 21 Oct 2020 14:49:40 +0000 (10:49 -0400)]
don't list all structural types, just use the pre-existing definition
Alan T. DeKok [Tue, 20 Oct 2020 17:35:39 +0000 (13:35 -0400)]
minor tweaks
if there are errors decoding the packet, we might as well leave
pre-existing VPs in place. The caller will then generally
free all of the VPs.
Arran Cudbard-Bell [Wed, 21 Oct 2020 19:01:19 +0000 (14:01 -0500)]
Missed include
Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Arran Cudbard-Bell [Wed, 21 Oct 2020 18:09:04 +0000 (13:09 -0500)]
Not just for dictionary attributes any more
James Jones [Wed, 7 Oct 2020 21:33:27 +0000 (16:33 -0500)]
Make the underlying dbuff version of fr_dhcpv4_encode_option() visible
This makes it possible to switch users of fr_dhcpv4_encode_option()
ver to dbuffs individually rather than all at once.
James Jones [Wed, 21 Oct 2020 13:30:18 +0000 (08:30 -0500)]
Make fr_sbuff_is_hex() use isxdigit() (#3700)
James Jones [Tue, 20 Oct 2020 23:02:10 +0000 (18:02 -0500)]
Satisfy clang static analysis
Got rid of assignment to a not-thereafter-used variable.
Nick Porter [Thu, 15 Oct 2020 07:27:19 +0000 (08:27 +0100)]
Remove vp->next from decode.c
.
Nick Porter [Tue, 13 Oct 2020 13:24:58 +0000 (14:24 +0100)]
Remove vp->next from users_file.c
Nick Porter [Tue, 20 Oct 2020 13:44:18 +0000 (14:44 +0100)]
Correct doxygen comments for rlm_ldap and rlm_winbind
Nick Porter [Tue, 20 Oct 2020 12:48:41 +0000 (13:48 +0100)]
Add tidying to rlm_ldap and rlm_winbind
Nick Porter [Tue, 20 Oct 2020 12:00:27 +0000 (13:00 +0100)]
Correct doxygen
Nick Porter [Tue, 20 Oct 2020 10:55:36 +0000 (11:55 +0100)]
Remove unused VALUE_PAIR** from paircmp functions
Nick Porter [Tue, 20 Oct 2020 14:59:33 +0000 (15:59 +0100)]
move fr_dhcpv6_decode() to use fr_cursor_t
Arran Cudbard-Bell [Tue, 20 Oct 2020 03:49:46 +0000 (22:49 -0500)]
Englishify
Arran Cudbard-Bell [Tue, 20 Oct 2020 01:36:46 +0000 (20:36 -0500)]
s/__offsetof/offsetof/
Arran Cudbard-Bell [Mon, 19 Oct 2020 18:07:35 +0000 (13:07 -0500)]
Add generic extensions for different dictionary structures
Alan T. DeKok [Mon, 19 Oct 2020 17:29:33 +0000 (13:29 -0400)]
fr_dbuff_extend_lowat() returns a length, it never returns 0
Alan T. DeKok [Mon, 19 Oct 2020 17:28:49 +0000 (13:28 -0400)]
use macro instead of repeated code
Alan T. DeKok [Mon, 19 Oct 2020 13:19:17 +0000 (09:19 -0400)]
cast to allow generics to work
James Jones [Mon, 19 Oct 2020 13:10:57 +0000 (08:10 -0500)]
Add initial version of extensible dbuffs (#3589)
James Jones [Mon, 19 Oct 2020 13:09:43 +0000 (08:09 -0500)]
Convert RADIUS encode_value() to use dbuffs. (#3631)
James Jones [Mon, 19 Oct 2020 13:08:52 +0000 (08:08 -0500)]
Make the underlying dbuff version of fr_dhcpv6_encode_option() visible (#3691)
This makes it possible to switch users of fr_dhcpv6_encode_option()
over to dbuffs individually rather than all at once.
Nick Porter [Fri, 16 Oct 2020 08:14:33 +0000 (09:14 +0100)]
move fr_dhcpv4_decode() to use fr_cursor_t
Alan T. DeKok [Fri, 16 Oct 2020 18:21:52 +0000 (14:21 -0400)]
added more tests
Alan T. DeKok [Fri, 16 Oct 2020 16:19:44 +0000 (12:19 -0400)]
fix up dhcpv4 decoder.
Options are allowed to have zero length. In which case they
MUST be "octets" or "string". Or for other data types, they MUST
be converted to "raw".
Fix up the decode_value_internal() function to skip calling
fr_value_box_from_network() if there's no data.
Fix the callers to allow it to return 0 data.
fix fr_dhcpv4_decode_proto() to return the total number of bytes
decoded, instead of "0" for success.
Update and add more tests for error conditions
Alan T. DeKok [Fri, 16 Oct 2020 14:27:46 +0000 (10:27 -0400)]
copy child_struct, too
Alan T. DeKok [Fri, 16 Oct 2020 14:15:57 +0000 (10:15 -0400)]
tighten limits on VALUEs and auto-generated VALUEs.
We need to update the dictionaries to fix them.
The "Auth-Protocol' field in DHCPv6 is not really a 'key' field.
Instead, the key is a combination of 3 fields. And IANA has
assigned values for them, but it's not clear what are the
corresponding structures...
Arran Cudbard-Bell [Fri, 16 Oct 2020 14:51:15 +0000 (09:51 -0500)]
Deal with cached vendors correctly when copying
Arran Cudbard-Bell [Fri, 16 Oct 2020 14:41:26 +0000 (09:41 -0500)]
Formatting
Arran Cudbard-Bell [Fri, 16 Oct 2020 14:41:18 +0000 (09:41 -0500)]
Fix logic issue in fr_dict_attr_by_qualified_name_substr
Alan T. DeKok [Fri, 16 Oct 2020 13:30:23 +0000 (09:30 -0400)]
we don't use this
Nick Porter [Fri, 16 Oct 2020 13:28:23 +0000 (14:28 +0100)]
move sql_getvpdata() and sql_fr_pair_list_afrom_str() to use fr_cursor_t (#3690)
Arran Cudbard-Bell [Fri, 16 Oct 2020 04:34:34 +0000 (23:34 -0500)]
Temporary fix for child struct copying (i.e. don't do it)
Arran Cudbard-Bell [Thu, 15 Oct 2020 23:50:01 +0000 (18:50 -0500)]
Disable memlimit on mprotected pool
This is an upstream issue with realloc and memlimit on pools
Arran Cudbard-Bell [Thu, 15 Oct 2020 23:49:12 +0000 (18:49 -0500)]
More information on realloc failure
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:43 +0000 (14:18 -0500)]
Whitespace
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:37 +0000 (14:18 -0500)]
Fix enum debug printing
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:16 +0000 (14:18 -0500)]
Add function for debugging attribute extensions
Arran Cudbard-Bell [Thu, 15 Oct 2020 15:44:41 +0000 (10:44 -0500)]
Provide a fixup pool
Arran Cudbard-Bell [Thu, 15 Oct 2020 14:51:01 +0000 (09:51 -0500)]
We don't always have extensions
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:56:32 +0000 (08:56 -0500)]
Fix merge issue
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:51:50 +0000 (08:51 -0500)]
Unused
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:47:18 +0000 (08:47 -0500)]
Add better support for copying extensions
Move enumeration value lookups into the context of the attribute
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:40:09 +0000 (08:40 -0500)]
Shuffle functions around
Alan T. DeKok [Thu, 15 Oct 2020 13:23:26 +0000 (09:23 -0400)]
it helps to initialize hash tables before dereferencing them
Alan T. DeKok [Thu, 15 Oct 2020 12:43:41 +0000 (08:43 -0400)]
check return codes, and print useful error message
Alan T. DeKok [Thu, 15 Oct 2020 12:37:42 +0000 (08:37 -0400)]
move to fr_cursor_t API
now that we don't need to magically initialize src_list
Alan T. DeKok [Thu, 15 Oct 2020 12:34:36 +0000 (08:34 -0400)]
initialize the src_list
it is used later in the code, BUT on some code paths, the only
initialization of it is in a debug section which prints the VPs
Alan T. DeKok [Wed, 14 Oct 2020 17:47:47 +0000 (13:47 -0400)]
move fr_tacacs_decode() to use fr_cursor_t
Arran Cudbard-Bell [Wed, 14 Oct 2020 18:33:19 +0000 (13:33 -0500)]
Not there yet
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:49:21 +0000 (12:49 -0500)]
More fixes
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:47:44 +0000 (12:47 -0500)]
Check the talloc chunk before reallocing
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:46:55 +0000 (12:46 -0500)]
Allocate 'name' as part of the da
Arran Cudbard-Bell [Wed, 14 Oct 2020 14:24:19 +0000 (09:24 -0500)]
Update assert
Arran Cudbard-Bell [Wed, 14 Oct 2020 13:40:40 +0000 (08:40 -0500)]
Fix assert
Arran Cudbard-Bell [Wed, 14 Oct 2020 03:28:09 +0000 (22:28 -0500)]
No children for groups
Arran Cudbard-Bell [Wed, 14 Oct 2020 03:25:28 +0000 (22:25 -0500)]
minor hash table cleanups
Arran Cudbard-Bell [Wed, 14 Oct 2020 01:04:05 +0000 (20:04 -0500)]
Minor tweaks
Arran Cudbard-Bell [Wed, 14 Oct 2020 00:55:13 +0000 (19:55 -0500)]
Move children into extensions
Arran Cudbard-Bell [Tue, 13 Oct 2020 22:25:23 +0000 (17:25 -0500)]
Add mechanism for adding type specific dictionary extensions
Alan T. DeKok [Tue, 13 Oct 2020 20:20:45 +0000 (16:20 -0400)]
allow for struct[n] in the dictionaries
to declare that a structure is fixed-size.
Then if it's set, check the MEMBER sizes against it.
This is in preparation for allow STRUCTs to be embedded into
the middle of other STRUCTs. If they're variable sized, that's
hard. If they're fixed size, it's a lot easier.
Alan T. DeKok [Tue, 13 Oct 2020 19:22:51 +0000 (15:22 -0400)]
use correct parent
Alan T. DeKok [Tue, 13 Oct 2020 13:32:10 +0000 (09:32 -0400)]
validate the flag field even if it's zero
because the validation function also sets flags->length, among
a few other things.
This change lets us calculate the correct size of a structure
Alan T. DeKok [Tue, 13 Oct 2020 13:14:34 +0000 (09:14 -0400)]
typo
Terry Burton [Tue, 13 Oct 2020 18:02:59 +0000 (19:02 +0100)]
Tests: Stop and report when cursor test fails
Aidos [Sun, 11 Oct 2020 21:42:28 +0000 (03:42 +0600)]
fix typo
Aidos [Sun, 11 Oct 2020 21:29:28 +0000 (03:29 +0600)]
fix typo
Arran Cudbard-Bell [Tue, 13 Oct 2020 13:22:57 +0000 (08:22 -0500)]
Proper error message
Arran Cudbard-Bell [Tue, 13 Oct 2020 13:14:31 +0000 (08:14 -0500)]
Give in to static analysis stupidity
Alan T. DeKok [Tue, 13 Oct 2020 13:08:06 +0000 (09:08 -0400)]
return "false", not anything else.
and add bool/uint64 to allowed data types for bit fields
Alan T. DeKok [Tue, 13 Oct 2020 13:07:54 +0000 (09:07 -0400)]
unknown attributes are now OID 0
Arran Cudbard-Bell [Tue, 13 Oct 2020 00:16:03 +0000 (19:16 -0500)]
Convert fr_dict_print_attr_oid to sbuffs
Alan T. DeKok [Mon, 12 Oct 2020 16:48:47 +0000 (12:48 -0400)]
make fr_struct_from_network() use enumv->child_struct[0]
which now means that it doesn't care about the data type of the
key field
Alan T. DeKok [Mon, 12 Oct 2020 16:19:08 +0000 (12:19 -0400)]
cache child struct da in fr_dict_enum_t
in preparation for adding unions
Alan T. DeKok [Mon, 12 Oct 2020 12:56:35 +0000 (08:56 -0400)]
allow "ref=..." for ATTRIBUTEs of type "tlv"
so that we no longer need to duplicate atributes which have common
children.
Alan T. DeKok [Sun, 11 Oct 2020 16:27:59 +0000 (12:27 -0400)]
don't allow over-write of subtype if extra bit is used
Alan T. DeKok [Sun, 11 Oct 2020 12:25:38 +0000 (08:25 -0400)]
quiet static analyzer
Alan T. DeKok [Sun, 11 Oct 2020 11:28:19 +0000 (07:28 -0400)]
typo
Alan T. DeKok [Sun, 11 Oct 2020 11:22:50 +0000 (07:22 -0400)]
groups cause child refs to be followed
Alan T. DeKok [Sat, 10 Oct 2020 19:58:45 +0000 (15:58 -0400)]
use da->da_stack for known attributes
Alan T. DeKok [Sat, 10 Oct 2020 14:48:10 +0000 (10:48 -0400)]
add and use fr_dict_walk() function
we will need this when each structural attribute has hash tables
of child names / attributes
Alan T. DeKok [Sat, 10 Oct 2020 12:46:02 +0000 (08:46 -0400)]
add dict_attr_can_have_children()
because there are multiple checks for da->children, and we would
like to generalize / abstract these checks.
Alan T. DeKok [Fri, 9 Oct 2020 19:34:07 +0000 (15:34 -0400)]
VALUEs cannot be defined for structural data types
Alan T. DeKok [Fri, 9 Oct 2020 18:48:54 +0000 (14:48 -0400)]
add ALIAS support
which is a simpler way of defining multiple names for one
attribute. This keyword allows aliasing of the name, without
the need to repeat number, data type, etc.
At some point we will forbid duplicate ATTRIBUTE definitions,
and instead require the use of ALIAS
Arran Cudbard-Bell [Fri, 9 Oct 2020 01:41:20 +0000 (20:41 -0500)]
Use the correct parse function for attribute references
Otherwise it might produce an "unparsed" tmpl and the code will crash
Support parsing src/dst references for subrequest
Alan T. DeKok [Fri, 9 Oct 2020 13:05:37 +0000 (09:05 -0400)]
add assert to shut up static analyzer
Alan T. DeKok [Fri, 9 Oct 2020 11:35:09 +0000 (07:35 -0400)]
we can't talloc_steal() the same "da" to multiple parent "vp"s.
Alan T. DeKok [Thu, 8 Oct 2020 21:10:22 +0000 (17:10 -0400)]
remove use of vp->next
Alan T. DeKok [Thu, 8 Oct 2020 20:07:06 +0000 (16:07 -0400)]
don't access vp->next
Arran Cudbard-Bell [Fri, 9 Oct 2020 01:14:33 +0000 (20:14 -0500)]
Split fields for the various keywords into separate structures
unlang_group_t has gotten too confusing
Arran Cudbard-Bell [Thu, 8 Oct 2020 21:12:40 +0000 (16:12 -0500)]
Fix dhcpv4/raw.c
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:53:06 +0000 (15:53 -0500)]
Shorten fr_socket_addr_t to fr_socket_t
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:52:46 +0000 (15:52 -0500)]
We don't always have asan...
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:49:41 +0000 (15:49 -0500)]
Use fr_socket_addr_t in packets too