]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 years agoWork around faulty clang analyzer logic
Arran Cudbard-Bell [Sun, 30 Sep 2018 16:46:41 +0000 (00:46 +0800)] 
Work around faulty clang analyzer logic

7 years agoPass pointer to the handle
Arran Cudbard-Bell [Sun, 30 Sep 2018 16:25:11 +0000 (00:25 +0800)] 
Pass pointer to the handle

7 years agoInit valuebox in overflow case
Arran Cudbard-Bell [Sun, 30 Sep 2018 16:18:29 +0000 (00:18 +0800)] 
Init valuebox in overflow case

7 years agofind_lm_password and find_nt_password report failure to find password attributes
Arran Cudbard-Bell [Sun, 30 Sep 2018 16:07:46 +0000 (00:07 +0800)] 
find_lm_password and find_nt_password report failure to find password attributes

7 years agoInitialise output pointer
Arran Cudbard-Bell [Sun, 30 Sep 2018 15:53:52 +0000 (23:53 +0800)] 
Initialise output pointer

7 years agoInitialise client in a way that Clang Analyzer understands
Arran Cudbard-Bell [Sun, 30 Sep 2018 15:47:41 +0000 (23:47 +0800)] 
Initialise client in a way that Clang Analyzer understands

7 years agoUse corrext context
Arran Cudbard-Bell [Sun, 30 Sep 2018 14:11:06 +0000 (22:11 +0800)] 
Use corrext context

7 years agoBetter encapsulate regex match data
Arran Cudbard-Bell [Sun, 30 Sep 2018 13:32:17 +0000 (21:32 +0800)] 
Better encapsulate regex match data

Switch regex xlat to an async expression.

Make regex xalt ploymorphic to allow querying by name or by capture number.

Allow N capture groups for PCRE and PCRE2 regexes.

7 years agoIf we have REGEX_PCRE2 or REGEX_PCRE set the feature 'regex-pcre' to true
Arran Cudbard-Bell [Fri, 28 Sep 2018 13:18:58 +0000 (21:18 +0800)] 
If we have REGEX_PCRE2 or REGEX_PCRE set the feature 'regex-pcre' to true

7 years agoAdd support for PCRE2 Closes #2315
Arran Cudbard-Bell [Fri, 28 Sep 2018 08:10:07 +0000 (16:10 +0800)] 
Add support for PCRE2 Closes #2315

7 years agoFix elsif (should be elif) in inet.c
Arran Cudbard-Bell [Fri, 28 Sep 2018 07:37:14 +0000 (15:37 +0800)] 
Fix elsif (should be elif) in inet.c

7 years agoFormatting and use talloc_bstrndup for binary safe copying of POSIX regex captures
Arran Cudbard-Bell [Thu, 27 Sep 2018 15:43:26 +0000 (23:43 +0800)] 
Formatting and use talloc_bstrndup for binary safe copying of POSIX regex captures

7 years agoFormatting
Arran Cudbard-Bell [Thu, 27 Sep 2018 15:42:10 +0000 (23:42 +0800)] 
Formatting

7 years agoFormatting
Arran Cudbard-Bell [Thu, 27 Sep 2018 15:41:14 +0000 (23:41 +0800)] 
Formatting

7 years agoExplicitly prevent overflow
Arran Cudbard-Bell [Wed, 26 Sep 2018 23:42:03 +0000 (07:42 +0800)] 
Explicitly prevent overflow

7 years agomove common code to fr_app_process_instantiate()
Alan T. DeKok [Wed, 26 Sep 2018 19:24:10 +0000 (15:24 -0400)] 
move common code to fr_app_process_instantiate()

7 years agoLength changes size and size between versions of json-c
Arran Cudbard-Bell [Wed, 26 Sep 2018 18:42:04 +0000 (02:42 +0800)] 
Length changes size and size between versions of json-c

7 years agocall tokenize_cast only if there's a cast
Alan T. DeKok [Wed, 26 Sep 2018 18:50:02 +0000 (14:50 -0400)] 
call tokenize_cast only if there's a cast

7 years agomove "bootstrap app_process" into common function
Alan T. DeKok [Wed, 26 Sep 2018 12:53:13 +0000 (08:53 -0400)] 
move "bootstrap app_process" into common function

7 years agoFix potential NULL dereference for function with NULL argument list
Arran Cudbard-Bell [Wed, 26 Sep 2018 10:23:30 +0000 (18:23 +0800)] 
Fix potential NULL dereference for function with NULL argument list

