]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agotypo
Alan T. DeKok [Thu, 30 Apr 2020 01:21:42 +0000 (21:21 -0400)] 
typo

6 years agounescape quoted strings which will be passed to exec()
Alan T. DeKok [Thu, 30 Apr 2020 01:21:14 +0000 (21:21 -0400)] 
unescape quoted strings which will be passed to exec()

6 years agoAdd destructor so we can set a breakpoint for state ctx freeing
Arran Cudbard-Bell [Thu, 30 Apr 2020 01:18:22 +0000 (20:18 -0500)] 
Add destructor so we can set a breakpoint for state ctx freeing

6 years agoconstify session-state name and add comments
Arran Cudbard-Bell [Thu, 30 Apr 2020 01:06:12 +0000 (20:06 -0500)] 
constify session-state name and add comments

6 years agoinstruments
Arran Cudbard-Bell [Thu, 30 Apr 2020 00:37:22 +0000 (19:37 -0500)] 
instruments

6 years agoAssert we've not previously allocated status resources
Arran Cudbard-Bell [Wed, 29 Apr 2020 23:35:38 +0000 (18:35 -0500)] 
Assert we've not previously allocated status resources

6 years agoBe more verbose about why we couldn't send packets to workers
Arran Cudbard-Bell [Wed, 29 Apr 2020 23:35:24 +0000 (18:35 -0500)] 
Be more verbose about why we couldn't send packets to workers

6 years agoPrint the onload return code in debug builds
Arran Cudbard-Bell [Wed, 29 Apr 2020 22:49:52 +0000 (17:49 -0500)] 
Print the onload return code in debug builds

6 years agoPrint any errors on the error stack if onload fails
Arran Cudbard-Bell [Wed, 29 Apr 2020 20:16:36 +0000 (15:16 -0500)] 
Print any errors on the error stack if onload fails

6 years agoRaise debug level for "optimizing" debug statements
Arran Cudbard-Bell [Wed, 29 Apr 2020 20:16:23 +0000 (15:16 -0500)] 
Raise debug level for "optimizing" debug statements

6 years agoadd and document "repeat" functionality
Alan T. DeKok [Wed, 29 Apr 2020 19:58:32 +0000 (15:58 -0400)] 
add and document "repeat" functionality

6 years agomake LHS exec async
Alan T. DeKok [Wed, 29 Apr 2020 18:47:02 +0000 (14:47 -0400)] 
make LHS exec async

6 years agoTypo
Arran Cudbard-Bell [Wed, 29 Apr 2020 15:30:10 +0000 (10:30 -0500)] 
Typo

6 years agoUse the immutable pointers
Arran Cudbard-Bell [Wed, 29 Apr 2020 15:14:16 +0000 (10:14 -0500)] 
Use the immutable pointers

6 years agocheck for enumv->name here, too
Alan T. DeKok [Wed, 29 Apr 2020 13:39:44 +0000 (09:39 -0400)] 
check for enumv->name here, too

6 years agoinitialize more fields, and check for in-line enumvs
Alan T. DeKok [Wed, 29 Apr 2020 13:26:52 +0000 (09:26 -0400)] 
initialize more fields, and check for in-line enumvs

6 years agointernal-encode: Stop compiler complaints for debug builds
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:26:04 +0000 (17:26 -0500)] 
internal-encode: Stop compiler complaints for debug builds

6 years agotrunk: Fix enqueue_on_connection to re-calculate the connection/request ratio
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:20:04 +0000 (17:20 -0500)] 
trunk: Fix enqueue_on_connection to re-calculate the connection/request ratio

6 years agoReally can't happen
Arran Cudbard-Bell [Tue, 28 Apr 2020 22:04:15 +0000 (17:04 -0500)] 
Really can't happen

6 years agodecode the amount of data we have, not the maximum size of the buffer
Arran Cudbard-Bell [Tue, 28 Apr 2020 21:53:18 +0000 (16:53 -0500)] 
decode the amount of data we have, not the maximum size of the buffer

6 years agoDon't need to pass el
Arran Cudbard-Bell [Tue, 28 Apr 2020 19:54:32 +0000 (14:54 -0500)] 
Don't need to pass el

