]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:49:37 +0000 (17:49 -0600)]
Add gctx to dict struct
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:29:58 +0000 (17:29 -0600)]
Fixup dict free functions to work in the gctx the dictionary was allocated
Fixup unit_test_attribute to allocate test dictionaries in a different gctx
Arran Cudbard-Bell [Wed, 6 Nov 2019 23:27:38 +0000 (17:27 -0600)]
Use talloc_get_type_abort_const
Alan T. DeKok [Wed, 6 Nov 2019 22:21:24 +0000 (17:21 -0500)]
we need more memory in the default global pool.
It would be nice if the functions would check for OOM in the
global pool and return a descriptive error.
Alan T. DeKok [Wed, 6 Nov 2019 22:20:37 +0000 (17:20 -0500)]
check for OOM errors
Alan T. DeKok [Wed, 6 Nov 2019 17:28:40 +0000 (12:28 -0500)]
check limit before dereferencing it
Alan T. DeKok [Wed, 6 Nov 2019 17:26:01 +0000 (12:26 -0500)]
error out on memory allocation failures
Alan T. DeKok [Wed, 6 Nov 2019 17:24:34 +0000 (12:24 -0500)]
shut up PVS studio
Alan T. DeKok [Wed, 6 Nov 2019 17:22:14 +0000 (12:22 -0500)]
check for memory allocation failures
Alan T. DeKok [Wed, 6 Nov 2019 17:21:18 +0000 (12:21 -0500)]
move assert to before dereference of variable
Jorge Pereira [Wed, 6 Nov 2019 21:27:36 +0000 (18:27 -0300)]
Typo (#3106)
Arran Cudbard-Bell [Wed, 6 Nov 2019 20:27:58 +0000 (14:27 -0600)]
Move to a read only "config" struct in unit_test_attribute
Arran Cudbard-Bell [Wed, 6 Nov 2019 20:08:16 +0000 (14:08 -0600)]
Stupid const issues
This reverts commit
dd6375099cb27af6af99fe6fa6d45652a552759a .
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:43:37 +0000 (13:43 -0600)]
Here too.
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:42:48 +0000 (13:42 -0600)]
NULLify pointers on dl_free
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:38:22 +0000 (13:38 -0600)]
Free dictionaries later
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:14:29 +0000 (13:14 -0600)]
Return how many references remain when freeing dictionaries
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:07:00 +0000 (13:07 -0600)]
Be nicer about NULL pointers in dl_free
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:05:34 +0000 (13:05 -0600)]
More grr...
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:03:57 +0000 (13:03 -0600)]
Grr...
Arran Cudbard-Bell [Wed, 6 Nov 2019 19:00:50 +0000 (13:00 -0600)]
Typo
Arran Cudbard-Bell [Wed, 6 Nov 2019 18:59:46 +0000 (12:59 -0600)]
Make talloc_const_free return an error code
Make talloc_decrease_ref_count return the number of remaining references.
Add explicit dl_free function.
Arran Cudbard-Bell [Wed, 6 Nov 2019 18:29:58 +0000 (12:29 -0600)]
Fix more return points in fr_dict_global_init
Jorge Pereira [Wed, 6 Nov 2019 17:58:51 +0000 (14:58 -0300)]
Typo
Arran Cudbard-Bell [Wed, 6 Nov 2019 17:51:33 +0000 (11:51 -0600)]
Fix return code check
Arran Cudbard-Bell [Wed, 6 Nov 2019 17:29:06 +0000 (11:29 -0600)]
Return a handle to the global dictionary context
Alan T. DeKok [Wed, 6 Nov 2019 17:14:24 +0000 (12:14 -0500)]
convert bit test to truth test
Arran Cudbard-Bell [Wed, 6 Nov 2019 17:09:15 +0000 (11:09 -0600)]
Switch to compile time check for ASAN
Arran Cudbard-Bell [Wed, 6 Nov 2019 16:59:51 +0000 (10:59 -0600)]
Fix invalid check
Arran Cudbard-Bell [Wed, 6 Nov 2019 16:12:42 +0000 (10:12 -0600)]
Remove unused function
Arran Cudbard-Bell [Wed, 6 Nov 2019 15:50:54 +0000 (09:50 -0600)]
Remove some instances of fr_hash_table_walk
Alan T. DeKok [Wed, 6 Nov 2019 15:21:17 +0000 (10:21 -0500)]
unload dl's, too.
Alan T. DeKok [Wed, 6 Nov 2019 15:16:33 +0000 (10:16 -0500)]
free "autofree" context manually
there seems to be issues with calling it automatically via
atexit()
Alan T. DeKok [Wed, 6 Nov 2019 15:11:48 +0000 (10:11 -0500)]
set gctx to NULL and check it in more places
Alan T. DeKok [Wed, 6 Nov 2019 13:44:27 +0000 (08:44 -0500)]
set gctx to NULL on free
Arran Cudbard-Bell [Wed, 6 Nov 2019 13:11:14 +0000 (07:11 -0600)]
Revert "Use _r variant of basename and dirname"
This reverts commit
22599fd332eb13f82923f3401a1780370ac12532 .
Arran Cudbard-Bell [Wed, 6 Nov 2019 12:51:35 +0000 (06:51 -0600)]
Use _r variant of basename and dirname
Alan T. DeKok [Wed, 6 Nov 2019 12:44:42 +0000 (07:44 -0500)]
don't use dirname() or basename(). They are NOT safe.
Jorge Pereira [Tue, 5 Nov 2019 23:23:16 +0000 (20:23 -0300)]
Helpful to print the fullpath of unit test (#3103)
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:50:10 +0000 (16:50 -0600)]
log_dir not logdir
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:49:04 +0000 (16:49 -0600)]
More fixes...
Alan T. DeKok [Tue, 5 Nov 2019 22:34:06 +0000 (17:34 -0500)]
allow decode of zero-length strings
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:34:49 +0000 (16:34 -0600)]
Include missing header
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:24:58 +0000 (16:24 -0600)]
Remove rad_mkdir, and the _file from the fr_file functions
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:03:32 +0000 (16:03 -0600)]
Use name not argv[0]
Alan T. DeKok [Tue, 5 Nov 2019 22:03:11 +0000 (17:03 -0500)]
use TESTBIN which has all of the magic necessary for jlibtool
Alan T. DeKok [Tue, 5 Nov 2019 21:55:29 +0000 (16:55 -0500)]
get rid of stupid "error 0"
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:55:29 +0000 (14:55 -0600)]
We only get "waking up" messages at DEBUG4
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:45:30 +0000 (14:45 -0600)]
Print what we failed to open
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:36:44 +0000 (14:36 -0600)]
Another typo...
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:28:16 +0000 (14:28 -0600)]
Typo
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:24:31 +0000 (14:24 -0600)]
Print what we failed to allocate
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:17:25 +0000 (14:17 -0600)]
Add new top level dict_gctx, fix a bunch of const issues, make dictionaries read only at runtime
Arran Cudbard-Bell [Tue, 5 Nov 2019 18:11:48 +0000 (12:11 -0600)]
s/coerce/unconst/
Arran Cudbard-Bell [Tue, 5 Nov 2019 17:59:09 +0000 (11:59 -0600)]
Rename 'alias' to 'name' in the dictionary code
Alan T. DeKok [Tue, 5 Nov 2019 16:57:55 +0000 (11:57 -0500)]
add and use fr_dict_coerce()
to allow adding attributes to dicts at run time
Alan T. DeKok [Tue, 5 Nov 2019 16:41:41 +0000 (11:41 -0500)]
Revert "make more dict functions take const"
This reverts commit
8f063890eb37823f362c22843d2a9db87ebe907f .
Alan T. DeKok [Tue, 5 Nov 2019 16:41:31 +0000 (11:41 -0500)]
Revert "this now takes const, too"
This reverts commit
a26cfed31d81d59e50a5b2df886a8e8daef2f19e .
Alan T. DeKok [Tue, 5 Nov 2019 14:37:57 +0000 (09:37 -0500)]
make dict autoload functions take `fr_dict_t const*`
which changes everything, but trivially.
This is in preparation for adding `fr_dict_t const*` to the
`fr_application_t` struct, so that each proto_foo can point to
the dictionaries that it needs.
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:42:53 +0000 (10:42 -0600)]
Remove all the rediculously complex logging code from rlm_unbound
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:40:03 +0000 (10:40 -0600)]
Fix const issue
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:10:57 +0000 (10:10 -0600)]
Explicitly free more things
Alan T. DeKok [Tue, 5 Nov 2019 14:34:53 +0000 (09:34 -0500)]
don't use mktemp. We already have the "build" directory
Alan T. DeKok [Tue, 5 Nov 2019 14:25:56 +0000 (09:25 -0500)]
this now takes const, too
Alan T. DeKok [Tue, 5 Nov 2019 14:25:19 +0000 (09:25 -0500)]
make more dict functions take const
the caller isn't supposed to modify them, but the dict code
can.
Alan T. DeKok [Tue, 5 Nov 2019 14:07:08 +0000 (09:07 -0500)]
Packet-Type is in the DHCPv4 dict, not in the RADIUS dict
Arran Cudbard-Bell [Tue, 5 Nov 2019 14:27:54 +0000 (08:27 -0600)]
Fix const issue
Alan T. DeKok [Tue, 5 Nov 2019 02:18:38 +0000 (21:18 -0500)]
don't allow "next" to alias "ref"
so that group-type attributes can happily coexist with other ones
Alan T. DeKok [Tue, 5 Nov 2019 01:51:10 +0000 (20:51 -0500)]
free ctx on error
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:38:29 +0000 (19:38 -0600)]
Add support for test dictionaries in unit_test_attribute
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:37:29 +0000 (19:37 -0600)]
Skip internal attributes. Non-protocol attributes must also be marked as internal
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:36:25 +0000 (19:36 -0600)]
Allow dictionary root dir to be manipulated at runtime
This is to allow us to load test dictionaries
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:35:58 +0000 (19:35 -0600)]
Add space to error message
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:35:46 +0000 (19:35 -0600)]
Move file manipulation functions into their own source file
Alan T. DeKok [Tue, 5 Nov 2019 00:59:44 +0000 (19:59 -0500)]
allow first member of STRUCT to be variable length
it's stupid, but it's what we need for keyed structures
Alan T. DeKok [Tue, 5 Nov 2019 00:26:57 +0000 (19:26 -0500)]
depend on the binary, too
Alan T. DeKok [Mon, 4 Nov 2019 23:59:54 +0000 (18:59 -0500)]
use the new test framework
and print out the goddamned error messages
Alan T. DeKok [Mon, 4 Nov 2019 22:14:28 +0000 (17:14 -0500)]
move RADIUS stubtype stuff to libfreeradius-radius
Alan T. DeKok [Mon, 4 Nov 2019 22:11:31 +0000 (17:11 -0500)]
move dlopen() to load by protocol
Alan T. DeKok [Mon, 4 Nov 2019 22:01:00 +0000 (17:01 -0500)]
move lowercase to caller
Alan T. DeKok [Mon, 4 Nov 2019 21:07:56 +0000 (16:07 -0500)]
start of autoload and validation for dictionaries.
if we load protocol FOO, we now look for libfreeradius-FOO
which *should* already be loaded. i.e. when the application links
to libfreeradius-radius and calls fr_radius_init(), that function
loads the RADIUS dictionaries. Which now link back to the library.
The dictionary code then looks for a symbol called
libfreeradius_FOO_dict_protocol
and saves a pointer to that structure in the dictionary. We can
now have protocol-specific validation functions.
Alan T. DeKok [Mon, 4 Nov 2019 21:06:30 +0000 (16:06 -0500)]
lowercase library names, and mash '-' to '_'
Alan T. DeKok [Mon, 4 Nov 2019 16:10:31 +0000 (11:10 -0500)]
use talloc_const_free
Alan T. DeKok [Mon, 4 Nov 2019 15:27:20 +0000 (10:27 -0500)]
allow "eap-*" for now.
it's fugly, but means that we have good errors most of the time.
Jorge Pereira [Mon, 4 Nov 2019 19:49:06 +0000 (16:49 -0300)]
Add tests for DHCPv6 / rfc8415 (#3100)
* Add tests for DHCPv6 / rfc8415
* Because fd85:d2bb:92c:GARBAGE DATA HERE:74ae:2871:f56c:8d94 shouldn't match
* Fix file location
Arran Cudbard-Bell [Mon, 4 Nov 2019 19:30:36 +0000 (13:30 -0600)]
Revert "All protocols have to have a dictionary." - Until Alan pushes another hack
This reverts commit
5f90fef77a7f91a3853cb279b3809f5676bb9ba4 .
# Conflicts:
# share/dictionary/control/dictionary
Arran Cudbard-Bell [Mon, 4 Nov 2019 17:14:06 +0000 (11:14 -0600)]
Clean up unit tests more
Arran Cudbard-Bell [Mon, 4 Nov 2019 14:23:27 +0000 (08:23 -0600)]
Only one more bad use of vp_strvalue to go...
Alan T. DeKok [Mon, 4 Nov 2019 13:56:09 +0000 (08:56 -0500)]
always end the dictionary with a CR / LF
Arran Cudbard-Bell [Mon, 4 Nov 2019 13:53:32 +0000 (07:53 -0600)]
Take a pass through and add MEM() where it should be used, and remove it from the protocol encoder/decoders and utilities
It may be useful to set a size limit on the context we pass to the decoders to prevent an attacker exploiting a logic bug. In this case we want the decoder to handle the memory allocation failure gracefully.
Alan T. DeKok [Mon, 4 Nov 2019 13:42:46 +0000 (08:42 -0500)]
All protocols have to have a dictionary.
So we add an empty dictionary for the "control" space.
We can later add attributes for packets which are sent to workers.
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:41:59 +0000 (13:41 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:41:02 +0000 (13:41 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:37:36 +0000 (13:37 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:36:36 +0000 (13:36 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:34:54 +0000 (13:34 -0600)]
Typo
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:34:10 +0000 (13:34 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:28:56 +0000 (13:28 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:24:59 +0000 (13:24 -0600)]
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:23:27 +0000 (13:23 -0600)]