7 years agoShould be const too
Arran Cudbard-Bell [Wed, 26 Sep 2018 09:48:47 +0000 (17:48 +0800)] 
Should be const too

7 years agoFix clang scan stupidity
Arran Cudbard-Bell [Wed, 26 Sep 2018 07:02:37 +0000 (15:02 +0800)] 
Fix clang scan stupidity

7 years agoFix incorrect return code check for cond_tokenize_cast
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:29:53 +0000 (14:29 +0800)] 
Fix incorrect return code check for cond_tokenize_cast

Fix uninitialised return in input on error

7 years agoOut may be NULL
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:25:01 +0000 (14:25 +0800)] 
Out may be NULL

7 years agoDeal with NULL ptr value in dlist code
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:23:03 +0000 (14:23 +0800)] 
Deal with NULL ptr value in dlist code

Markup other arguments as nonnull, so we get warnings earlier in clang scan

7 years agoMove fr_command_register_hook call inside the HAVE_PTHREAD_H ifdef
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:18:12 +0000 (14:18 +0800)] 
Move fr_command_register_hook call inside the HAVE_PTHREAD_H ifdef

We only spawn workers if we're built with threads, and the list is life uninitialised otherwise

7 years agoDon't continue if we error out spawning worker threads, destroy the scheduler and...
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:17:30 +0000 (14:17 +0800)] 
Don't continue if we error out spawning worker threads, destroy the scheduler and return NULL

7 years agoSilence various compiler warnings in Clang 7.0
Arran Cudbard-Bell [Wed, 26 Sep 2018 06:07:09 +0000 (14:07 +0800)] 
Silence various compiler warnings in Clang 7.0

7 years agomove common code to master_io mod_instantiate()
Alan T. DeKok [Tue, 25 Sep 2018 23:00:29 +0000 (19:00 -0400)] 
move common code to master_io mod_instantiate()

7 years agomove common code to master_io mod_bootstrap()
Alan T. DeKok [Tue, 25 Sep 2018 22:55:49 +0000 (18:55 -0400)] 
move common code to master_io mod_bootstrap()

7 years agomove dynamic_submodule into master_io
Alan T. DeKok [Tue, 25 Sep 2018 22:15:44 +0000 (18:15 -0400)] 
move dynamic_submodule into master_io

now that we have master_io bootstrap, etc. functions.
All of the duplicated work can be done there.

7 years agowe no longer need master IO talloc context
Alan T. DeKok [Tue, 25 Sep 2018 22:12:14 +0000 (18:12 -0400)] 
we no longer need master IO talloc context

7 years agoparent things from the parent structure
Alan T. DeKok [Tue, 25 Sep 2018 22:11:58 +0000 (18:11 -0400)] 
parent things from the parent structure

7 years agoignore editor ~ files
Alan T. DeKok [Tue, 25 Sep 2018 21:41:56 +0000 (17:41 -0400)] 
ignore editor ~ files

7 years agotypo
Alan T. DeKok [Tue, 25 Sep 2018 19:06:27 +0000 (15:06 -0400)] 
typo

7 years agomove fr_io_client_t handling to destructor
Alan T. DeKok [Tue, 25 Sep 2018 19:06:10 +0000 (15:06 -0400)] 
move fr_io_client_t handling to destructor

7 years agomove "live" to it's own variable
Alan T. DeKok [Tue, 25 Sep 2018 18:51:40 +0000 (14:51 -0400)] 
move "live" to it's own variable

7 years agomore separation of variables
Alan T. DeKok [Tue, 25 Sep 2018 18:46:18 +0000 (14:46 -0400)] 
more separation of variables

7 years agomore separation of "const inst" and non-const thread_instance
Alan T. DeKok [Tue, 25 Sep 2018 18:40:12 +0000 (14:40 -0400)] 
more separation of "const inst" and non-const thread_instance

7 years agomake fr_io_instance_t "const"
Alan T. DeKok [Tue, 25 Sep 2018 17:47:04 +0000 (13:47 -0400)] 
make fr_io_instance_t "const"

7 years agoclean up talloc parenting
Alan T. DeKok [Tue, 25 Sep 2018 17:44:22 +0000 (13:44 -0400)] 
clean up talloc parenting

in preparation for making fr_io_instance_t "const"

7 years agoheader levels
Matthew Newton [Tue, 25 Sep 2018 21:10:14 +0000 (22:10 +0100)] 
header levels