6 years agoAdjust value_field in internal_encode() if flen > 1 (#3409)
James Jones [Tue, 28 Apr 2020 16:29:25 +0000 (11:29 -0500)] 
Adjust value_field in internal_encode() if flen > 1 (#3409)

When internal_encode() loses its bet that there will be less than
256 bytes of encoded data, the header must grow to hold the length
and the data moved to make room. When that happens, value_field
has to be adjusted to match--otherwise, the FR_PROTO_HEX_DUMP() of
the header won't show the entire header.

6 years agotrunk: Change some trunk debug messages from DEBUG4 to DEBUG3
Arran Cudbard-Bell [Tue, 28 Apr 2020 16:18:35 +0000 (11:18 -0500)] 
trunk: Change some trunk debug messages from DEBUG4 to DEBUG3

6 years agoAlways need to re-calculate
Arran Cudbard-Bell [Tue, 28 Apr 2020 15:58:15 +0000 (10:58 -0500)] 
Always need to re-calculate

6 years agorlm_radius_udp: Use standard time printing functions
Arran Cudbard-Bell [Tue, 28 Apr 2020 15:44:17 +0000 (10:44 -0500)] 
rlm_radius_udp: Use standard time printing functions

Add macros to specify different precisions when boxing time deltas

6 years agoglue depends.mk into the boilermake framework
Alan T. DeKok [Tue, 28 Apr 2020 16:03:09 +0000 (12:03 -0400)] 
glue depends.mk into the boilermake framework

we can't just `-include foo.la` from the source make files, as
they are evaluated by the boilermake framework.  Instead, we have
to jump through some additional hoops

6 years agonot always hot I guess...
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:29:47 +0000 (09:29 -0500)] 
not always hot I guess...

6 years agoautomate dependency checks on protocol libraries
Alan T. DeKok [Tue, 28 Apr 2020 14:28:38 +0000 (10:28 -0400)] 
automate dependency checks on protocol libraries

6 years agoInline calls in fr_event_loop
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:22:04 +0000 (09:22 -0500)] 
Inline calls in fr_event_loop

6 years agotrunk: Signal a connection to halt if it has no requests and we're culling it
Arran Cudbard-Bell [Tue, 28 Apr 2020 14:10:37 +0000 (09:10 -0500)] 
trunk: Signal a connection to halt if it has no requests and we're culling it

6 years agoUpdate request/conn ratio after requeue
Arran Cudbard-Bell [Tue, 28 Apr 2020 13:42:21 +0000 (08:42 -0500)] 
Update request/conn ratio after requeue

6 years agoBetter error messages
Arran Cudbard-Bell [Tue, 28 Apr 2020 00:53:08 +0000 (19:53 -0500)] 
Better error messages

6 years agomain_loop: More thorough cleanups on main_loop exit
Arran Cudbard-Bell [Tue, 28 Apr 2020 00:38:19 +0000 (19:38 -0500)] 
main_loop: More thorough cleanups on main_loop exit

6 years agoevent: Unused code
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:51:58 +0000 (18:51 -0500)] 
event: Unused code

6 years ago"now" not available in non-debug builds
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:23:43 +0000 (18:23 -0500)] 
"now" not available in non-debug builds

6 years agoMake sure the ring buffer allocation functions aren't corrupting the message data...
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:04:36 +0000 (18:04 -0500)] 
Make sure the ring buffer allocation functions aren't corrupting the message data somewhow

6 years agochannel: Add more detail to asserts
Arran Cudbard-Bell [Mon, 27 Apr 2020 23:03:54 +0000 (18:03 -0500)] 
channel: Add more detail to asserts

Assert if we try and send messages on a closed channel

6 years agoscheduler: Return an error in non-debug builds
Arran Cudbard-Bell [Mon, 27 Apr 2020 22:27:34 +0000 (17:27 -0500)] 
scheduler: Return an error in non-debug builds

6 years agoQuiet compiler
Arran Cudbard-Bell [Mon, 27 Apr 2020 22:02:31 +0000 (17:02 -0500)] 
Quiet compiler

6 years agoscheduler: Fix doxygen
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:45:16 +0000 (16:45 -0500)] 
scheduler: Fix doxygen

6 years agorlm_radius: Mark status_check_alloc as nonnull
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:45:06 +0000 (16:45 -0500)] 
rlm_radius: Mark status_check_alloc as nonnull

6 years agodbuff: Add test file
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:42:22 +0000 (16:42 -0500)] 
dbuff: Add test file

Remove some duplicate code

Don't bother repeating operations all the way up the stack, just advance the pointer.

6 years agoMinor grammar issues
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:30:38 +0000 (16:30 -0500)] 
Minor grammar issues

