]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Sat, 18 Nov 2017 20:21:11 +0000 (20:21 +0000)]
Add xlat_init function
Arran Cudbard-Bell [Sat, 18 Nov 2017 13:03:23 +0000 (13:03 +0000)]
Define mem macro in control_test.c
Arran Cudbard-Bell [Sat, 18 Nov 2017 13:03:13 +0000 (13:03 +0000)]
Formatting
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
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."
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:31:47 +0000 (23:31 +0000)]
Memory allocation check
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...
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:29:38 +0000 (23:29 +0000)]
Fix inappropriate use of exit in proto_bfd
Arran Cudbard-Bell [Fri, 17 Nov 2017 23:29:18 +0000 (23:29 +0000)]
Use mem macros for memory allocation errors
Alan T. DeKok [Fri, 17 Nov 2017 22:56:24 +0000 (17:56 -0500)]
memory allocation. CID #
1420942
Alan T. DeKok [Fri, 17 Nov 2017 22:55:38 +0000 (17:55 -0500)]
memory allocation. CID #
1420935
Alan T. DeKok [Fri, 17 Nov 2017 22:54:39 +0000 (17:54 -0500)]
Alan T. DeKok [Fri, 17 Nov 2017 22:53:51 +0000 (17:53 -0500)]
memory allocation. CID #
1421314
Alan T. DeKok [Fri, 17 Nov 2017 22:52:48 +0000 (17:52 -0500)]
print errors and work filename
Alan T. DeKok [Fri, 17 Nov 2017 22:35:11 +0000 (17:35 -0500)]
ignore empty detail files
Alan T. DeKok [Fri, 17 Nov 2017 20:29:18 +0000 (15:29 -0500)]
differentiate ENOENT from other errors
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
Alan T. DeKok [Fri, 17 Nov 2017 20:09:36 +0000 (15:09 -0500)]
clean up error path
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:32:02 +0000 (18:32 +0000)]
Fix all those 32s that should be 16s
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:08:31 +0000 (18:08 +0000)]
Fix the dictionary types
Arran Cudbard-Bell [Fri, 17 Nov 2017 18:08:18 +0000 (18:08 +0000)]
Typo
Arran Cudbard-Bell [Fri, 17 Nov 2017 17:56:52 +0000 (17:56 +0000)]
The power of C11 compells you
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.
Alan T. DeKok [Fri, 17 Nov 2017 17:36:23 +0000 (12:36 -0500)]
can we be done now? Please?
Alan T. DeKok [Fri, 17 Nov 2017 17:31:52 +0000 (12:31 -0500)]
should really move this nonsense to value boxes
Alan T. DeKok [Fri, 17 Nov 2017 17:29:02 +0000 (12:29 -0500)]
set AF too
Alan T. DeKok [Fri, 17 Nov 2017 17:16:38 +0000 (12:16 -0500)]
don't include trailing 0
Alan T. DeKok [Fri, 17 Nov 2017 16:23:04 +0000 (11:23 -0500)]
check Message-Authenticator correctly
Alan T. DeKok [Fri, 17 Nov 2017 15:11:08 +0000 (10:11 -0500)]
don't crash on <internal>
Alan T. DeKok [Fri, 17 Nov 2017 15:08:13 +0000 (10:08 -0500)]
set data.type, too
Alan T. DeKok [Thu, 16 Nov 2017 18:36:33 +0000 (13:36 -0500)]
reorder
Arran Cudbard-Bell [Thu, 16 Nov 2017 22:46:05 +0000 (22:46 +0000)]
Validate requests too in radsniff
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)
Alan T. DeKok [Thu, 16 Nov 2017 17:10:20 +0000 (12:10 -0500)]
decrement workers when we exit
Alan T. DeKok [Thu, 16 Nov 2017 17:08:56 +0000 (12:08 -0500)]
call worker close, and don't just close the FD
Alan T. DeKok [Thu, 16 Nov 2017 16:38:17 +0000 (11:38 -0500)]
touch before free, not after
Alan T. DeKok [Thu, 16 Nov 2017 16:08:29 +0000 (11:08 -0500)]
typo
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.
Alan T. DeKok [Thu, 16 Nov 2017 01:53:19 +0000 (20:53 -0500)]
travis fixes
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
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
Alan T. DeKok [Wed, 15 Nov 2017 21:55:04 +0000 (16:55 -0500)]
don't do work_init() twice
Alan T. DeKok [Wed, 15 Nov 2017 21:37:45 +0000 (16:37 -0500)]
fixes for building on linux
Alan T. DeKok [Wed, 15 Nov 2017 18:31:37 +0000 (13:31 -0500)]
clean up code and remove goto
Alan T. DeKok [Wed, 15 Nov 2017 18:24:08 +0000 (13:24 -0500)]
try renaming detail* to detail.work only once
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>
Alan T. DeKok [Wed, 15 Nov 2017 18:18:12 +0000 (13:18 -0500)]
if no worker and the dir changed, start checking again
Alan T. DeKok [Wed, 15 Nov 2017 18:07:11 +0000 (13:07 -0500)]
track the number of workers via a mutex-protected counter
Alan T. DeKok [Wed, 15 Nov 2017 16:05:30 +0000 (11:05 -0500)]
delay polling until such time as /proc/PID changes permission
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.
Alan T. DeKok [Wed, 15 Nov 2017 14:40:21 +0000 (09:40 -0500)]
expose uid / gid / core dumps, etc.
Alan T. DeKok [Wed, 15 Nov 2017 14:30:49 +0000 (09:30 -0500)]
0 is also allowed
Arran Cudbard-Bell [Wed, 15 Nov 2017 09:16:02 +0000 (09:16 +0000)]
Regenerate rlm_rest configure script
Arran Cudbard-Bell [Tue, 14 Nov 2017 23:14:55 +0000 (23:14 +0000)]
Doxygen
Arran Cudbard-Bell [Tue, 14 Nov 2017 23:12:38 +0000 (23:12 +0000)]
Fix stupid non-issue flagged by GCC
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
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:52:20 +0000 (22:52 +0000)]
don't dup the closing brace in xlat_tokenize_expansion
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:51:24 +0000 (22:51 +0000)]
More xlat inline tests
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:51:13 +0000 (22:51 +0000)]
Shuffle debug statements around between functions in xlat_eval.c
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:48:00 +0000 (22:48 +0000)]
Fix all asprintf calls so they set the correct type
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:45:40 +0000 (22:45 +0000)]
Docs
Arran Cudbard-Bell [Tue, 14 Nov 2017 22:45:29 +0000 (22:45 +0000)]
Set the correct type forregex subcaptures
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
Arran Cudbard-Bell [Tue, 14 Nov 2017 21:58:54 +0000 (21:58 +0000)]
Use typed_asprintf in sql_xlat
Alan T. DeKok [Tue, 14 Nov 2017 20:18:42 +0000 (15:18 -0500)]
just assign DHCP-Your-IP-Address natively
Alan T. DeKok [Tue, 14 Nov 2017 20:16:43 +0000 (15:16 -0500)]
make IP address assignment generic
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
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
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.
Arran Cudbard-Bell [Mon, 13 Nov 2017 23:00:20 +0000 (23:00 +0000)]
Add accessor for stack depth
Alan T. DeKok [Tue, 14 Nov 2017 17:31:05 +0000 (12:31 -0500)]
more debug messages
Arran Cudbard-Bell [Mon, 13 Nov 2017 22:57:48 +0000 (22:57 +0000)]
xlat_tokenize generally won't have the request available
Arran Cudbard-Bell [Mon, 13 Nov 2017 21:31:41 +0000 (21:31 +0000)]
Deal with NULL attribute value
Arran Cudbard-Bell [Mon, 13 Nov 2017 21:01:06 +0000 (21:01 +0000)]
Doxygen
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:48:33 +0000 (20:48 +0000)]
Move public interface functions below callbacks
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:47:49 +0000 (20:47 +0000)]
New return codes for xlat functions
Arran Cudbard-Bell [Mon, 13 Nov 2017 20:46:27 +0000 (20:46 +0000)]
Missed in previous commit...
Arran Cudbard-Bell [Mon, 13 Nov 2017 19:39:27 +0000 (19:39 +0000)]
Additional utility functions
Arran Cudbard-Bell [Mon, 13 Nov 2017 12:17:29 +0000 (12:17 +0000)]
Return unit timestamp as a 64bit integer
Arran Cudbard-Bell [Sat, 11 Nov 2017 16:29:54 +0000 (16:29 +0000)]
Document more interpreter things
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
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
Arran Cudbard-Bell [Sat, 11 Nov 2017 13:38:00 +0000 (13:38 +0000)]
Reduce spurious debugging output
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.
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
Matthew Newton [Fri, 10 Nov 2017 20:57:45 +0000 (20:57 +0000)]
enable reproducible builds for debian packages
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.
Alan T. DeKok [Fri, 10 Nov 2017 21:02:39 +0000 (16:02 -0500)]
allocation may fail. CID #
1420942
Alan T. DeKok [Fri, 10 Nov 2017 21:01:59 +0000 (16:01 -0500)]
note fall-through. CID #
1420941
Alan T. DeKok [Fri, 10 Nov 2017 21:01:19 +0000 (16:01 -0500)]
allocation may fail. CID #
1420940
Alan T. DeKok [Fri, 10 Nov 2017 21:00:37 +0000 (16:00 -0500)]
allocation may fail. CID #
1420939
Alan T. DeKok [Fri, 10 Nov 2017 21:00:00 +0000 (16:00 -0500)]
allocation may fail. CID #
1420938
Alan T. DeKok [Fri, 10 Nov 2017 20:59:20 +0000 (15:59 -0500)]
remove unnecessary check. CID #
1420937
Alan T. DeKok [Fri, 10 Nov 2017 20:58:35 +0000 (15:58 -0500)]
add missing break. CID #
1420936
Alan T. DeKok [Fri, 10 Nov 2017 20:57:45 +0000 (15:57 -0500)]
allocation can fail. CID #
1420935
Alan T. DeKok [Fri, 10 Nov 2017 20:56:47 +0000 (15:56 -0500)]
memmove() for overlapping data. CID #
1420934
Alan T. DeKok [Fri, 10 Nov 2017 20:55:22 +0000 (15:55 -0500)]
dereference after NULL. CID #142093
Alan T. DeKok [Fri, 10 Nov 2017 20:16:32 +0000 (15:16 -0500)]
document and limit maximum_outstanding
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
Alan T. DeKok [Fri, 10 Nov 2017 20:05:42 +0000 (15:05 -0500)]
add maximum_outstanding limit
for doing many packets in parallel