7 years agodictionary doesn't have a .conf suffix, include it anyway
Matthew Newton [Tue, 25 Sep 2018 21:03:19 +0000 (22:03 +0100)] 
dictionary doesn't have a .conf suffix, include it anyway

7 years agoconvert local links to inter-document cross-refs
Matthew Newton [Tue, 25 Sep 2018 20:52:21 +0000 (21:52 +0100)] 
convert local links to inter-document cross-refs

7 years agoadd comment to get auto-expanded in asciidoc
Matthew Newton [Tue, 25 Sep 2018 20:25:15 +0000 (21:25 +0100)] 
add comment to get auto-expanded in asciidoc

7 years agomake sure asciidoc links are in inter-document xref format
Matthew Newton [Tue, 25 Sep 2018 16:18:37 +0000 (17:18 +0100)] 
make sure asciidoc links are in inter-document xref format

So that when files are converted to HTML, they still link nicely
to each other.

7 years agofix links
Matthew Newton [Tue, 25 Sep 2018 20:23:51 +0000 (21:23 +0100)] 
fix links

7 years agoconvert to markdown (text still needs updating)
Matthew Newton [Tue, 25 Sep 2018 20:22:53 +0000 (21:22 +0100)] 
convert to markdown (text still needs updating)

7 years agoconvert asciidoc to pretty HTML
Matthew Newton [Sun, 23 Sep 2018 20:50:43 +0000 (21:50 +0100)] 
convert asciidoc to pretty HTML

7 years agoremove "parent" from client
Alan T. DeKok [Tue, 25 Sep 2018 17:37:36 +0000 (13:37 -0400)] 
remove "parent" from client

we have access to the relevant fields already

7 years agoone more const issue
Alan T. DeKok [Tue, 25 Sep 2018 13:21:44 +0000 (09:21 -0400)] 
one more const issue

7 years agomove mod_open() to using thread_instance
Alan T. DeKok [Tue, 25 Sep 2018 12:37:10 +0000 (08:37 -0400)] 
move mod_open() to using thread_instance

7 years agouse thread_instance
Alan T. DeKok [Tue, 25 Sep 2018 11:52:57 +0000 (07:52 -0400)] 
use thread_instance

7 years agoconst issues
Alan T. DeKok [Tue, 25 Sep 2018 10:35:13 +0000 (06:35 -0400)] 
const issues

7 years agoThe length of chap challenge isn't bounded
Arran Cudbard-Bell [Tue, 25 Sep 2018 02:44:18 +0000 (10:44 +0800)] 
The length of chap challenge isn't bounded

7 years agohandle longer CHAP-Password when using debug level 3
Alan T. DeKok [Mon, 24 Sep 2018 23:07:59 +0000 (19:07 -0400)] 
handle longer CHAP-Password when using debug level 3

7 years agomove writable socket stuff to private structure
Alan T. DeKok [Fri, 21 Sep 2018 18:01:55 +0000 (14:01 -0400)] 
move writable socket stuff to private structure

which means we're one step closer to using thread_instance

and we can now remove mod_detach(), as the per-socket stuff
is talloc'd, and we can use a talloc destructor for it

7 years agodetach can only be called for the main instance
Alan T. DeKok [Fri, 21 Sep 2018 17:36:46 +0000 (13:36 -0400)] 
detach can only be called for the main instance

not for child connections

7 years ago"open" shouldn't be called for connections
Alan T. DeKok [Fri, 21 Sep 2018 17:33:56 +0000 (13:33 -0400)] 
"open" shouldn't be called for connections

7 years agomake app_io_instance "const"
Alan T. DeKok [Fri, 21 Sep 2018 17:29:34 +0000 (13:29 -0400)] 
make app_io_instance "const"

in yet another step to making thread-specific data structures

7 years agodon't call detach, the dl APIs take care of that for us
Alan T. DeKok [Fri, 21 Sep 2018 17:27:04 +0000 (13:27 -0400)] 
don't call detach, the dl APIs take care of that for us

7 years agowrite to thread_instance, and then copy it to app_io_instance
Alan T. DeKok [Fri, 21 Sep 2018 17:26:15 +0000 (13:26 -0400)] 
write to thread_instance, and then copy it to app_io_instance

7 years agoRevert "move "free clients" to mod_close(), instead of mod_detach()"
Alan T. DeKok [Fri, 21 Sep 2018 17:21:50 +0000 (13:21 -0400)] 
Revert "move "free clients" to mod_close(), instead of mod_detach()"