6 years agoradius: Destroy the scheduler before exiting when failing because of a listener intii...
Arran Cudbard-Bell [Mon, 27 Apr 2020 21:21:45 +0000 (16:21 -0500)] 
radius: Destroy the scheduler before exiting when failing because of a listener intiialisation error

6 years agoRevert "we only delete these when the event loop is exiting"
Arran Cudbard-Bell [Mon, 27 Apr 2020 20:48:52 +0000 (15:48 -0500)] 
Revert "we only delete these when the event loop is exiting"

This reverts commit 2700420d0d1f2f37a74b44f2e6817cb5aaf58c28.

6 years agotalloc: Fix useless strdup when initialising memory chunks
Arran Cudbard-Bell [Mon, 27 Apr 2020 20:36:24 +0000 (15:36 -0500)] 
talloc: Fix useless strdup when initialising memory chunks

6 years agowe only delete these when the event loop is exiting
Alan T. DeKok [Mon, 27 Apr 2020 20:03:12 +0000 (16:03 -0400)] 
we only delete these when the event loop is exiting

6 years agodbuff: Change macro names to make it clearer what they do
Arran Cudbard-Bell [Fri, 24 Apr 2020 23:27:32 +0000 (18:27 -0500)] 
dbuff: Change macro names to make it clearer what they do

Add compound literal macro to make it easier to do dbuff migrations

6 years agodbuff: Add memset function
Arran Cudbard-Bell [Fri, 24 Apr 2020 22:45:28 +0000 (17:45 -0500)] 
dbuff: Add memset function

6 years agodbuff: Add macros for "reserving" space in a dbuff when passing to a caller.
Arran Cudbard-Bell [Fri, 24 Apr 2020 21:48:29 +0000 (16:48 -0500)] 
dbuff: Add macros for "reserving" space in a dbuff when passing to a caller.

Add variadic macro for copying a byte sequence

6 years agomore tests for tags.
Alan T. DeKok [Fri, 24 Apr 2020 19:51:23 +0000 (15:51 -0400)] 
more tests for tags.

If we're asked to decode a 32-bit integer with an invalid tag,
then it's an invalid attribute.

If we're asked to encode a string where the first byte looks like
a valid tag, then we always encode the tag (even 0) to avoid
confusion.

6 years agoarmour the control FDs.
Alan T. DeKok [Fri, 24 Apr 2020 15:43:38 +0000 (11:43 -0400)] 
armour the control FDs.

They are needed while the server is running.

6 years agoadd debug API for armouring FDs
Alan T. DeKok [Fri, 24 Apr 2020 15:43:08 +0000 (11:43 -0400)] 
add debug API for armouring FDs

this API is likely short-lived until we discover what is
accidentally deleting the FDs

6 years agostop the event loop before we exit
Alan T. DeKok [Fri, 24 Apr 2020 15:22:42 +0000 (11:22 -0400)] 
stop the event loop before we exit

6 years agothe first entry of the heap can't be NULL
Alan T. DeKok [Fri, 24 Apr 2020 14:15:04 +0000 (10:15 -0400)] 
the first entry of the heap can't be NULL

6 years agoadd test for multiple attributes
Alan T. DeKok [Thu, 23 Apr 2020 19:00:48 +0000 (15:00 -0400)] 
add test for multiple attributes

6 years agoit helps to sign the packets.
Alan T. DeKok [Thu, 23 Apr 2020 18:59:33 +0000 (14:59 -0400)] 
it helps to sign the packets.

Note the the salted fields still don't have deterministic
randomness.  That will need to be fixed by passing packet_ctx
to fr_radius_encode()

6 years agorlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type' (#3403)
Jorge Pereira [Fri, 24 Apr 2020 00:29:26 +0000 (21:29 -0300)] 
rlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type' (#3403)

* rlm_radius/test_plan: Disconnect-Message must not contain 'Service-Type'

