]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
8 years agostart of dynamic_client_alloc()
Alan T. DeKok [Tue, 21 Nov 2017 16:45:09 +0000 (11:45 -0500)] 
start of dynamic_client_alloc()

8 years agostart of dynamic client code
Alan T. DeKok [Tue, 21 Nov 2017 16:27:43 +0000 (11:27 -0500)] 
start of dynamic client code

8 years ago...because you know static analysis is going to flag that at some point *sigh*
Arran Cudbard-Bell [Tue, 21 Nov 2017 16:29:17 +0000 (16:29 +0000)] 
...because you know static analysis is going to flag that at some point *sigh*

8 years agoUse current result not frame->result when yielding
Arran Cudbard-Bell [Tue, 21 Nov 2017 16:26:18 +0000 (16:26 +0000)] 
Use current result not frame->result when yielding

and don't mess with frame->result

8 years agoRevert "Set frame->result when yielding"
Arran Cudbard-Bell [Tue, 21 Nov 2017 16:22:00 +0000 (16:22 +0000)] 
Revert "Set frame->result when yielding"

This reverts commit 1f7ceeb44c90809c668d68f07e749c85c52a9f8b.

8 years agothere is always a module return code.
Alan T. DeKok [Tue, 21 Nov 2017 16:19:19 +0000 (11:19 -0500)] 
there is always a module return code.

This goes along with commit a262092bf41c

8 years agofix for EAP-FAST.
Alan T. DeKok [Tue, 21 Nov 2017 16:12:24 +0000 (11:12 -0500)] 
fix for EAP-FAST.

The parent TLV has been decoded into a "struct".  So we can't
check the sizes.  And the sizes of the various fields are 8-bit,
not 32-bit

8 years agofmt is parented from node, not node->fmt
Alan T. DeKok [Mon, 20 Nov 2017 20:09:08 +0000 (15:09 -0500)] 
fmt is parented from node, not node->fmt

8 years agoallow COMBO_IP_PREFIX too
Alan T. DeKok [Tue, 21 Nov 2017 16:05:40 +0000 (11:05 -0500)] 
allow COMBO_IP_PREFIX too

8 years agorequest->rcode is return code from last module call
Alan T. DeKok [Tue, 21 Nov 2017 15:49:49 +0000 (10:49 -0500)] 
request->rcode is return code from last module call

8 years ago0 is RLM_MODULE_REJECT, which is a valid rcode
Alan T. DeKok [Tue, 21 Nov 2017 15:45:44 +0000 (10:45 -0500)] 
0 is RLM_MODULE_REJECT, which is a valid rcode

8 years agoadd combo IP address / prefix
Alan T. DeKok [Mon, 20 Nov 2017 21:00:03 +0000 (16:00 -0500)] 
add combo IP address / prefix

8 years agoclang scan fix
Arran Cudbard-Bell [Tue, 21 Nov 2017 15:08:20 +0000 (15:08 +0000)] 
clang scan fix

8 years agoAdd a test for yielding within a parallel section
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:50:29 +0000 (14:50 +0000)] 
Add a test for yielding within a parallel section

8 years agoAdd a delay module that we can use to force requests to yield and be immediately...
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:50:05 +0000 (14:50 +0000)] 
Add a delay module that we can use to force requests to yield and be immediately rescheduled

8 years agoCheck the current rcode not the frame rcode for the UNLANG_ACTION_YIELD hack
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:49:36 +0000 (14:49 +0000)] 
Check the current rcode not the frame rcode for the UNLANG_ACTION_YIELD hack

8 years agoCheck for an attempt to pop the top frame and deal with that explicitly by breaking...
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:49:04 +0000 (14:49 +0000)] 
Check for an attempt to pop the top frame and deal with that explicitly by breaking out the interpreter loop

This allows the function to return at the right point without decrementing stack->depth

8 years agoFormatting
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:48:06 +0000 (14:48 +0000)] 
Formatting

8 years agoFlesh out unlang_interpret_synchronous some more so it has a fake backlog to go with...
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:47:07 +0000 (14:47 +0000)] 
Flesh out unlang_interpret_synchronous some more so it has a fake backlog to go with its fake event list

