]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agouse "text" instead of "varchar".
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

5 years agorlm_python: Anchor with a space so we don't mangle the middle of flags
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

5 years agorlm_smtp with unit test (#3547)
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>
5 years agoMake the underlying dbuff version of fr_radius_encode_pair() visible
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.

5 years agotypo
Alan T. DeKok [Wed, 21 Oct 2020 19:22:11 +0000 (15:22 -0400)] 
typo

5 years agodon't list all structural types, just use the pre-existing definition
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

5 years agominor tweaks
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.

5 years agoMissed include
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>
5 years agoNot just for dictionary attributes any more
Arran Cudbard-Bell [Wed, 21 Oct 2020 18:09:04 +0000 (13:09 -0500)] 
Not just for dictionary attributes any more

5 years agoMake the underlying dbuff version of fr_dhcpv4_encode_option() visible
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.

5 years agoMake fr_sbuff_is_hex() use isxdigit() (#3700)
James Jones [Wed, 21 Oct 2020 13:30:18 +0000 (08:30 -0500)] 
Make fr_sbuff_is_hex() use isxdigit() (#3700)

5 years agoSatisfy clang static analysis
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.

5 years agoRemove vp->next from decode.c
Nick Porter [Thu, 15 Oct 2020 07:27:19 +0000 (08:27 +0100)] 
Remove vp->next from decode.c

.

5 years agoRemove vp->next from users_file.c
Nick Porter [Tue, 13 Oct 2020 13:24:58 +0000 (14:24 +0100)] 
Remove vp->next from users_file.c

5 years agoCorrect doxygen comments for rlm_ldap and rlm_winbind
Nick Porter [Tue, 20 Oct 2020 13:44:18 +0000 (14:44 +0100)] 
Correct doxygen comments for rlm_ldap and rlm_winbind

5 years agoAdd tidying to 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

5 years agoCorrect doxygen
Nick Porter [Tue, 20 Oct 2020 12:00:27 +0000 (13:00 +0100)] 
Correct doxygen

5 years agoRemove unused VALUE_PAIR** from paircmp functions
Nick Porter [Tue, 20 Oct 2020 10:55:36 +0000 (11:55 +0100)] 
Remove unused VALUE_PAIR** from paircmp functions

5 years agomove fr_dhcpv6_decode() to use fr_cursor_t
Nick Porter [Tue, 20 Oct 2020 14:59:33 +0000 (15:59 +0100)] 
move fr_dhcpv6_decode() to use fr_cursor_t

5 years agoEnglishify
Arran Cudbard-Bell [Tue, 20 Oct 2020 03:49:46 +0000 (22:49 -0500)] 
Englishify

5 years agos/__offsetof/offsetof/
Arran Cudbard-Bell [Tue, 20 Oct 2020 01:36:46 +0000 (20:36 -0500)] 
s/__offsetof/offsetof/

5 years agoAdd generic extensions for different dictionary structures
Arran Cudbard-Bell [Mon, 19 Oct 2020 18:07:35 +0000 (13:07 -0500)] 
Add generic extensions for different dictionary structures

5 years agofr_dbuff_extend_lowat() returns a length, it never returns 0
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

5 years agouse macro instead of repeated code
Alan T. DeKok [Mon, 19 Oct 2020 17:28:49 +0000 (13:28 -0400)] 
use macro instead of repeated code

5 years agocast to allow generics to work
Alan T. DeKok [Mon, 19 Oct 2020 13:19:17 +0000 (09:19 -0400)] 
cast to allow generics to work

5 years agoAdd initial version of extensible dbuffs (#3589)
James Jones [Mon, 19 Oct 2020 13:10:57 +0000 (08:10 -0500)] 
Add initial version of extensible dbuffs (#3589)

5 years agoConvert RADIUS encode_value() to use dbuffs. (#3631)
James Jones [Mon, 19 Oct 2020 13:09:43 +0000 (08:09 -0500)] 
Convert RADIUS encode_value() to use dbuffs. (#3631)

5 years agoMake the underlying dbuff version of fr_dhcpv6_encode_option() visible (#3691)
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.

5 years agomove fr_dhcpv4_decode() to use fr_cursor_t
Nick Porter [Fri, 16 Oct 2020 08:14:33 +0000 (09:14 +0100)] 
move fr_dhcpv4_decode() to use fr_cursor_t

5 years agoadded more tests
Alan T. DeKok [Fri, 16 Oct 2020 18:21:52 +0000 (14:21 -0400)] 
added more tests

5 years agofix up dhcpv4 decoder.
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

5 years agocopy child_struct, too
Alan T. DeKok [Fri, 16 Oct 2020 14:27:46 +0000 (10:27 -0400)] 
copy child_struct, too

5 years agotighten limits on VALUEs and auto-generated VALUEs.
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...

5 years agoDeal with cached vendors correctly when copying
Arran Cudbard-Bell [Fri, 16 Oct 2020 14:51:15 +0000 (09:51 -0500)] 
Deal with cached vendors correctly when copying

5 years agoFormatting
Arran Cudbard-Bell [Fri, 16 Oct 2020 14:41:26 +0000 (09:41 -0500)] 
Formatting

5 years agoFix logic issue in fr_dict_attr_by_qualified_name_substr
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

5 years agowe don't use this
Alan T. DeKok [Fri, 16 Oct 2020 13:30:23 +0000 (09:30 -0400)] 
we don't use this

5 years agomove sql_getvpdata() and sql_fr_pair_list_afrom_str() to use fr_cursor_t (#3690)
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)

5 years agoTemporary fix for child struct copying (i.e. don't do it)
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)

5 years agoDisable memlimit on mprotected pool
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

5 years agoMore information on realloc failure
Arran Cudbard-Bell [Thu, 15 Oct 2020 23:49:12 +0000 (18:49 -0500)] 
More information on realloc failure

5 years agoWhitespace
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:43 +0000 (14:18 -0500)] 
Whitespace

5 years agoFix enum debug printing
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:37 +0000 (14:18 -0500)] 
Fix enum debug printing

5 years agoAdd function for debugging attribute extensions
Arran Cudbard-Bell [Thu, 15 Oct 2020 19:18:16 +0000 (14:18 -0500)] 
Add function for debugging attribute extensions

5 years agoProvide a fixup pool
Arran Cudbard-Bell [Thu, 15 Oct 2020 15:44:41 +0000 (10:44 -0500)] 
Provide a fixup pool

5 years agoWe don't always have extensions
Arran Cudbard-Bell [Thu, 15 Oct 2020 14:51:01 +0000 (09:51 -0500)] 
We don't always have extensions

5 years agoFix merge issue
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:56:32 +0000 (08:56 -0500)] 
Fix merge issue

5 years agoUnused
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:51:50 +0000 (08:51 -0500)] 
Unused

5 years agoAdd better support for copying extensions
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

5 years agoShuffle functions around
Arran Cudbard-Bell [Thu, 15 Oct 2020 13:40:09 +0000 (08:40 -0500)] 
Shuffle functions around

5 years agoit helps to initialize hash tables before dereferencing them
Alan T. DeKok [Thu, 15 Oct 2020 13:23:26 +0000 (09:23 -0400)] 
it helps to initialize hash tables before dereferencing them

5 years agocheck return codes, and print useful error message
Alan T. DeKok [Thu, 15 Oct 2020 12:43:41 +0000 (08:43 -0400)] 
check return codes, and print useful error message

5 years agomove to fr_cursor_t API
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

5 years agoinitialize the 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

5 years agomove fr_tacacs_decode() to use fr_cursor_t
Alan T. DeKok [Wed, 14 Oct 2020 17:47:47 +0000 (13:47 -0400)] 
move fr_tacacs_decode() to use fr_cursor_t

5 years agoNot there yet
Arran Cudbard-Bell [Wed, 14 Oct 2020 18:33:19 +0000 (13:33 -0500)] 
Not there yet

5 years agoMore fixes
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:49:21 +0000 (12:49 -0500)] 
More fixes

5 years agoCheck the talloc chunk before reallocing
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:47:44 +0000 (12:47 -0500)] 
Check the talloc chunk before reallocing

5 years agoAllocate 'name' as part of the da
Arran Cudbard-Bell [Wed, 14 Oct 2020 17:46:55 +0000 (12:46 -0500)] 
Allocate 'name' as part of the da

5 years agoUpdate assert
Arran Cudbard-Bell [Wed, 14 Oct 2020 14:24:19 +0000 (09:24 -0500)] 
Update assert

5 years agoFix assert
Arran Cudbard-Bell [Wed, 14 Oct 2020 13:40:40 +0000 (08:40 -0500)] 
Fix assert

5 years agoNo children for groups
Arran Cudbard-Bell [Wed, 14 Oct 2020 03:28:09 +0000 (22:28 -0500)] 
No children for groups

5 years agominor hash table cleanups
Arran Cudbard-Bell [Wed, 14 Oct 2020 03:25:28 +0000 (22:25 -0500)] 
minor hash table cleanups

5 years agoMinor tweaks
Arran Cudbard-Bell [Wed, 14 Oct 2020 01:04:05 +0000 (20:04 -0500)] 
Minor tweaks

5 years agoMove children into extensions
Arran Cudbard-Bell [Wed, 14 Oct 2020 00:55:13 +0000 (19:55 -0500)] 
Move children into extensions

5 years agoAdd mechanism for adding type specific dictionary extensions
Arran Cudbard-Bell [Tue, 13 Oct 2020 22:25:23 +0000 (17:25 -0500)] 
Add mechanism for adding type specific dictionary extensions

5 years agoallow for struct[n] in the dictionaries
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.

5 years agouse correct parent
Alan T. DeKok [Tue, 13 Oct 2020 19:22:51 +0000 (15:22 -0400)] 
use correct parent

5 years agovalidate the flag field even if it's zero
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

5 years agotypo
Alan T. DeKok [Tue, 13 Oct 2020 13:14:34 +0000 (09:14 -0400)] 
typo

5 years agoTests: Stop and report when cursor test fails
Terry Burton [Tue, 13 Oct 2020 18:02:59 +0000 (19:02 +0100)] 
Tests: Stop and report when cursor test fails

5 years agofix typo
Aidos [Sun, 11 Oct 2020 21:42:28 +0000 (03:42 +0600)] 
fix typo

5 years agofix typo
Aidos [Sun, 11 Oct 2020 21:29:28 +0000 (03:29 +0600)] 
fix typo

5 years agoProper error message
Arran Cudbard-Bell [Tue, 13 Oct 2020 13:22:57 +0000 (08:22 -0500)] 
Proper error message

5 years agoGive in to static analysis stupidity
Arran Cudbard-Bell [Tue, 13 Oct 2020 13:14:31 +0000 (08:14 -0500)] 
Give in to static analysis stupidity

5 years agoreturn "false", not anything else.
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

5 years agounknown attributes are now OID 0
Alan T. DeKok [Tue, 13 Oct 2020 13:07:54 +0000 (09:07 -0400)] 
unknown attributes are now OID 0

5 years agoConvert fr_dict_print_attr_oid to sbuffs
Arran Cudbard-Bell [Tue, 13 Oct 2020 00:16:03 +0000 (19:16 -0500)] 
Convert fr_dict_print_attr_oid to sbuffs

5 years agomake fr_struct_from_network() use enumv->child_struct[0]
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

5 years agocache child struct da in fr_dict_enum_t
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

5 years agoallow "ref=..." for ATTRIBUTEs of type "tlv"
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.

5 years agodon't allow over-write of subtype if extra bit is used
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

5 years agoquiet static analyzer
Alan T. DeKok [Sun, 11 Oct 2020 12:25:38 +0000 (08:25 -0400)] 
quiet static analyzer

5 years agotypo
Alan T. DeKok [Sun, 11 Oct 2020 11:28:19 +0000 (07:28 -0400)] 
typo

5 years agogroups cause child refs to be followed
Alan T. DeKok [Sun, 11 Oct 2020 11:22:50 +0000 (07:22 -0400)] 
groups cause child refs to be followed

5 years agouse da->da_stack for known attributes
Alan T. DeKok [Sat, 10 Oct 2020 19:58:45 +0000 (15:58 -0400)] 
use da->da_stack for known attributes

5 years agoadd and use fr_dict_walk() function
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

5 years agoadd dict_attr_can_have_children()
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.

5 years agoVALUEs cannot be defined for structural data types
Alan T. DeKok [Fri, 9 Oct 2020 19:34:07 +0000 (15:34 -0400)] 
VALUEs cannot be defined for structural data types

5 years agoadd ALIAS support
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

5 years agoUse the correct parse function for attribute references
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

5 years agoadd assert to shut up static analyzer
Alan T. DeKok [Fri, 9 Oct 2020 13:05:37 +0000 (09:05 -0400)] 
add assert to shut up static analyzer

5 years agowe can't talloc_steal() the same "da" to multiple parent "vp"s.
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.

5 years agoremove use of vp->next
Alan T. DeKok [Thu, 8 Oct 2020 21:10:22 +0000 (17:10 -0400)] 
remove use of vp->next

5 years agodon't access vp->next
Alan T. DeKok [Thu, 8 Oct 2020 20:07:06 +0000 (16:07 -0400)] 
don't access vp->next

5 years agoSplit fields for the various keywords into separate structures
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

5 years agoFix dhcpv4/raw.c
Arran Cudbard-Bell [Thu, 8 Oct 2020 21:12:40 +0000 (16:12 -0500)] 
Fix dhcpv4/raw.c

5 years agoShorten fr_socket_addr_t to fr_socket_t
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:53:06 +0000 (15:53 -0500)] 
Shorten fr_socket_addr_t to fr_socket_t

5 years agoWe don't always have asan...
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:52:46 +0000 (15:52 -0500)] 
We don't always have asan...

5 years agoUse fr_socket_addr_t in packets too
Arran Cudbard-Bell [Thu, 8 Oct 2020 20:49:41 +0000 (15:49 -0500)] 
Use fr_socket_addr_t in packets too