* Change Service-Type for CoA-Request to Authorize-Only

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
6 years agoeap/sim: Fix minor leak (#3402)
Jorge Pereira [Thu, 23 Apr 2020 19:44:50 +0000 (16:44 -0300)] 
eap/sim: Fix minor leak (#3402)

Let's release all allocated memory when something goes wrong.

6 years agoMove EAP-AKA to fr_cursor_filter*() and away from {is, first, next}_encodable()....
James Jones [Thu, 23 Apr 2020 18:11:24 +0000 (13:11 -0500)] 
Move EAP-AKA to fr_cursor_filter*() and away from {is, first, next}_encodable(). (#3365)

6 years agoeap/chbind: Fix minor leak (#3401)
Jorge Pereira [Thu, 23 Apr 2020 18:10:13 +0000 (15:10 -0300)] 
eap/chbind: Fix minor leak (#3401)

It's always good to release all allocated memory when something goes wrong.

6 years agodbuff: macrolike length calculation functions
Arran Cudbard-Bell [Thu, 23 Apr 2020 18:07:25 +0000 (13:07 -0500)] 
dbuff: macrolike length calculation functions

6 years agodbuff: Extremely basic initial implementation
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:54:08 +0000 (12:54 -0500)] 
dbuff: Extremely basic initial implementation

6 years agoneed pair.h here
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:46:03 +0000 (12:46 -0500)] 
need pair.h here

6 years agoradius-encoder: Fix return codes and length checks
Arran Cudbard-Bell [Thu, 23 Apr 2020 17:13:23 +0000 (12:13 -0500)] 
radius-encoder: Fix return codes and length checks

6 years agoradius-encode: Use the common functions
Arran Cudbard-Bell [Thu, 23 Apr 2020 03:22:11 +0000 (22:22 -0500)] 
radius-encode: Use the common functions

6 years agoadded test point for protocol encoder
Alan T. DeKok [Thu, 23 Apr 2020 13:22:45 +0000 (09:22 -0400)] 
added test point for protocol encoder

6 years agorlm_radius: Apply same fix to replicate muxer as non-replicating muxer
Arran Cudbard-Bell [Thu, 23 Apr 2020 02:41:51 +0000 (21:41 -0500)] 
rlm_radius: Apply same fix to replicate muxer as non-replicating muxer

6 years agorlm_radius: Clear output buffer if there's an error, closes #3400
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:20:22 +0000 (18:20 -0500)] 
rlm_radius: Clear output buffer if there's an error, closes #3400

6 years agotrunk: continue after packet encoding failures, don't return.
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:18:11 +0000 (18:18 -0500)] 
trunk: continue after packet encoding failures, don't return.

6 years agoradius-encode: Change some contentious behaviour
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:17:48 +0000 (18:17 -0500)] 
radius-encode: Change some contentious behaviour

- Rework encrypted password functions to use a more common signature
- Skip encoding values greater than 253 bytes
- Don't use intermediary buffer when encoding fixed length values, write them directly to the output buffer
- Return the number of bytes we would have needed when encoding attribute values.
- Fix struct TLV encoding as it didn't advance the output buffer pointer.
- Write the tag byte for all types if the VP says we should.
- Allow encoding of floats

6 years agounit_test_attribute: Add support for encode-pair "torture" tests
Arran Cudbard-Bell [Wed, 22 Apr 2020 23:09:17 +0000 (18:09 -0500)] 
unit_test_attribute: Add support for encode-pair "torture" tests

If running under ASAN allocate a special buffer with a 1K poisoned region before and after to detect buffer overflows/underflows.

6 years agorlm_radius: Emit error if we failed encoding a packet, and free the buffer
Arran Cudbard-Bell [Wed, 22 Apr 2020 20:04:18 +0000 (15:04 -0500)] 
rlm_radius: Emit error if we failed encoding a packet, and free the buffer

6 years agomove assert and simplify code
Alan T. DeKok [Wed, 22 Apr 2020 19:47:14 +0000 (15:47 -0400)] 
move assert and simplify code

6 years agotrunk: Fix bad assert
Arran Cudbard-Bell [Wed, 22 Apr 2020 19:26:17 +0000 (14:26 -0500)] 
trunk: Fix bad assert