8 years agoBetter name
Arran Cudbard-Bell [Tue, 21 Nov 2017 14:45:19 +0000 (14:45 +0000)] 
Better name

8 years agoSet frame->result when yielding
Arran Cudbard-Bell [Tue, 21 Nov 2017 12:21:13 +0000 (12:21 +0000)] 
Set frame->result when yielding

8 years agoIgnore bad binding attributes
Arran Cudbard-Bell [Tue, 21 Nov 2017 11:50:07 +0000 (11:50 +0000)] 
Ignore bad binding attributes

8 years agoUse a proper event loop in unit_test_module.c and remove proto_radius from the test...
Arran Cudbard-Bell [Tue, 21 Nov 2017 11:03:31 +0000 (11:03 +0000)] 
Use a proper event loop in unit_test_module.c and remove proto_radius from the test path

We're testing unlang keywords, not the proto_radius module

8 years agoAllow zero delay in rlm_delay (just forces the request to be rescheduled)
Arran Cudbard-Bell [Tue, 21 Nov 2017 10:46:44 +0000 (10:46 +0000)] 
Allow zero delay in rlm_delay (just forces the request to be rescheduled)

8 years agoset THREADID callbacks instead of global callbacks
Alan T. DeKok [Mon, 20 Nov 2017 18:53:28 +0000 (13:53 -0500)] 
set THREADID callbacks instead of global callbacks

when we have them.

8 years agoeap-fast: fail on crypto-binding mismatch
Alan T. DeKok [Fri, 17 Nov 2017 21:05:33 +0000 (16:05 -0500)] 
eap-fast: fail on crypto-binding mismatch
as per rfc 4851, an invalid crypto-binding tlv is a
fatal error, handle accordingly.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
8 years agocheck sizes, and port fixes from 3.0
Alan T. DeKok [Mon, 20 Nov 2017 18:42:58 +0000 (13:42 -0500)] 
check sizes, and port fixes from 3.0

8 years agoUpdate dockerbuild script to match Arran's new names
Matthew Newton [Mon, 20 Nov 2017 18:41:00 +0000 (18:41 +0000)] 
Update dockerbuild script to match Arran's new names

8 years agoRename the Dockerfile that builds the dependencies to Dockerfile.deps not Dockerfile...
Arran Cudbard-Bell [Mon, 20 Nov 2017 16:05:06 +0000 (16:05 +0000)] 
Rename the Dockerfile that builds the dependencies to Dockerfile.deps not Dockerfile.source

8 years agodon't add quotes. GNU Make is very literal about it
Alan T. DeKok [Sat, 18 Nov 2017 14:29:08 +0000 (09:29 -0500)] 
don't add quotes.  GNU Make is very literal about it

and doesn't need them

8 years agoPull libkqueue from the official freeradius fork
Arran Cudbard-Bell [Mon, 20 Nov 2017 15:48:15 +0000 (15:48 +0000)] 
Pull libkqueue from the official freeradius fork

8 years agoCID 1422228
Arran Cudbard-Bell [Mon, 20 Nov 2017 15:05:16 +0000 (15:05 +0000)] 
CID 1422228

8 years agoAdd registration functions and a new prototype for async xlats
Arran Cudbard-Bell [Sun, 19 Nov 2017 11:32:23 +0000 (11:32 +0000)] 
Add registration functions and a new prototype for async xlats

8 years agoFix strict-prototypes warnings in MySQL
Arran Cudbard-Bell [Sun, 19 Nov 2017 10:56:49 +0000 (10:56 +0000)] 
Fix strict-prototypes warnings in MySQL

8 years agoAdd xlat_init function
Arran Cudbard-Bell [Sat, 18 Nov 2017 20:21:11 +0000 (20:21 +0000)] 
Add xlat_init function

8 years agoDefine mem macro in control_test.c
Arran Cudbard-Bell [Sat, 18 Nov 2017 13:03:23 +0000 (13:03 +0000)] 
Define mem macro in control_test.c

8 years agoFormatting
Arran Cudbard-Bell [Sat, 18 Nov 2017 13:03:13 +0000 (13:03 +0000)] 
Formatting

8 years agoMove MEM to debug.h so we can use it in utilities
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:39:38 +0000 (23:39 +0000)] 
Move MEM to debug.h so we can use it in utilities