This reverts commit a505ccc195fc49847166ad2bf3839e099282944b.

we don't yet have thread-specific data structures for sockets.
so the "alive_clients" are still in the app_io_instance, not the
thread_instance.  Once we have thread data, the alive_clients
can move there, and then be free'd on mod_close()

7 years agodon't bind client tcp sockets
Alan T. DeKok [Fri, 21 Sep 2018 16:09:10 +0000 (12:09 -0400)] 
don't bind client tcp sockets

7 years agouse listener, and not app_io_instance for NAK
Alan T. DeKok [Fri, 21 Sep 2018 15:49:15 +0000 (11:49 -0400)] 
use listener, and not app_io_instance for NAK

7 years agoRevert "start of work to allow workers to do their own IO"
Alan T. DeKok [Fri, 21 Sep 2018 15:02:17 +0000 (11:02 -0400)] 
Revert "start of work to allow workers to do their own IO"

This reverts commit 79c344b9333e8e7c0239e671392be135dd03cf20.

it's better to just add an fr_network_t to the worker thread,
as with single-threaded mode.  Then, have special markers
in the channel so that messages result in API calls, and not
in actual channel messages being sent

7 years agowrite to thread_instance, not app_io_instance
Alan T. DeKok [Fri, 21 Sep 2018 14:51:55 +0000 (10:51 -0400)] 
write to thread_instance, not app_io_instance

in preparation for making app_io_instance "const"

7 years agopass listener, not app_io_instance
Alan T. DeKok [Fri, 21 Sep 2018 14:51:41 +0000 (10:51 -0400)] 
pass listener, not app_io_instance

7 years agodo closing in mod_close(), not mod_detach()
Alan T. DeKok [Fri, 21 Sep 2018 14:49:22 +0000 (10:49 -0400)] 
do closing in mod_close(), not mod_detach()

7 years agoclose things in mod_close(), not mod_detach()
Alan T. DeKok [Fri, 21 Sep 2018 14:47:04 +0000 (10:47 -0400)] 
close things in mod_close(), not mod_detach()

7 years agomove "free clients" to mod_close(), instead of mod_detach()
Alan T. DeKok [Fri, 21 Sep 2018 14:43:08 +0000 (10:43 -0400)] 
move "free clients" to mod_close(), instead of mod_detach()

since the dl framework calls mod_detach, we don't have to do that
for child listeners.

7 years agomove the remainder of the functions to taking fr_listen_t
Alan T. DeKok [Thu, 20 Sep 2018 19:05:47 +0000 (15:05 -0400)] 
move the remainder of the functions to taking fr_listen_t

7 years agorearrange code
Alan T. DeKok [Thu, 20 Sep 2018 18:00:08 +0000 (14:00 -0400)] 
rearrange code

7 years agorevert 8d15eee4 for proto_ldap_sync
Alan T. DeKok [Thu, 20 Sep 2018 17:53:18 +0000 (13:53 -0400)] 
revert 8d15eee4 for proto_ldap_sync

7 years agoadd 'int fd' to listener structure
Alan T. DeKok [Thu, 20 Sep 2018 17:51:19 +0000 (13:51 -0400)] 
add 'int fd' to listener structure

and remove "get_fd" functions and callbacks

7 years agoremove most mod_close as unnecessary
Alan T. DeKok [Thu, 20 Sep 2018 17:11:17 +0000 (13:11 -0400)] 
remove most mod_close as unnecessary

and fix master.c to call close() if there's no app_io->close

7 years agomore fixes for passing the correct parameter
Alan T. DeKok [Thu, 20 Sep 2018 17:05:11 +0000 (13:05 -0400)] 
more fixes for passing the correct parameter

7 years agomore rename 'listen' to 'li', and fix const complaints
Alan T. DeKok [Thu, 20 Sep 2018 17:03:45 +0000 (13:03 -0400)] 
more rename 'listen' to 'li', and fix const complaints

7 years agopass the correct variable over
Alan T. DeKok [Thu, 20 Sep 2018 17:03:15 +0000 (13:03 -0400)] 
pass the correct variable over

7 years agoneed to close this, too
Alan T. DeKok [Thu, 20 Sep 2018 16:49:00 +0000 (12:49 -0400)] 
need to close this, too

7 years agomake mod_close() take fr_listen_t
Alan T. DeKok [Thu, 20 Sep 2018 16:45:52 +0000 (12:45 -0400)] 
make mod_close() take fr_listen_t