6 years agoexec: Fix minor leaks (#3399)
Jorge Pereira [Wed, 22 Apr 2020 18:51:16 +0000 (15:51 -0300)] 
exec: Fix minor leaks (#3399)

It's always good to release all allocated memory when something goes wrong.

6 years agotruncate after encoding, not before
Alan T. DeKok [Wed, 22 Apr 2020 18:38:47 +0000 (14:38 -0400)] 
truncate after encoding, not before

6 years agoallow for truncation of output buffers
Alan T. DeKok [Wed, 22 Apr 2020 15:54:48 +0000 (11:54 -0400)] 
allow for truncation of output buffers

and test for it

6 years agotruncate password as necessary
Alan T. DeKok [Wed, 22 Apr 2020 15:54:25 +0000 (11:54 -0400)] 
truncate password as necessary

6 years agocleanups and fixes
Alan T. DeKok [Wed, 22 Apr 2020 15:02:12 +0000 (11:02 -0400)] 
cleanups and fixes

make scan happy.

6 years agoadd input_fd functionality to async exec-wait
Alan T. DeKok [Wed, 22 Apr 2020 13:34:24 +0000 (09:34 -0400)] 
add input_fd functionality to async exec-wait

6 years agoQuiet travis
Arran Cudbard-Bell [Wed, 22 Apr 2020 03:15:29 +0000 (22:15 -0500)] 
Quiet travis

6 years agotrunk: More asserts
Arran Cudbard-Bell [Wed, 22 Apr 2020 02:44:03 +0000 (21:44 -0500)] 
trunk: More asserts

Insulate requeue function from connection state changes

6 years agoPrint out why the heap extract failed
Arran Cudbard-Bell [Wed, 22 Apr 2020 01:47:31 +0000 (20:47 -0500)] 
Print out why the heap extract failed

6 years agoRequire a recent version of gnu make
Arran Cudbard-Bell [Wed, 22 Apr 2020 00:44:42 +0000 (19:44 -0500)] 
Require a recent version of gnu make

6 years agoAlways set pointers to NULL when we're freeing
Arran Cudbard-Bell [Wed, 22 Apr 2020 00:44:17 +0000 (19:44 -0500)] 
Always set pointers to NULL when we're freeing

6 years agorlm_radius: Limit the maximum number of packets we try and send out at once
Arran Cudbard-Bell [Tue, 21 Apr 2020 23:43:59 +0000 (18:43 -0500)] 
rlm_radius: Limit the maximum number of packets we try and send out at once

6 years agochannel: Print the queue size when we fail to push items onto it
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:18:12 +0000 (16:18 -0500)] 
channel: Print the queue size when we fail to push items onto it

6 years agoatomic_queue: Should use size_t for queue size
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:17:48 +0000 (16:17 -0500)] 
atomic_queue: Should use size_t for queue size

6 years agoatomic_queue: Fix useless strcpy every time we allocate a queue
Arran Cudbard-Bell [Tue, 21 Apr 2020 21:17:21 +0000 (16:17 -0500)] 
atomic_queue: Fix useless strcpy every time we allocate a queue

6 years agodlopen: Quiet compiler (#3397)
Jorge Pereira [Tue, 21 Apr 2020 19:11:09 +0000 (16:11 -0300)] 
dlopen: Quiet compiler (#3397)

6 years agopreliminary work to make various fields configurable
Alan T. DeKok [Tue, 21 Apr 2020 19:08:10 +0000 (15:08 -0400)] 
preliminary work to make various fields configurable

6 years agoBetter debugging
Arran Cudbard-Bell [Tue, 21 Apr 2020 18:55:18 +0000 (13:55 -0500)] 
Better debugging

6 years agoinclude src/build earlier in the process
Alan T. DeKok [Tue, 21 Apr 2020 12:53:39 +0000 (08:53 -0400)] 
include src/build earlier in the process

6 years agoonly build if we have gnumake.h
Alan T. DeKok [Tue, 21 Apr 2020 12:51:50 +0000 (08:51 -0400)] 
only build if we have gnumake.h

6 years agohoist autoconf.mk rules higher
Alan T. DeKok [Tue, 21 Apr 2020 12:48:16 +0000 (08:48 -0400)] 
hoist autoconf.mk rules higher

so that they are accessible to the entire build system

6 years agoadd tests for <gnumake.h>, and regenerate
Alan T. DeKok [Tue, 21 Apr 2020 12:47:01 +0000 (08:47 -0400)] 
add tests for <gnumake.h>, and regenerate

6 years agoremove old mingw / windows stuff.
Alan T. DeKok [Tue, 21 Apr 2020 12:40:51 +0000 (08:40 -0400)] 
remove old mingw / windows stuff.

we don't need it

6 years agorlm_radius: Unused
Arran Cudbard-Bell [Tue, 21 Apr 2020 02:32:37 +0000 (21:32 -0500)] 
rlm_radius: Unused

6 years agoFix call to rad_assert
Arran Cudbard-Bell [Tue, 21 Apr 2020 01:31:23 +0000 (20:31 -0500)] 
Fix call to rad_assert