8 years agoUse EXIT_FAILURE for portability
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:39:22 +0000 (23:39 +0000)] 
Use EXIT_FAILURE for portability

Apparently not all systems use 1 to indicate failure.  C99 says "Finally, control is returned to the host environment. If the value of status is zero or EXIT_SUCCESS, an implementation-defined form of the status successful termination is returned. If the value of status is EXIT_FAILURE, an implementation-defined form of the status unsuccessful termination is returned. Otherwise the status returned is implementation-defined."

8 years agoMemory allocation check
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:31:47 +0000 (23:31 +0000)] 
Memory allocation check

8 years agoMemory allocation check, and call fr_exit_now not _exit
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:31:30 +0000 (23:31 +0000)] 
Memory allocation check, and call fr_exit_now not _exit

So we know where we exited...

8 years agoFix inappropriate use of exit in proto_bfd
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:29:38 +0000 (23:29 +0000)] 
Fix inappropriate use of exit in proto_bfd

8 years agoUse mem macros for memory allocation errors
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:29:18 +0000 (23:29 +0000)] 
Use mem macros for memory allocation errors

8 years agomemory allocation. CID #1420942
Alan T. DeKok [Fri, 17 Nov 2017 22:56:24 +0000 (17:56 -0500)] 
memory allocation.  CID #1420942

8 years agomemory allocation. CID #1420935
Alan T. DeKok [Fri, 17 Nov 2017 22:55:38 +0000 (17:55 -0500)] 
memory allocation.  CID #1420935

8 years agotypo. CID #1421315
Alan T. DeKok [Fri, 17 Nov 2017 22:54:39 +0000 (17:54 -0500)] 
typo.  CID #1421315

8 years agomemory allocation. CID #1421314
Alan T. DeKok [Fri, 17 Nov 2017 22:53:51 +0000 (17:53 -0500)] 
memory allocation.  CID #1421314

8 years agoprint errors and work filename
Alan T. DeKok [Fri, 17 Nov 2017 22:52:48 +0000 (17:52 -0500)] 
print errors and work filename

8 years agoignore empty detail files
Alan T. DeKok [Fri, 17 Nov 2017 22:35:11 +0000 (17:35 -0500)] 
ignore empty detail files

8 years agodifferentiate ENOENT from other errors
Alan T. DeKok [Fri, 17 Nov 2017 20:29:18 +0000 (15:29 -0500)] 
differentiate ENOENT from other errors

8 years agomod_close() removes FDs from the event loop when it closes
Alan T. DeKok [Fri, 17 Nov 2017 20:19:00 +0000 (15:19 -0500)] 
mod_close() removes FDs from the event loop when it closes

network.c closes the IO handle.  But the VNODE handle is added
by proto_detail_work

8 years agoclean up error path
Alan T. DeKok [Fri, 17 Nov 2017 20:09:36 +0000 (15:09 -0500)] 
clean up error path

8 years agoFix all those 32s that should be 16s
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:32:02 +0000 (18:32 +0000)] 
Fix all those 32s that should be 16s

8 years agoFix the dictionary types
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:08:31 +0000 (18:08 +0000)] 
Fix the dictionary types

8 years agoTypo
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:08:18 +0000 (18:08 +0000)] 
Typo

8 years agoThe power of C11 compells you
Arran Cudbard-Bell [Fri, 17 Nov 2017 17:56:52 +0000 (17:56 +0000)] 
The power of C11 compells you

8 years agoSimplify code in detail_write
Arran Cudbard-Bell [Fri, 17 Nov 2017 17:41:14 +0000 (17:41 +0000)] 
Simplify code in detail_write

Could compress it further by selecting src/dst da, but not sure if AF is ever 'null' i.e. no ip address.

8 years agocan we be done now? Please?
Alan T. DeKok [Fri, 17 Nov 2017 17:36:23 +0000 (12:36 -0500)] 
can we be done now?  Please?

8 years agoshould really move this nonsense to value boxes
Alan T. DeKok [Fri, 17 Nov 2017 17:31:52 +0000 (12:31 -0500)] 
should really move this nonsense to value boxes

