]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alexander Scheel [Mon, 17 Aug 2020 19:39:14 +0000 (15:39 -0400)]
Remove reference to `radiusd -X` cert generation (#3573)
In
23ffb936ed1a743d817c804dc9bcd8920d6e28b0 , cert generation
capabilities were removed from startup, due to long generation times.
This was left documented in the README.
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
Alan T. DeKok [Mon, 17 Aug 2020 14:25:52 +0000 (10:25 -0400)]
remove unused assignment
Alan T. DeKok [Mon, 17 Aug 2020 13:05:40 +0000 (09:05 -0400)]
add tacacs_length()
which returns the minimum length necessary for a packet to be
passed to fr_tacacs_decode().
Note that the packet may still be invalid, because TACACS+ is a
crap protocol with almost random fields in random packets. We
don't want to duplicate decode / validation logic in multiple places.
So even if fr_tacacs_length() returns that the buffer/buffer_len
is a TACACS+ packet, we may still have fr_tacacs_decode() return
"invalid packet".
Alan T. DeKok [Mon, 17 Aug 2020 00:23:41 +0000 (20:23 -0400)]
check UNENCRYPTED flag, not multiple connections flag
Alan T. DeKok [Mon, 17 Aug 2020 00:20:03 +0000 (20:20 -0400)]
more minor cleanups
free the decrypted packet when we're done, and on all error paths.
only talloc() the decrypted packet when it's needed.
Alan T. DeKok [Mon, 17 Aug 2020 00:06:05 +0000 (20:06 -0400)]
xor should take 'const *hdr'
Alan T. DeKok [Sun, 16 Aug 2020 22:38:22 +0000 (18:38 -0400)]
re-add packet header check
and also check arg_cnt before dereferencing anything
Alan T. DeKok [Sun, 16 Aug 2020 22:25:54 +0000 (18:25 -0400)]
move to p/end instead of "remaining"
Alan T. DeKok [Sun, 16 Aug 2020 22:16:21 +0000 (18:16 -0400)]
use similar macros for decoder
Alan T. DeKok [Sun, 16 Aug 2020 01:15:08 +0000 (21:15 -0400)]
set 'p' before using it
Alan T. DeKok [Sat, 15 Aug 2020 22:15:26 +0000 (18:15 -0400)]
minor cleanups and some notes
Alan T. DeKok [Sat, 15 Aug 2020 22:12:32 +0000 (18:12 -0400)]
move to macros to avoid lots of cut&paste of similar code
and if a VP is missing, just encode it as zero. It's not an
error.
Alan T. DeKok [Sat, 15 Aug 2020 13:06:33 +0000 (09:06 -0400)]
we don't need a shell script wrapper any more
Alan T. DeKok [Sat, 15 Aug 2020 13:04:34 +0000 (09:04 -0400)]
add tacacs to the fuzzer targets
Alan T. DeKok [Sat, 15 Aug 2020 12:57:24 +0000 (08:57 -0400)]
use p/end for encoder
which removes many manual length calculations
Alan T. DeKok [Sat, 15 Aug 2020 12:56:49 +0000 (08:56 -0400)]
use "-" instead of copying long argument lists
which makes it easier to understand what's going on
Alan T. DeKok [Sat, 15 Aug 2020 12:12:38 +0000 (08:12 -0400)]
whitespace
Alan T. DeKok [Sat, 15 Aug 2020 11:11:50 +0000 (07:11 -0400)]
minor cleanups
and check for arg_cnt overflowing the buffer
Alan T. DeKok [Sat, 15 Aug 2020 11:04:47 +0000 (07:04 -0400)]
array[0] a the end of a struct is allowed in C
Jorge Pereira [Thu, 6 Aug 2020 01:45:44 +0000 (22:45 -0300)]
tacacs: Fix payload tests using real data
* Add encrypted payload validating the secret.
* Add flows as Request/Reply for auth/authentication/accouting
* Validating ARG_N parameters
Jorge Pereira [Fri, 24 Jul 2020 18:10:44 +0000 (15:10 -0300)]
tacacs: Enable tacacs tests
Jorge Pereira [Thu, 13 Aug 2020 20:09:50 +0000 (17:09 -0300)]
tacacs: Rename 's/TACACS_/FR_TACACS_/g'
Jorge Pereira [Fri, 14 Aug 2020 15:35:27 +0000 (12:35 -0300)]
tacacs: Add fr_tacacs_decode() function
It replaces the previsous implementation fixing several issues against
the https://tools.ietf.org/id/draft-ietf-opsawg-tacacs-07.html
Jorge Pereira [Fri, 14 Aug 2020 15:34:57 +0000 (12:34 -0300)]
tacacs: Add fr_tacacs_encode() function
It replaces the previsous implementation fixing several issues against
the https://tools.ietf.org/id/draft-ietf-opsawg-tacacs-07.html
Jorge Pereira [Fri, 14 Aug 2020 15:33:25 +0000 (12:33 -0300)]
tacacs: Fix accounting reply name
Let's use the same described in the RFC
https://tools.ietf.org/id/draft-ietf-opsawg-tacacs-07.html#rfc.section.6.2
Jorge Pereira [Fri, 14 Aug 2020 15:31:57 +0000 (12:31 -0300)]
tacacs: Add macros for start_request/request/reply packets
Jorge Pereira [Fri, 14 Aug 2020 15:28:39 +0000 (12:28 -0300)]
tacacs: Add 'TACACS-Version-Major' field
Jorge Pereira [Fri, 14 Aug 2020 15:28:14 +0000 (12:28 -0300)]
tacacs: Add 'TACACS-ArgumentList' field
Jorge Pereira [Fri, 14 Aug 2020 13:51:32 +0000 (10:51 -0300)]
tacacs: Delete fr_tacacs_packet*() old API
All the fr_whatever_packet_*() API are no longer used.
The proto_tacacs build is disabled as it uses the old listeners,
and we are replacing it with new APIs
Jorge Pereira [Fri, 14 Aug 2020 15:26:24 +0000 (12:26 -0300)]
tacacs: Typo
Nick Porter [Sat, 15 Aug 2020 10:45:38 +0000 (11:45 +0100)]
Update ippools queries to take advantage of allocate_existing (#3568)
Splitting the queries allows for significant perfomance boost.
Also tidied up the schemas to be consistent on providing a default value
for NOT NULL columns and not allow expiry_time to be NULL, simplifying
the queries chosing expired addresses.
Jorge Pereira [Thu, 30 Jul 2020 21:36:34 +0000 (18:36 -0300)]
tacacs: Add 'TACACS-Authentication-Continue-Flags' field
Jorge Pereira [Thu, 30 Jul 2020 21:33:30 +0000 (18:33 -0300)]
tacacs: Add 'TACACS-Length' field
Jorge Pereira [Thu, 6 Aug 2020 01:42:52 +0000 (22:42 -0300)]
tacacs: Add 'TACACS-Packet-Body-Type' field
Jorge Pereira [Tue, 28 Jul 2020 19:20:25 +0000 (16:20 -0300)]
tacacs: Add missing 'TACACS-Flags'
Jorge Pereira [Tue, 28 Jul 2020 17:58:38 +0000 (14:58 -0300)]
tacacs: Add missing 'TACACS-Packet'
Jorge Pereira [Fri, 24 Jul 2020 21:58:14 +0000 (18:58 -0300)]
tacacs: unit_test_attribute doesn't need libfreeradius-tacacs
the unit tests for tacacs are currently disabled. Once the new
test framework is in place, unit_test_attribute will pick up
the tacacs library due to directives given in the tests
Jorge Pereira [Fri, 24 Jul 2020 21:58:39 +0000 (18:58 -0300)]
tacacs: Adjusting library build to match all.mk from other protocols
Jorge Pereira [Fri, 24 Jul 2020 22:42:42 +0000 (19:42 -0300)]
tacacs: Add references for fr_tacacs_ctx_t
Jorge Pereira [Sun, 26 Jul 2020 23:19:25 +0000 (20:19 -0300)]
tacacs: Update dictionary to be STRUCT
field structures should be fixed-width integers
"uint32" means exactly what it says.
"integer" could be just acout anything
Nick Porter [Thu, 13 Aug 2020 20:53:22 +0000 (21:53 +0100)]
Add allocate_existing query to v4 (#3565)
Allow for a separate query (allocate_existing) to find existing IP
addresses, split from allocate_find, which can then be used for finding
an un-allocated address.
Allows for much more efficient queries for most databases.
Nick Porter [Wed, 12 Aug 2020 20:15:48 +0000 (21:15 +0100)]
V4 new dhcp schema (#3563)
* Add a status to IP pool table
The status field enables IPs in the pool to be marked as dynamic,
static, declined or disabled to allow for managing static IPs within the
pool and handling DHCP-Decline packets
* Complete query changes from nas to gateway
* Replace GatewayIPAddress with the more generic Gateway
Alan T. DeKok [Wed, 12 Aug 2020 20:09:29 +0000 (16:09 -0400)]
minor cleanup
Alan T. DeKok [Wed, 12 Aug 2020 01:30:30 +0000 (21:30 -0400)]
map sections cannot be empty
Alan T. DeKok [Wed, 12 Aug 2020 01:13:25 +0000 (21:13 -0400)]
remove duplicae shift
Alan T. DeKok [Tue, 11 Aug 2020 18:16:48 +0000 (14:16 -0400)]
clean up unlang_dump()
and remove old dump_tree() which is a holdover from v0.x, and
hasn't been used (or compilable) in many years.
Alan T. DeKok [Tue, 11 Aug 2020 14:47:56 +0000 (10:47 -0400)]
use table lookups for keyword selection
instead of linear search through the op list
Alan T. DeKok [Tue, 11 Aug 2020 14:12:51 +0000 (10:12 -0400)]
update comments and messages
Alan T. DeKok [Tue, 11 Aug 2020 13:50:42 +0000 (09:50 -0400)]
clean up "-module" handling now that we have UNLANG_IGNORE
Alan T. DeKok [Tue, 11 Aug 2020 13:30:19 +0000 (09:30 -0400)]
simplify if / elsif / else handling
Jorge Pereira [Tue, 11 Aug 2020 13:19:28 +0000 (10:19 -0300)]
Typo (#3566)
Alan T. DeKok [Mon, 10 Aug 2020 14:48:19 +0000 (10:48 -0400)]
clean up and clarify
update / filter can't be empty.
allow almost anything other than "else" in redundant / load-balance
sections
Alan T. DeKok [Mon, 10 Aug 2020 14:35:29 +0000 (10:35 -0400)]
document new "default" for switch statements
Alan T. DeKok [Mon, 10 Aug 2020 14:35:16 +0000 (10:35 -0400)]
convert assertion to run-time check
Alan T. DeKok [Mon, 10 Aug 2020 13:14:19 +0000 (09:14 -0400)]
finally support "default"
Alan T. DeKok [Mon, 10 Aug 2020 12:48:05 +0000 (08:48 -0400)]
add UNLANG_IGNORE return code
which tells the caller to omit the subsection entirely from
the compiled unlang tree.
This is a relatively minor optimization, but it can be useful.
Alan T. DeKok [Mon, 10 Aug 2020 12:35:15 +0000 (08:35 -0400)]
have "switch" call compile_case() directly.
As it's already iterating over the child list, it might as well
do that.
This change also avoids all of the extra logic in compile_children()
Alan T. DeKok [Mon, 10 Aug 2020 12:28:38 +0000 (08:28 -0400)]
make "tail" a pointer to "children"
which simplifies the update logic.
This change can finally be done after all of the previous (ab)uses
of "tail" have been removed.
Alan T. DeKok [Mon, 10 Aug 2020 12:26:06 +0000 (08:26 -0400)]
hoist if / elsif / else checks into compile_children()
which removes the need for a hacky previous_if() function which
looks at g->tail. Instead, the flags are on the local stack in
the compile_children() function
Alan T. DeKok [Sun, 9 Aug 2020 22:25:37 +0000 (18:25 -0400)]
free the compiled unlang_t when the section is freed
it's not clear how the unlang_t was freed earlier, other than
when the NULL context was freed.
Alan T. DeKok [Sun, 9 Aug 2020 21:45:52 +0000 (17:45 -0400)]
check for closed in the current item, not on the next one
which then lets us hoist add_child() into compile_children()
Alan T. DeKok [Sun, 9 Aug 2020 19:15:36 +0000 (15:15 -0400)]
hoist "check for loop in policies"
to the place where it's needed.
Alan T. DeKok [Sun, 9 Aug 2020 19:08:23 +0000 (15:08 -0400)]
hoist "function" compilation into it's own function
Alan T. DeKok [Sun, 9 Aug 2020 18:34:43 +0000 (14:34 -0400)]
use sorted tables for looking up keywords
for both CONF_SECTION and CONF_PAIR
which simplifies the code a fair bit
Alan T. DeKok [Sun, 9 Aug 2020 15:58:24 +0000 (11:58 -0400)]
forbid using keywords as module names
Alan T. DeKok [Sun, 9 Aug 2020 15:50:02 +0000 (11:50 -0400)]
remove provisions for "group authorize { ...}"
which didn't work because it didn't change the default return
codes or initialize unlang_ctx2
Alan T. DeKok [Sun, 9 Aug 2020 13:44:43 +0000 (09:44 -0400)]
minor cleanps and rearrangements
Alan T. DeKok [Sun, 9 Aug 2020 13:28:38 +0000 (09:28 -0400)]
clean up compile_children()
remove unnecessary reference to "parent", as compile_module()
already does those checks.
remove redundant check for "next" when compiling "actions"
subsection. The check is already done in compile_action_subsection()
set the action defaults BEFORE parsing "actions" subsection
Hoist "disallow foo = bar" into earlier in the CONF_PAIR processing
Alan T. DeKok [Sun, 9 Aug 2020 12:43:22 +0000 (08:43 -0400)]
disable reference to dhcp_sqlippool by default
but leave it there, commented out.
The default configuration may not use dhcp_sqlippool
Alan T. DeKok [Sun, 9 Aug 2020 12:35:44 +0000 (08:35 -0400)]
don't compile module actions in compile_children()
because it's already done in compile_module(), and that function
doesn't recurse into compile_children() for compiling the actions.
Alan T. DeKok [Sat, 8 Aug 2020 18:01:36 +0000 (14:01 -0400)]
move assignments to assertions
things should already have been set up properly when we call
add_child()
Alan T. DeKok [Fri, 7 Aug 2020 21:23:38 +0000 (17:23 -0400)]
clean up add_child()
it errored out on an attempt to add a child to a closed section.
However, compile_item() already checked for that, and skipped
subsequent statments with a warning message.
This change lets add_child() take fewer arguments, and always
succeed.
Alan T. DeKok [Fri, 7 Aug 2020 21:02:11 +0000 (17:02 -0400)]
hoist compiling break / return higher
into section which handles a CONF_PAIR
Alan T. DeKok [Fri, 7 Aug 2020 20:51:19 +0000 (16:51 -0400)]
compile_action_defaults() doesn't need to return anything
Arran Cudbard-Bell [Sat, 8 Aug 2020 01:03:17 +0000 (21:03 -0400)]
token: Add token for regexes
Arran Cudbard-Bell [Sat, 8 Aug 2020 00:20:43 +0000 (20:20 -0400)]
value: Expose and update escaping fules, and fix issue with fr_value_box_strdup_buffer
Arran Cudbard-Bell [Sat, 8 Aug 2020 00:09:26 +0000 (20:09 -0400)]
tmpl: strip the vp_ prefix from the vp_tmpl types
It's annoying and inconsistent
Arran Cudbard-Bell [Sat, 8 Aug 2020 00:04:52 +0000 (20:04 -0400)]
sbuff: Various fixes
Arran Cudbard-Bell [Fri, 7 Aug 2020 23:31:45 +0000 (19:31 -0400)]
sbuff: Implementation for doing streaming reads on `FILE *`
No idea if it works
Arran Cudbard-Bell [Thu, 6 Aug 2020 03:45:47 +0000 (23:45 -0400)]
talloc: Fix talloc_bstrdup
Alan T. DeKok [Fri, 7 Aug 2020 16:15:34 +0000 (12:15 -0400)]
we receive a decline, we don't send one
Alexander Scheel [Thu, 6 Aug 2020 12:07:54 +0000 (08:07 -0400)]
Ignore user-provided dhparams in FIPS mode (#3557)
OpenSSL in RHEL 8.3 introduces a breaking change in FIPS mode:
user-provided dhparams will be ignored (and dhparam generation
may fail as well), unless they are on the FIPS approved list of
parameters. However, OpenSSL since v1.1.1 will automatically select
an appropriate DH parameter set anyways, if the user did not provide
any. These will be FIPS approved.
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
Terry Burton [Thu, 6 Aug 2020 00:46:07 +0000 (01:46 +0100)]
redis_ippool: Provide examples for the device key (#3558)
Alan T. DeKok [Wed, 5 Aug 2020 21:03:37 +0000 (17:03 -0400)]
use braces
Alan T. DeKok [Wed, 5 Aug 2020 18:11:04 +0000 (14:11 -0400)]
print policies as "policy foo" instead of just "foo"
Alan T. DeKok [Tue, 4 Aug 2020 21:07:38 +0000 (17:07 -0400)]
don't call the "recv.Access-Request" method
and disable it in the source
Alan T. DeKok [Tue, 4 Aug 2020 21:07:21 +0000 (17:07 -0400)]
print out better names
Alan T. DeKok [Tue, 4 Aug 2020 20:57:07 +0000 (16:57 -0400)]
just reference the attribute directly
Alan T. DeKok [Tue, 4 Aug 2020 20:56:36 +0000 (16:56 -0400)]
no need to call asprintf to duplicate a string
Jorge Pereira [Wed, 5 Aug 2020 17:19:59 +0000 (14:19 -0300)]
Improve verbosity with right-hand side errors (#3556)
James Jones [Wed, 5 Aug 2020 15:32:55 +0000 (10:32 -0500)]
Add comparisons with NULL in TEST_CHECK_STRCMP() to silence -Werror=address (#3555)
Arran Cudbard-Bell [Tue, 4 Aug 2020 20:53:47 +0000 (16:53 -0400)]
unit_test_attribute: Allow lines ranges to be specified so that specific tests in command files can be executed
Arran Cudbard-Bell [Tue, 4 Aug 2020 18:18:01 +0000 (14:18 -0400)]
Fix function name
Library functions should be prefixed with the name of the source file they're in.
James Jones [Tue, 4 Aug 2020 18:14:09 +0000 (13:14 -0500)]
Make _fr_dbuff_set() return bytes required to complete failing advancement; add FR_DBUFF_SET_RETURN() (#3550)
Alan T. DeKok [Tue, 4 Aug 2020 16:16:06 +0000 (12:16 -0400)]
add utc to time_t
which is significantly faster than timegm() in OSX. That function
takes a lock to get time zone information, which we don't need.
Nick Porter [Tue, 4 Aug 2020 16:18:20 +0000 (17:18 +0100)]
Remove DHCP policy and update queries (#3551)
Move the definition of the pool_key into the module config rather than
policy.
Bring queries into line with V3 queries and then simplify further,
removing references to fields not needed for DHCP. Adding queries for
PostgreSQL
Arran Cudbard-Bell [Tue, 4 Aug 2020 14:20:30 +0000 (10:20 -0400)]
sbuff: Fix stupid, pedantic clang scan issues in the sbuff tests
Alan T. DeKok [Tue, 4 Aug 2020 13:40:44 +0000 (09:40 -0400)]
remove rlm_example here, too
Alan T. DeKok [Tue, 4 Aug 2020 13:24:28 +0000 (09:24 -0400)]
remove rlm_example
we now have sufficient modules which serve as examples.
Alan T. DeKok [Tue, 4 Aug 2020 12:50:54 +0000 (08:50 -0400)]
one more fix