]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
James Jones [Tue, 31 Jan 2023 15:03:30 +0000 (09:03 -0600)]
Start using modeling for Coverity (#4853)
This involves
* making the coverity workflow build the model
* adding model source file(s)
Nick Porter [Mon, 30 Jan 2023 14:50:24 +0000 (14:50 +0000)]
Use found terminal character to determine how many URI parts to advance
not the character found after skipping `extra_skip`
Nick Porter [Mon, 30 Jan 2023 13:52:15 +0000 (13:52 +0000)]
Correct module config for rest module test
Nick Porter [Mon, 30 Jan 2023 13:51:53 +0000 (13:51 +0000)]
Replace != with !( == ) in rest module tests
Alan T. DeKok [Mon, 30 Jan 2023 21:06:57 +0000 (16:06 -0500)]
cleanups and fixes
Alan T. DeKok [Mon, 30 Jan 2023 20:27:34 +0000 (15:27 -0500)]
re-initialize the iterator for every module we delete
because deleting one module may cause it to delete child modules
in the tree, which confuses the iterator and makes it sad.
Alan T. DeKok [Mon, 30 Jan 2023 19:51:09 +0000 (14:51 -0500)]
skip the '/'
Alan T. DeKok [Mon, 30 Jan 2023 16:34:30 +0000 (11:34 -0500)]
automatically set DEBUGGER_ATTACHED when executing gdb or lldb
because the debugger detection on some OS's is broken and doesn't
work.
Alan T. DeKok [Mon, 30 Jan 2023 16:18:28 +0000 (11:18 -0500)]
typo
Alan T. DeKok [Mon, 30 Jan 2023 12:51:44 +0000 (07:51 -0500)]
more checking for corner cases
Alan T. DeKok [Mon, 30 Jan 2023 00:27:49 +0000 (19:27 -0500)]
it helps to set the value for State
Alan T. DeKok [Sun, 29 Jan 2023 22:07:57 +0000 (17:07 -0500)]
use VALID macro
Alan T. DeKok [Sat, 28 Jan 2023 01:45:11 +0000 (20:45 -0500)]
rename TACACS+ packet types
for increased clarity, now that we're actually using it.
and do a number of other cleanups. Fix the state machine to match
the new packet types. Fix the state machine to track state based
on synthesized information. Add authentication logging ala RADIUS
Alan T. DeKok [Fri, 27 Jan 2023 19:11:36 +0000 (14:11 -0500)]
fix up macros to be sure there's no possibility of error
Nick Porter [Fri, 27 Jan 2023 16:10:20 +0000 (16:10 +0000)]
Resequence to avoid potential double free. Fixes #4863
Nick Porter [Fri, 27 Jan 2023 15:49:12 +0000 (15:49 +0000)]
Ensure LDAPMessage is freed on errors. Fixes #4864
Alan T. DeKok [Fri, 27 Jan 2023 00:17:46 +0000 (19:17 -0500)]
there should have been no reply yet
Alan T. DeKok [Thu, 26 Jan 2023 23:50:52 +0000 (18:50 -0500)]
force reject if there's no auth-type
and don't set default accept if "recv Access-Request" returns "ok"
Alan T. DeKok [Thu, 26 Jan 2023 20:48:57 +0000 (15:48 -0500)]
typo and cleanups
Alan T. DeKok [Thu, 26 Jan 2023 18:20:23 +0000 (13:20 -0500)]
not needed
Alan T. DeKok [Thu, 26 Jan 2023 15:16:57 +0000 (10:16 -0500)]
update docs
James Jones [Thu, 26 Jan 2023 15:04:57 +0000 (09:04 -0600)]
Remove dead code (CID #
1519001 ) (#4854)
_event_build_indexes() always returns 0, so fr_atexit_global_once_ret()
will always set ret to zero, and hence ret won't be negative.
Terry Burton [Thu, 26 Jan 2023 14:05:46 +0000 (14:05 +0000)]
pap: Hoist &control:User-Password check so that it can be found (#4866)
Since loop is rooted at &Password.
Alan T. DeKok [Thu, 26 Jan 2023 13:59:23 +0000 (08:59 -0500)]
fix unlock and return code. Fixes #4862
Don't override an error return code with a successful one.
Instead, set the success code first, and then override it if
there's an error.
Now that that's cleaned up, always unlock the mutex
Alan T. DeKok [Wed, 25 Jan 2023 01:33:27 +0000 (20:33 -0500)]
use FR_TACACS_PACKET_CODE_VALID
Nick Porter [Wed, 25 Jan 2023 19:19:44 +0000 (19:19 +0000)]
Only leaf vps have the data object
Nick Porter [Wed, 18 Jan 2023 10:53:17 +0000 (10:53 +0000)]
Add unit tests launcher to launch.json
Arran Cudbard-Bell [Thu, 26 Jan 2023 06:42:07 +0000 (01:42 -0500)]
Don't set the path in the spec file
James Jones [Wed, 25 Jan 2023 01:06:03 +0000 (19:06 -0600)]
Placate coverity about day-to-second calculation (CID #
1520503 , #
1520502 ) (#4859)
Coverity doesn't realize that day of week or month is constrained
such that multiplying by seconds per day won't overflow int32_t.
Alan T. DeKok [Tue, 24 Jan 2023 19:27:42 +0000 (14:27 -0500)]
install libtalloc && libpcap, too
Stephen Blackwell [Tue, 24 Jan 2023 19:15:48 +0000 (13:15 -0600)]
Clean up versioning for libtalloc and libkqueue, add rule to install libpcap (#4858)
Signed-off-by: Stephen Blackwell <sblackwell@networkradius.com>
Signed-off-by: Stephen Blackwell <sblackwell@networkradius.com>
Alan T. DeKok [Tue, 24 Jan 2023 17:27:40 +0000 (12:27 -0500)]
change assert to run-time warning
until we track down why it occurs in CI but not locally
Alan T. DeKok [Tue, 24 Jan 2023 17:16:49 +0000 (12:16 -0500)]
script to build (hopefully) prerequisites on RH
Alan T. DeKok [Tue, 24 Jan 2023 17:03:04 +0000 (12:03 -0500)]
wrapper scripts to run local binaries
Alan T. DeKok [Tue, 24 Jan 2023 16:41:17 +0000 (11:41 -0500)]
tell people about "xcrun foo" on OSX
Alan T. DeKok [Tue, 24 Jan 2023 14:49:56 +0000 (09:49 -0500)]
assert that we don't leak memory on each packet
Alan T. DeKok [Tue, 24 Jan 2023 12:12:37 +0000 (07:12 -0500)]
change name from SARL to SAS
Alan T. DeKok [Tue, 24 Jan 2023 12:08:16 +0000 (07:08 -0500)]
whitespace
Alan T. DeKok [Tue, 24 Jan 2023 01:43:23 +0000 (20:43 -0500)]
it's a day for typos
Alan T. DeKok [Tue, 24 Jan 2023 01:21:58 +0000 (20:21 -0500)]
clean up and regularize names
perl -p -i -e 's/fr_vmps_codes/fr_vmps_packet_names/g' $(git grep -l fr_vmps_codes)
Alan T. DeKok [Tue, 24 Jan 2023 01:16:42 +0000 (20:16 -0500)]
clean up and regularize names
perl -p -i -e 's/fr_dns_packet_codes/fr_dns_packet_names/g' $(git grep -l fr_dns_packet_codes)
Alan T. DeKok [Tue, 24 Jan 2023 01:14:47 +0000 (20:14 -0500)]
Clean up and regularize names
perl -p -i -e 's/fr_dhcpv6_packet_types/fr_dhcpv6_packet_names/g' $(git grep -l fr_dhcpv6_packet_types)
Alan T. DeKok [Tue, 24 Jan 2023 01:12:08 +0000 (20:12 -0500)]
clean up and standardize names
perl -p -i -e 's/fr_request_types/fr_radius_request_name_table/g' $(git grep -l fr_request_types)
Alan T. DeKok [Tue, 24 Jan 2023 01:07:37 +0000 (20:07 -0500)]
clean up and dedup FR_RADIUS_PACKET_CODE_VALID
perl -p -i -e 's/is_radius_code/FR_RADIUS_PACKET_CODE_VALID/g' $(find . -name "*.[ch]" -print)
Alan T. DeKok [Tue, 24 Jan 2023 01:05:09 +0000 (20:05 -0500)]
clean up RADIUS names
perl -p -i -e 's/fr_packet_codes/fr_radius_packet_names/g' $(find . -name "*.[ch]" -print)
Alan T. DeKok [Tue, 24 Jan 2023 01:04:07 +0000 (20:04 -0500)]
clean up names
perl -p -i -e 's/fr_tacacs_packet_codes/fr_tacacs_packet_names/g' $(find . -name "*.[ch]" -print)
Alan T. DeKok [Tue, 24 Jan 2023 00:58:19 +0000 (19:58 -0500)]
clean up definition of FR_TACACS_CODE_MAX. Fixes #4856
The CODE_MAX definition should be one more than the last valid
packet code.
The DO_NOT_RESPOND value should be a value which will never show
up in a real packet.
The PACKET_CODE_VALID macro should be used instead of relying on
manual checks of CODE_MAX
Alan T. DeKok [Mon, 23 Jan 2023 22:18:11 +0000 (17:18 -0500)]
typo
Alan T. DeKok [Mon, 23 Jan 2023 22:10:04 +0000 (17:10 -0500)]
typo to rearrange code
Alan T. DeKok [Mon, 23 Jan 2023 21:30:31 +0000 (16:30 -0500)]
don't call frame_pop() if we have REQUEST_STOP_PROCESSING
Alan T. DeKok [Mon, 23 Jan 2023 20:25:25 +0000 (15:25 -0500)]
clean up descriptions and names
so that the names and functions are descriptive and correct.
Alan T. DeKok [Mon, 23 Jan 2023 19:35:07 +0000 (14:35 -0500)]
use CLOCK_MONOTONIC_RAW if it exists
otherwise use CLOCK_MONOTONIC. The RAW version is unaffected
by frequency or time adjustments
Alan T. DeKok [Mon, 23 Jan 2023 19:31:41 +0000 (14:31 -0500)]
remove mach functions.
OSX now (and for a long time) has had clock_gettime(). The old
code using the mach functions didn't even compile when we tried
to not use clock_gettime(). So... nuke the old / broken / unused
code.
Alan T. DeKok [Mon, 23 Jan 2023 21:34:24 +0000 (16:34 -0500)]
clarifications and typo fixes
Alan T. DeKok [Sun, 22 Jan 2023 13:51:30 +0000 (08:51 -0500)]
add functions to get gmt offset and daylight savings flag
we should note that the server tracks times in UTC, so
(date) foo % (time_delta) 1d
will return the offset from the UTC day, not from the local time.
This could perhaps be more prominent. But tracking times internally
in UTC is the only way to make sure we're not screwed up by time
zone and DST changes.
Alan T. DeKok [Sun, 22 Jan 2023 12:56:50 +0000 (07:56 -0500)]
update for expressions terminating before EOL
the admin must manually add backslashes for continuation
Alan T. DeKok [Sun, 22 Jan 2023 11:33:06 +0000 (06:33 -0500)]
add week / month / year time resolution
which are vaguely correct for months, and correct to the second
for years. The main purpose here is to allow for at least rough
parsing of years / months
James Jones [Sun, 22 Jan 2023 15:52:11 +0000 (09:52 -0600)]
Get rid of double unlock in fr_atexit_global_once_ret() (CID #
1518999 ) (#4855)
Alan T. DeKok [Sat, 21 Jan 2023 21:48:40 +0000 (16:48 -0500)]
add Tmp-Time-Delta-*
we really need local variables :(
Alan T. DeKok [Sat, 21 Jan 2023 21:46:54 +0000 (16:46 -0500)]
date % time_delta --> time_delta
so we can round dates up / down as appropriate.
Note that this really only works for fixed periods of time_delta,
such as seconds / minutes / hours / days. It doesn't work for
months.
Alan T. DeKok [Sat, 21 Jan 2023 21:23:43 +0000 (16:23 -0500)]
add magic flag for expressions
so that they always get parsed via xlat_tokenize_expression().
Because if we pass an expression to tmpl_afrom_substr(), it will
happily return a tmpl for the entire string, which is a series of
string concatenations. And that's not what we want.
Alan T. DeKok [Sat, 21 Jan 2023 21:02:04 +0000 (16:02 -0500)]
print out what we're assigning before we assign it
Alan T. DeKok [Sat, 21 Jan 2023 20:36:32 +0000 (15:36 -0500)]
add map_afrom*_edit() for edit sections
because the RHS of edit sections can now be expressions.
Alan T. DeKok [Sat, 21 Jan 2023 20:36:08 +0000 (15:36 -0500)]
API to get log destination by name
Alan T. DeKok [Sat, 21 Jan 2023 15:24:23 +0000 (10:24 -0500)]
if we can't parse a token, it must be an expression
Alan T. DeKok [Fri, 20 Jan 2023 17:59:08 +0000 (12:59 -0500)]
first pass at multiple log destinations
for now, only files. And there's no way to change log destinations.
but it's at least a start
Alan T. DeKok [Fri, 20 Jan 2023 15:28:37 +0000 (10:28 -0500)]
use more consistent names
Alan T. DeKok [Fri, 20 Jan 2023 14:51:20 +0000 (09:51 -0500)]
partial parse is only if at eol, and depth==0, and terminal character
Alan T. DeKok [Fri, 20 Jan 2023 14:35:50 +0000 (09:35 -0500)]
set an error string
Alan T. DeKok [Fri, 20 Jan 2023 14:35:29 +0000 (09:35 -0500)]
add tmpl_set_xlat()
for use with edit expressions
Alan T. DeKok [Fri, 20 Jan 2023 13:14:11 +0000 (08:14 -0500)]
only sections can have ident2 name trees
i.e. CONF_PAIR and CONF_DATA don't have children which use
ident2.
Or currently even ident1 for that matter, but it's theoretically
possible and useful.
Alan T. DeKok [Fri, 20 Jan 2023 13:04:19 +0000 (08:04 -0500)]
print out sizes of configuration things, too
Alan T. DeKok [Fri, 20 Jan 2023 13:04:09 +0000 (08:04 -0500)]
rearrange to decrease size
Alan T. DeKok [Thu, 19 Jan 2023 23:49:01 +0000 (18:49 -0500)]
more typo
Alan T. DeKok [Thu, 19 Jan 2023 23:06:03 +0000 (18:06 -0500)]
typo
Alan T. DeKok [Thu, 19 Jan 2023 22:21:25 +0000 (17:21 -0500)]
set global search path, so that the fuzzer can find things
Alan T. DeKok [Thu, 19 Jan 2023 20:20:03 +0000 (15:20 -0500)]
typo
Alan T. DeKok [Thu, 19 Jan 2023 20:11:47 +0000 (15:11 -0500)]
treat time_delta as floating point for multiplication
Alan T. DeKok [Thu, 19 Jan 2023 20:02:47 +0000 (15:02 -0500)]
if there's no precision, time_deltas are evaluated in seconds
Alan T. DeKok [Thu, 19 Jan 2023 20:01:30 +0000 (15:01 -0500)]
remove extraneous "break"
Alan T. DeKok [Thu, 19 Jan 2023 17:50:56 +0000 (12:50 -0500)]
add and document %(time:now)
which returns a _boxed_ time, and not a stupid integer.
Alan T. DeKok [Thu, 19 Jan 2023 17:29:00 +0000 (12:29 -0500)]
casting date to time_delta does NOT change the value
it only changes the precision, and that's only used for
printing / parsing. Internally, all different-precision dates
and time_deltas are stored as 64-bit integers in nanoseconds
and the same goes for date --> time_delta
Alan T. DeKok [Thu, 19 Jan 2023 17:28:26 +0000 (12:28 -0500)]
special-case (date - date) --> time_delta
Alan T. DeKok [Thu, 19 Jan 2023 15:54:08 +0000 (10:54 -0500)]
note crappy code && todo's
Alan T. DeKok [Thu, 19 Jan 2023 14:40:38 +0000 (09:40 -0500)]
use normal APIs to print the reply packet
and make sure that the contents all go to the same FILE* handle
Alan T. DeKok [Thu, 19 Jan 2023 14:39:48 +0000 (09:39 -0500)]
add fr_log_init_fp()
for pre-existing FILE* handles
Alan T. DeKok [Thu, 19 Jan 2023 14:37:51 +0000 (09:37 -0500)]
typo
Alan T. DeKok [Thu, 19 Jan 2023 13:59:51 +0000 (08:59 -0500)]
we use SRC_CFLAGS, not TGT_CFLAGS
Alan T. DeKok [Thu, 19 Jan 2023 13:48:58 +0000 (08:48 -0500)]
the documentation lies.
The build output shows
CFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
So let's try that.
Alan T. DeKok [Thu, 19 Jan 2023 13:15:03 +0000 (08:15 -0500)]
regenerate as per previous patch
Margaret Cullen [Thu, 19 Jan 2023 13:14:29 +0000 (08:14 -0500)]
Fixed misplaced bash syntax when adding the debug flag to CFLAGS in developer mode (#4852)
Alan T. DeKok [Wed, 18 Jan 2023 20:39:06 +0000 (15:39 -0500)]
MAX code is invalid
Alan T. DeKok [Wed, 18 Jan 2023 20:36:31 +0000 (15:36 -0500)]
check that the sequence numbers match
as a "duct tape" kind of security.
Alan T. DeKok [Wed, 18 Jan 2023 20:35:54 +0000 (15:35 -0500)]
check that clients send odd sequence numbers
Alan T. DeKok [Wed, 18 Jan 2023 20:27:42 +0000 (15:27 -0500)]
use random session ID for connections
Alan T. DeKok [Wed, 18 Jan 2023 20:26:53 +0000 (15:26 -0500)]
minor cleanups
Alan T. DeKok [Wed, 18 Jan 2023 19:55:50 +0000 (14:55 -0500)]
include the header in the packet length
Alan T. DeKok [Wed, 18 Jan 2023 19:55:38 +0000 (14:55 -0500)]
print decode error, too
Alan T. DeKok [Wed, 18 Jan 2023 19:39:16 +0000 (14:39 -0500)]
the EOF callback may free and close the socket
so check for is_registered before calling ef->error(), as the
event_callback() in the EOF handler may have closed and freed
the socket.
Alan T. DeKok [Wed, 18 Jan 2023 19:12:25 +0000 (14:12 -0500)]
don't smash CFLAGS when doing --with-developer