8 years agoset AF too
Alan T. DeKok [Fri, 17 Nov 2017 17:29:02 +0000 (12:29 -0500)] 
set AF too

8 years agodon't include trailing 0
Alan T. DeKok [Fri, 17 Nov 2017 17:16:38 +0000 (12:16 -0500)] 
don't include trailing 0

8 years agocheck Message-Authenticator correctly
Alan T. DeKok [Fri, 17 Nov 2017 16:23:04 +0000 (11:23 -0500)] 
check Message-Authenticator correctly

8 years agodon't crash on <internal>
Alan T. DeKok [Fri, 17 Nov 2017 15:11:08 +0000 (10:11 -0500)] 
don't crash on <internal>

8 years agoset data.type, too
Alan T. DeKok [Fri, 17 Nov 2017 15:08:13 +0000 (10:08 -0500)] 
set data.type, too

8 years agoreorder
Alan T. DeKok [Thu, 16 Nov 2017 18:36:33 +0000 (13:36 -0500)] 
reorder

8 years agoValidate requests too in radsniff
Arran Cudbard-Bell [Thu, 16 Nov 2017 22:46:05 +0000 (22:46 +0000)] 
Validate requests too in radsniff

8 years agoReturn an error if we can't validate the request authenticator (oops)
Arran Cudbard-Bell [Thu, 16 Nov 2017 22:45:50 +0000 (22:45 +0000)] 
Return an error if we can't validate the request authenticator (oops)

8 years agodecrement workers when we exit
Alan T. DeKok [Thu, 16 Nov 2017 17:10:20 +0000 (12:10 -0500)] 
decrement workers when we exit

8 years agocall worker close, and don't just close the FD
Alan T. DeKok [Thu, 16 Nov 2017 17:08:56 +0000 (12:08 -0500)] 
call worker close, and don't just close the FD

8 years agotouch before free, not after
Alan T. DeKok [Thu, 16 Nov 2017 16:38:17 +0000 (11:38 -0500)] 
touch before free, not after

8 years agotypo
Alan T. DeKok [Thu, 16 Nov 2017 16:08:29 +0000 (11:08 -0500)] 
typo

8 years agohave the worker clean up it's IO instance, not the file module
Alan T. DeKok [Thu, 16 Nov 2017 15:53:57 +0000 (10:53 -0500)] 
have the worker clean up it's IO instance, not the file module

and in work_init(), poll for changes if the worker is still alive.

8 years agotravis fixes
Alan T. DeKok [Thu, 16 Nov 2017 01:53:19 +0000 (20:53 -0500)] 
travis fixes

8 years agocall fr_network_listen_read() on Linux
Alan T. DeKok [Thu, 16 Nov 2017 00:04:02 +0000 (19:04 -0500)] 
call fr_network_listen_read() on Linux

because libkqueue is broken

8 years agoadd 'nr' to event_list_set()
Alan T. DeKok [Wed, 15 Nov 2017 23:55:10 +0000 (18:55 -0500)] 
add 'nr' to event_list_set()

so that if a reader needs to poke the network, it can do so

8 years agodon't do work_init() twice
Alan T. DeKok [Wed, 15 Nov 2017 21:55:04 +0000 (16:55 -0500)] 
don't do work_init() twice

8 years agofixes for building on linux
Alan T. DeKok [Wed, 15 Nov 2017 21:37:45 +0000 (16:37 -0500)] 
fixes for building on linux

8 years agoclean up code and remove goto
Alan T. DeKok [Wed, 15 Nov 2017 18:31:37 +0000 (13:31 -0500)] 
clean up code and remove goto

8 years agotry renaming detail* to detail.work only once
Alan T. DeKok [Wed, 15 Nov 2017 18:24:08 +0000 (13:24 -0500)] 
try renaming detail* to detail.work only once

8 years agoallow poll_interval == 0 on Linux
Alan T. DeKok [Wed, 15 Nov 2017 18:20:31 +0000 (13:20 -0500)] 
allow poll_interval == 0 on Linux

because inotify works there <sigh>

8 years agoif no worker and the dir changed, start checking again
Alan T. DeKok [Wed, 15 Nov 2017 18:18:12 +0000 (13:18 -0500)] 
if no worker and the dir changed, start checking again

