]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
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

8 years agoFixup expansion tokenization to produce valid talloc buffers in node->fmt
Arran Cudbard-Bell [Tue, 14 Nov 2017 17:28:40 +0000 (17:28 +0000)] 
Fixup expansion tokenization to produce valid talloc buffers in node->fmt

8 years agoFixup literal tokenization to product valid talloc buffers in node->fmt
Arran Cudbard-Bell [Tue, 14 Nov 2017 17:28:40 +0000 (17:28 +0000)] 
Fixup literal tokenization to product valid talloc buffers in node->fmt

8 years agoUpdate cursor logic for empty lists
Arran Cudbard-Bell [Tue, 14 Nov 2017 12:37:32 +0000 (12:37 +0000)] 
Update cursor logic for empty lists

Appending, prepending, inserting, replacing on an empty list should not set current.  That way fr_cursor_next() produces a consistent result on empty lists and populated lists when we're using cursors to track progress.

8 years agoAdd accessor for stack depth
Arran Cudbard-Bell [Mon, 13 Nov 2017 23:00:20 +0000 (23:00 +0000)] 
Add accessor for stack depth

8 years agomore debug messages
Alan T. DeKok [Tue, 14 Nov 2017 17:31:05 +0000 (12:31 -0500)] 
more debug messages

8 years agoxlat_tokenize generally won't have the request available
Arran Cudbard-Bell [Mon, 13 Nov 2017 22:57:48 +0000 (22:57 +0000)] 
xlat_tokenize generally won't have the request available

8 years agoDeal with NULL attribute value
Arran Cudbard-Bell [Mon, 13 Nov 2017 21:31:41 +0000 (21:31 +0000)] 
Deal with NULL attribute value

8 years agoDoxygen
Arran Cudbard-Bell [Mon, 13 Nov 2017 21:01:06 +0000 (21:01 +0000)] 
Doxygen

8 years agoMove public interface functions below callbacks
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:48:33 +0000 (20:48 +0000)] 
Move public interface functions below callbacks

8 years agoNew return codes for xlat functions
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:47:49 +0000 (20:47 +0000)] 
New return codes for xlat functions

8 years agoMissed in previous commit...
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:46:27 +0000 (20:46 +0000)] 
Missed in previous commit...

8 years agoAdditional utility functions
Arran Cudbard-Bell [Mon, 13 Nov 2017 19:39:27 +0000 (19:39 +0000)] 
Additional utility functions

8 years agoReturn unit timestamp as a 64bit integer
Arran Cudbard-Bell [Mon, 13 Nov 2017 12:17:29 +0000 (12:17 +0000)] 
Return unit timestamp as a 64bit integer

8 years agoDocument more interpreter things
Arran Cudbard-Bell [Sat, 11 Nov 2017 16:29:54 +0000 (16:29 +0000)] 
Document more interpreter things

8 years agoDon't set action if we're not goign to read it
Arran Cudbard-Bell [Sat, 11 Nov 2017 16:29:34 +0000 (16:29 +0000)] 
Don't set action if we're not goign to read it

8 years agoAdd an UNLANG_ACTION_YIELD action
Arran Cudbard-Bell [Sat, 11 Nov 2017 15:54:26 +0000 (15:54 +0000)] 
Add an UNLANG_ACTION_YIELD action

It's more explicit than just using the rcode

8 years agoReduce spurious debugging output
Arran Cudbard-Bell [Sat, 11 Nov 2017 13:38:00 +0000 (13:38 +0000)] 
Reduce spurious debugging output

8 years agoRestructure the unlang interpreter to get rid of the majority of the gotos
Arran Cudbard-Bell [Sat, 11 Nov 2017 01:10:16 +0000 (01:10 +0000)] 
Restructure the unlang interpreter to get rid of the majority of the gotos

Two loops, one handles going back up the stack, the other handles executing instructions, and pushing new frames onto the stack.

8 years agoremove asserts on vars declared as nonnull
Matthew Newton [Fri, 10 Nov 2017 21:33:12 +0000 (21:33 +0000)] 
remove asserts on vars declared as nonnull

stops gcc6 complaints with -Wnonnull-compare

8 years agoenable reproducible builds for debian packages
Matthew Newton [Fri, 10 Nov 2017 20:57:45 +0000 (20:57 +0000)] 
enable reproducible builds for debian packages

8 years agoadd --enable-reproducible-builds configure option
Matthew Newton [Fri, 10 Nov 2017 20:56:29 +0000 (20:56 +0000)] 
add --enable-reproducible-builds configure option

So that __DATE__ and __TIME__ can be removed only when needed;
turns off warnings when not using reproducible builds.

8 years agoallocation may fail. CID #1420942
Alan T. DeKok [Fri, 10 Nov 2017 21:02:39 +0000 (16:02 -0500)] 
allocation may fail.  CID #1420942

8 years agonote fall-through. CID #1420941
Alan T. DeKok [Fri, 10 Nov 2017 21:01:59 +0000 (16:01 -0500)] 
note fall-through.  CID #1420941

8 years agoallocation may fail. CID #1420940
Alan T. DeKok [Fri, 10 Nov 2017 21:01:19 +0000 (16:01 -0500)] 
allocation may fail.  CID #1420940

8 years agoallocation may fail. CID #1420939
Alan T. DeKok [Fri, 10 Nov 2017 21:00:37 +0000 (16:00 -0500)] 
allocation may fail.  CID #1420939

8 years agoallocation may fail. CID #1420938
Alan T. DeKok [Fri, 10 Nov 2017 21:00:00 +0000 (16:00 -0500)] 
allocation may fail.  CID #1420938

8 years agoremove unnecessary check. CID #1420937
Alan T. DeKok [Fri, 10 Nov 2017 20:59:20 +0000 (15:59 -0500)] 
remove unnecessary check.  CID #1420937

8 years agoadd missing break. CID #1420936
Alan T. DeKok [Fri, 10 Nov 2017 20:58:35 +0000 (15:58 -0500)] 
add missing break.  CID #1420936

8 years agoallocation can fail. CID #1420935
Alan T. DeKok [Fri, 10 Nov 2017 20:57:45 +0000 (15:57 -0500)] 
allocation can fail.  CID #1420935

8 years agomemmove() for overlapping data. CID #1420934
Alan T. DeKok [Fri, 10 Nov 2017 20:56:47 +0000 (15:56 -0500)] 
memmove() for overlapping data.  CID #1420934

8 years agodereference after NULL. CID #142093
Alan T. DeKok [Fri, 10 Nov 2017 20:55:22 +0000 (15:55 -0500)] 
dereference after NULL.  CID #142093

8 years agodocument and limit maximum_outstanding
Alan T. DeKok [Fri, 10 Nov 2017 20:16:32 +0000 (15:16 -0500)] 
document and limit maximum_outstanding

8 years agowe're at EOF if we asked for N bytes, and got M<N
Alan T. DeKok [Fri, 10 Nov 2017 20:12:15 +0000 (15:12 -0500)] 
we're at EOF if we asked for N bytes, and got M<N

8 years agoadd maximum_outstanding limit
Alan T. DeKok [Fri, 10 Nov 2017 20:05:42 +0000 (15:05 -0500)] 
add maximum_outstanding limit

for doing many packets in parallel