7 years agorename variable "listen" to "li"
Alan T. DeKok [Thu, 20 Sep 2018 16:27:56 +0000 (12:27 -0400)] 
rename variable "listen" to "li"

so that it doesn't conflict with the function listen()

7 years agomake mod_open() take fr_listen_t
Alan T. DeKok [Thu, 20 Sep 2018 16:13:45 +0000 (12:13 -0400)] 
make mod_open() take fr_listen_t

7 years agomake fd_set take listener
Alan T. DeKok [Thu, 20 Sep 2018 13:51:37 +0000 (09:51 -0400)] 
make fd_set take listener

7 years agomake mod_fd() take fr_listen_t *
Alan T. DeKok [Thu, 20 Sep 2018 13:27:33 +0000 (09:27 -0400)] 
make mod_fd() take fr_listen_t *

once all of the functions are converted, we can move more
variables to fr_listen_t.  e.g. fd, name, src/dst.

We can also add / use listen->thread_instance in order to
make listen->app_io_instance "const"

7 years agoset thread_instance == app_io_instance for listeners
Alan T. DeKok [Thu, 20 Sep 2018 13:32:12 +0000 (09:32 -0400)] 
set thread_instance == app_io_instance for listeners

so that the new code can use the correct variable name, even tho
they point to the same struct.  We can then make them point to
different structures

7 years agocreate and use child listener
Alan T. DeKok [Wed, 19 Sep 2018 16:22:04 +0000 (12:22 -0400)] 
create and use child listener

with all of the information we need about the socket

7 years agoRevert "add thread_instance to fd()"
Alan T. DeKok [Wed, 19 Sep 2018 15:49:33 +0000 (11:49 -0400)] 
Revert "add thread_instance to fd()"

This reverts commit a2701b977fe1483e22fb36993f7998e2fde15672.

7 years agoour own listen->app is always ourselves
Alan T. DeKok [Wed, 19 Sep 2018 15:48:17 +0000 (11:48 -0400)] 
our own listen->app is always ourselves

7 years agoSwitch rlm_lua to using the thread instance framework Closes #2311
Arran Cudbard-Bell [Thu, 20 Sep 2018 03:48:28 +0000 (11:48 +0800)] 
Switch rlm_lua to using the thread instance framework Closes #2311

7 years agoCheck return code of i2a_ASN1_OBJECT Closes #2310
Arran Cudbard-Bell [Thu, 20 Sep 2018 01:38:22 +0000 (09:38 +0800)] 
Check return code of i2a_ASN1_OBJECT Closes #2310

7 years agoremove extra parameter to "open"
Alan T. DeKok [Wed, 19 Sep 2018 14:48:22 +0000 (10:48 -0400)] 
remove extra parameter to "open"

it turns out we're not going to use it

7 years agosc can't be NULL
Alan T. DeKok [Wed, 19 Sep 2018 14:15:10 +0000 (10:15 -0400)] 
sc can't be NULL

7 years agosimplify the code
Alan T. DeKok [Wed, 19 Sep 2018 14:14:53 +0000 (10:14 -0400)] 
simplify the code

7 years agomove common code to fr_master_io_listen()
Alan T. DeKok [Wed, 19 Sep 2018 14:13:35 +0000 (10:13 -0400)] 
move common code to fr_master_io_listen()

7 years agoadd thread_instance to listen socket
Alan T. DeKok [Wed, 19 Sep 2018 11:44:05 +0000 (07:44 -0400)] 
add thread_instance to listen socket

7 years agodon't build these test programs
Alan T. DeKok [Wed, 19 Sep 2018 11:43:17 +0000 (07:43 -0400)] 
don't build these test programs

they're no longer needed

7 years agoadd thread_instance to fd()
Alan T. DeKok [Wed, 19 Sep 2018 11:40:49 +0000 (07:40 -0400)] 
add thread_instance to fd()

7 years agonotes on which entries are "const"
Alan T. DeKok [Tue, 18 Sep 2018 18:10:39 +0000 (14:10 -0400)] 
notes on which entries are "const"

7 years agocleanups in preparation for multithreaded networking
Alan T. DeKok [Tue, 18 Sep 2018 17:54:44 +0000 (13:54 -0400)] 
cleanups in preparation for multithreaded networking

we can't re-instantiate a module, that's bad.  And, the default
structs for a module should be the ones it's modifying.  the
main config should be "const", and rarely used