8 years agotrack the number of workers via a mutex-protected counter
Alan T. DeKok [Wed, 15 Nov 2017 18:07:11 +0000 (13:07 -0500)] 
track the number of workers via a mutex-protected counter

8 years agodelay polling until such time as /proc/PID changes permission
Alan T. DeKok [Wed, 15 Nov 2017 16:05:30 +0000 (11:05 -0500)] 
delay polling until such time as /proc/PID changes permission

8 years agoEnsure that libkqueue / Linux doesn't bork us.
Alan T. DeKok [Wed, 15 Nov 2017 14:45:59 +0000 (09:45 -0500)] 
Ensure that libkqueue / Linux doesn't bork us.

The kqueue API takes an FD, but inotify requires a filename.
libkqueue uses /proc/PID/fd/# to look up the FD -> filename mapping.

However, if you start the server as "root", and then swap to "radiusd",
/proc/PID will be owned by "root" for security reasons.  The only way
to make /proc/PID owned by "radiusd" is to set the DUMPABLE flag.

Instead of making the poor sysadmin figure this out,
we check for this situation, and give them a
descriptive message telling them what to do.

8 years agoexpose uid / gid / core dumps, etc.
Alan T. DeKok [Wed, 15 Nov 2017 14:40:21 +0000 (09:40 -0500)] 
expose uid / gid / core dumps, etc.

8 years ago0 is also allowed
Alan T. DeKok [Wed, 15 Nov 2017 14:30:49 +0000 (09:30 -0500)] 
0 is also allowed

8 years agoRegenerate rlm_rest configure script
Arran Cudbard-Bell [Wed, 15 Nov 2017 09:16:02 +0000 (09:16 +0000)] 
Regenerate rlm_rest configure script

8 years agoDoxygen
Arran Cudbard-Bell [Tue, 14 Nov 2017 23:14:55 +0000 (23:14 +0000)] 
Doxygen

8 years agoFix stupid non-issue flagged by GCC
Arran Cudbard-Bell [Tue, 14 Nov 2017 23:12:38 +0000 (23:12 +0000)] 
Fix stupid non-issue flagged by GCC

8 years agoFirst stage of async xlats
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:54:58 +0000 (22:54 +0000)] 
First stage of async xlats

Todo:
- Add custom async xlat function resumption type
- Test pushing xlats from modules
- Add new type of async xlat callback to expose additional functionality
- Do something sane with intermediary contexts for value boxes
- Convert tmpl expansion to also be async

8 years agodon't dup the closing brace in xlat_tokenize_expansion
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:52:20 +0000 (22:52 +0000)] 
don't dup the closing brace in xlat_tokenize_expansion

8 years agoMore xlat inline tests
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:51:24 +0000 (22:51 +0000)] 
More xlat inline tests

8 years agoShuffle debug statements around between functions in xlat_eval.c
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:51:13 +0000 (22:51 +0000)] 
Shuffle debug statements around between functions in xlat_eval.c

8 years agoFix all asprintf calls so they set the correct type
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:48:00 +0000 (22:48 +0000)] 
Fix all asprintf calls so they set the correct type

8 years agoDocs
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:45:40 +0000 (22:45 +0000)] 
Docs

8 years agoSet the correct type forregex subcaptures
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:45:29 +0000 (22:45 +0000)] 
Set the correct type forregex subcaptures

8 years agoUse custom realloc function for strings
Arran Cudbard-Bell [Tue, 14 Nov 2017 21:59:26 +0000 (21:59 +0000)] 
Use custom realloc function for strings

Ensures the type is correct and \0 terminates

8 years agoUse typed_asprintf in sql_xlat
Arran Cudbard-Bell [Tue, 14 Nov 2017 21:58:54 +0000 (21:58 +0000)] 
Use typed_asprintf in sql_xlat

8 years agojust assign DHCP-Your-IP-Address natively
Alan T. DeKok [Tue, 14 Nov 2017 20:18:42 +0000 (15:18 -0500)] 
just assign DHCP-Your-IP-Address natively

8 years agomake IP address assignment generic
Alan T. DeKok [Tue, 14 Nov 2017 20:16:43 +0000 (15:16 -0500)] 
make IP address assignment generic