]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
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
Alan T. DeKok [Wed, 18 Jan 2023 19:10:42 +0000 (14:10 -0500)]
pull OSS-FUZZ patches in.
And rework them to follow our normal processes
Alan T. DeKok [Wed, 18 Jan 2023 01:00:36 +0000 (20:00 -0500)]
use *p_result for "current interpreter result"
request->rcode should really be a cached version, and should
maybe not even exist at all.
Alan T. DeKok [Tue, 17 Jan 2023 21:58:13 +0000 (16:58 -0500)]
typo
Alan T. DeKok [Tue, 17 Jan 2023 21:28:07 +0000 (16:28 -0500)]
sample tacacs client and configuration
Alan T. DeKok [Tue, 17 Jan 2023 21:27:47 +0000 (16:27 -0500)]
TACACS+ client connections always start at 1, and increment by 2
Alan T. DeKok [Tue, 17 Jan 2023 20:49:30 +0000 (15:49 -0500)]
track outstanding status, not u->packet
because once we write the packet, we throw away all of the encoded
data.
Alan T. DeKok [Tue, 17 Jan 2023 20:29:20 +0000 (15:29 -0500)]
track packets in the written buffer a bit better
Alan T. DeKok [Tue, 17 Jan 2023 20:11:10 +0000 (15:11 -0500)]
various minor fixes
Alan T. DeKok [Tue, 17 Jan 2023 20:10:46 +0000 (15:10 -0500)]
initialize h->send after setting send_buff_actual
Alan T. DeKok [Tue, 17 Jan 2023 20:09:15 +0000 (15:09 -0500)]
fix typos
Alan T. DeKok [Tue, 17 Jan 2023 20:08:40 +0000 (15:08 -0500)]
comment out until we double-check it
Alan T. DeKok [Tue, 17 Jan 2023 20:08:05 +0000 (15:08 -0500)]
typo
Alan T. DeKok [Tue, 17 Jan 2023 19:22:19 +0000 (14:22 -0500)]
allow it to run for tacclient
Alan T. DeKok [Tue, 17 Jan 2023 19:20:33 +0000 (14:20 -0500)]
typo
Alan T. DeKok [Tue, 17 Jan 2023 19:01:55 +0000 (14:01 -0500)]
allow for empty or non-existent secrets
Alan T. DeKok [Tue, 17 Jan 2023 19:01:25 +0000 (14:01 -0500)]
it helps to parse the io_submodule
Alan T. DeKok [Tue, 17 Jan 2023 18:52:56 +0000 (13:52 -0500)]
Packet-Type does not map to codes in the packet
it's a synthetic type created during the packet decoding
Alan T. DeKok [Tue, 17 Jan 2023 15:28:50 +0000 (10:28 -0500)]
first pass of fixing statistics
They still don't work, but at least there's a path forward
Nick Porter [Mon, 16 Jan 2023 18:40:38 +0000 (18:40 +0000)]
Debian sid and Ubuntu >= 22.04 use OpenSSL v3
Nick Porter [Mon, 16 Jan 2023 18:03:36 +0000 (18:03 +0000)]
Work round for eapol_test not compiling on debian sid
Nick Porter [Mon, 16 Jan 2023 18:03:04 +0000 (18:03 +0000)]
Bump hostap to latest released version
Alan T. DeKok [Mon, 16 Jan 2023 15:37:37 +0000 (10:37 -0500)]
remove unused assignment
Alan T. DeKok [Mon, 16 Jan 2023 14:20:08 +0000 (09:20 -0500)]
it would help if the local compiler was as picky as CI
Alan T. DeKok [Mon, 16 Jan 2023 13:55:08 +0000 (08:55 -0500)]
more NDEBUG
Alan T. DeKok [Mon, 16 Jan 2023 13:34:26 +0000 (08:34 -0500)]
remove unused variable
Alan T. DeKok [Mon, 16 Jan 2023 13:26:52 +0000 (08:26 -0500)]
clean up "todos"
Alan T. DeKok [Mon, 16 Jan 2023 13:26:34 +0000 (08:26 -0500)]
allow for and initialize retries
Alan T. DeKok [Mon, 16 Jan 2023 13:13:31 +0000 (08:13 -0500)]
do retries
we don't actually resend the packets for TCP, but a retransmit
timer allows the packets to fail over from one connection to another
Alan T. DeKok [Mon, 16 Jan 2023 13:12:25 +0000 (08:12 -0500)]
reset can also reset the timer
Alan T. DeKok [Mon, 16 Jan 2023 13:05:54 +0000 (08:05 -0500)]
ctype macros should take explicitly unsigned input
to avoid chars with high bits being converted to negative numbers
perl -p -i -e 's/(tolower|toupper|isupper|islower|isdigit|isalpha|isspace|isxdigit)\(\s*\*/${1}((uint8_t) */g' $(find . -name "*.[ch]" -print)
perl -p -i -e 's/(tolower|toupper|isupper|islower|isdigit|isalpha|isspace|isxdigit)\(\(int\)/${1}((uint8_t)/g' $(find . -name "*.[ch]" -print)
Alan T. DeKok [Fri, 13 Jan 2023 21:56:48 +0000 (16:56 -0500)]
add TCP output which is compile-tested.
The basic logic should be mostly correct. The timers haven't
been double-checked, so they're likely off. But it's a good start
Nick Porter [Mon, 16 Jan 2023 12:28:03 +0000 (12:28 +0000)]
Explicitly ignore return code (CID #
1519000 )
Nick Porter [Mon, 16 Jan 2023 12:06:47 +0000 (12:06 +0000)]
Remove useless code (CID #
1519003 )
Nick Porter [Mon, 16 Jan 2023 11:49:36 +0000 (11:49 +0000)]
Use MEM() to add safety check (CID #
1519004 )
Nick Porter [Mon, 16 Jan 2023 10:37:17 +0000 (10:37 +0000)]
Use print_hex() to dump hex data
Nick Porter [Fri, 13 Jan 2023 18:05:38 +0000 (18:05 +0000)]
Use accessor function for PyFrameObject members on python >= 3.10
Arran Cudbard-Bell [Fri, 13 Jan 2023 23:23:39 +0000 (17:23 -0600)]
Fix comment
Jorge Pereira [Wed, 11 Jan 2023 22:37:24 +0000 (19:37 -0300)]
Add function for set global library directory
Alan T. DeKok [Fri, 13 Jan 2023 21:36:59 +0000 (16:36 -0500)]
grumble
Alan T. DeKok [Fri, 13 Jan 2023 20:37:39 +0000 (15:37 -0500)]
remove unused variable
Alan T. DeKok [Fri, 13 Jan 2023 18:37:32 +0000 (13:37 -0500)]
add and use fr_tacacs_packet_log_hex()
Which makes my head hurt, because the TACACS+ packet format
was created by drunken orangutans throwing darts at a pumpkin.
The resulting Jackson Pollock eyesore was the published as
a work of utter genius.
Alan T. DeKok [Fri, 13 Jan 2023 17:20:11 +0000 (12:20 -0500)]
Revert "fix decode_args() function"
This reverts commit
0aa0f42d90b15366ab79ac364d55b45cffae7a60 .
Alan T. DeKok [Fri, 13 Jan 2023 03:38:07 +0000 (22:38 -0500)]
run busy loop over 1msec. Fixes #4846 in a clearer manner.
Pleas enter the commit message for your changes. Lines starting
Alan T. DeKok [Sat, 7 Jan 2023 16:30:39 +0000 (11:30 -0500)]
first draft of "front end" for TACACS+ client
Alan T. DeKok [Sat, 7 Jan 2023 13:58:35 +0000 (08:58 -0500)]
move commonly used functions to the trunk code
There's no need to reproduce these in multiple client IO modules.
Alan T. DeKok [Fri, 6 Jan 2023 22:10:08 +0000 (17:10 -0500)]
fix decode_args() function
the arg_list does *not* start at the body of the packet. Instead,
it starts after the fixed arguments have been decoded.
Alan T. DeKok [Fri, 6 Jan 2023 21:55:46 +0000 (16:55 -0500)]
no need to update the output ptr
Alan T. DeKok [Fri, 6 Jan 2023 16:25:27 +0000 (11:25 -0500)]
print packet name, too
so that the _msg argument to the macro is used
Alan T. DeKok [Fri, 6 Jan 2023 15:13:03 +0000 (10:13 -0500)]
allow parsing expressions on the RHS of edit instructions
the compiler doesn't do anything with them yet, but the parsing
seems to work.
Alan T. DeKok [Tue, 3 Jan 2023 15:29:12 +0000 (10:29 -0500)]
we don't support "filter" any more
Alan T. DeKok [Tue, 3 Jan 2023 15:29:01 +0000 (10:29 -0500)]
remove extraneous brackets
Alan T. DeKok [Tue, 3 Jan 2023 15:07:54 +0000 (10:07 -0500)]
make the skip condition code a bit more generic