]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agodate % time_delta --> time_delta
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.

2 years agoadd magic flag for expressions
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.

2 years agoprint out what we're assigning before we assign it
Alan T. DeKok [Sat, 21 Jan 2023 21:02:04 +0000 (16:02 -0500)] 
print out what we're assigning before we assign it

2 years agoadd map_afrom*_edit() for edit sections
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.

2 years agoAPI to get log destination by name
Alan T. DeKok [Sat, 21 Jan 2023 20:36:08 +0000 (15:36 -0500)] 
API to get log destination by name

2 years agoif we can't parse a token, it must be an expression
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

2 years agofirst pass at multiple log destinations
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

2 years agouse more consistent names
Alan T. DeKok [Fri, 20 Jan 2023 15:28:37 +0000 (10:28 -0500)] 
use more consistent names

2 years agopartial parse is only if at eol, and depth==0, and terminal character
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

2 years agoset an error string
Alan T. DeKok [Fri, 20 Jan 2023 14:35:50 +0000 (09:35 -0500)] 
set an error string

2 years agoadd tmpl_set_xlat()
Alan T. DeKok [Fri, 20 Jan 2023 14:35:29 +0000 (09:35 -0500)] 
add tmpl_set_xlat()

for use with edit expressions

2 years agoonly sections can have ident2 name trees
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.

2 years agoprint out sizes of configuration things, too
Alan T. DeKok [Fri, 20 Jan 2023 13:04:19 +0000 (08:04 -0500)] 
print out sizes of configuration things, too

2 years agorearrange to decrease size
Alan T. DeKok [Fri, 20 Jan 2023 13:04:09 +0000 (08:04 -0500)] 
rearrange to decrease size

2 years agomore typo
Alan T. DeKok [Thu, 19 Jan 2023 23:49:01 +0000 (18:49 -0500)] 
more typo

2 years agotypo
Alan T. DeKok [Thu, 19 Jan 2023 23:06:03 +0000 (18:06 -0500)] 
typo

2 years agoset global search path, so that the fuzzer can find things
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

2 years agotypo
Alan T. DeKok [Thu, 19 Jan 2023 20:20:03 +0000 (15:20 -0500)] 
typo

2 years agotreat time_delta as floating point for multiplication
Alan T. DeKok [Thu, 19 Jan 2023 20:11:47 +0000 (15:11 -0500)] 
treat time_delta as floating point for multiplication

2 years agoif there's no precision, time_deltas are evaluated in seconds
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

2 years agoremove extraneous "break"
Alan T. DeKok [Thu, 19 Jan 2023 20:01:30 +0000 (15:01 -0500)] 
remove extraneous "break"

2 years agoadd and document %(time:now)
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.

2 years agocasting date to time_delta does NOT change the value
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

2 years agospecial-case (date - date) --> time_delta
Alan T. DeKok [Thu, 19 Jan 2023 17:28:26 +0000 (12:28 -0500)] 
special-case  (date - date) --> time_delta

2 years agonote crappy code && todo's
Alan T. DeKok [Thu, 19 Jan 2023 15:54:08 +0000 (10:54 -0500)] 
note crappy code && todo's

2 years agouse normal APIs to print the reply packet
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

2 years agoadd fr_log_init_fp()
Alan T. DeKok [Thu, 19 Jan 2023 14:39:48 +0000 (09:39 -0500)] 
add fr_log_init_fp()

for pre-existing FILE* handles

2 years agotypo
Alan T. DeKok [Thu, 19 Jan 2023 14:37:51 +0000 (09:37 -0500)] 
typo

2 years agowe use SRC_CFLAGS, not TGT_CFLAGS
Alan T. DeKok [Thu, 19 Jan 2023 13:59:51 +0000 (08:59 -0500)] 
we use SRC_CFLAGS, not TGT_CFLAGS

2 years agothe documentation lies.
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.

2 years agoregenerate as per previous patch
Alan T. DeKok [Thu, 19 Jan 2023 13:15:03 +0000 (08:15 -0500)] 
regenerate as per previous patch

2 years agoFixed misplaced bash syntax when adding the debug flag to CFLAGS in developer mode...
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)

2 years agoMAX code is invalid
Alan T. DeKok [Wed, 18 Jan 2023 20:39:06 +0000 (15:39 -0500)] 
MAX code is invalid

2 years agocheck that the sequence numbers match
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.

2 years agocheck that clients send odd sequence numbers
Alan T. DeKok [Wed, 18 Jan 2023 20:35:54 +0000 (15:35 -0500)] 
check that clients send odd sequence numbers

2 years agouse random session ID for connections
Alan T. DeKok [Wed, 18 Jan 2023 20:27:42 +0000 (15:27 -0500)] 
use random session ID for connections

2 years agominor cleanups
Alan T. DeKok [Wed, 18 Jan 2023 20:26:53 +0000 (15:26 -0500)] 
minor cleanups

2 years agoinclude the header in the packet length
Alan T. DeKok [Wed, 18 Jan 2023 19:55:50 +0000 (14:55 -0500)] 
include the header in the packet length

2 years agoprint decode error, too
Alan T. DeKok [Wed, 18 Jan 2023 19:55:38 +0000 (14:55 -0500)] 
print decode error, too

2 years agothe EOF callback may free and close the socket
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.

2 years agodon't smash CFLAGS when doing --with-developer
Alan T. DeKok [Wed, 18 Jan 2023 19:12:25 +0000 (14:12 -0500)] 
don't smash CFLAGS when doing --with-developer

2 years agopull OSS-FUZZ patches in.
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

2 years agouse *p_result for "current interpreter result"
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.

2 years agotypo
Alan T. DeKok [Tue, 17 Jan 2023 21:58:13 +0000 (16:58 -0500)] 
typo

2 years agosample tacacs client and configuration
Alan T. DeKok [Tue, 17 Jan 2023 21:28:07 +0000 (16:28 -0500)] 
sample tacacs client and configuration

2 years agoTACACS+ client connections always start at 1, and increment by 2
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

2 years agotrack outstanding status, not u->packet
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.

2 years agotrack packets in the written buffer a bit better
Alan T. DeKok [Tue, 17 Jan 2023 20:29:20 +0000 (15:29 -0500)] 
track packets in the written buffer a bit better

2 years agovarious minor fixes
Alan T. DeKok [Tue, 17 Jan 2023 20:11:10 +0000 (15:11 -0500)] 
various minor fixes

2 years agoinitialize h->send after setting send_buff_actual
Alan T. DeKok [Tue, 17 Jan 2023 20:10:46 +0000 (15:10 -0500)] 
initialize h->send after setting send_buff_actual

2 years agofix typos
Alan T. DeKok [Tue, 17 Jan 2023 20:09:15 +0000 (15:09 -0500)] 
fix typos

2 years agocomment out until we double-check it
Alan T. DeKok [Tue, 17 Jan 2023 20:08:40 +0000 (15:08 -0500)] 
comment out until we double-check it

2 years agotypo
Alan T. DeKok [Tue, 17 Jan 2023 20:08:05 +0000 (15:08 -0500)] 
typo

2 years agoallow it to run for tacclient
Alan T. DeKok [Tue, 17 Jan 2023 19:22:19 +0000 (14:22 -0500)] 
allow it to run for tacclient

2 years agotypo
Alan T. DeKok [Tue, 17 Jan 2023 19:20:33 +0000 (14:20 -0500)] 
typo

2 years agoallow for empty or non-existent secrets
Alan T. DeKok [Tue, 17 Jan 2023 19:01:55 +0000 (14:01 -0500)] 
allow for empty or non-existent secrets

2 years agoit helps to parse the io_submodule
Alan T. DeKok [Tue, 17 Jan 2023 19:01:25 +0000 (14:01 -0500)] 
it helps to parse the io_submodule

2 years agoPacket-Type does not map to codes in the packet
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

2 years agofirst pass of fixing statistics
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

2 years agoDebian sid and Ubuntu >= 22.04 use OpenSSL v3
Nick Porter [Mon, 16 Jan 2023 18:40:38 +0000 (18:40 +0000)] 
Debian sid and Ubuntu >= 22.04 use OpenSSL v3

2 years agoWork round for eapol_test not compiling on debian sid
Nick Porter [Mon, 16 Jan 2023 18:03:36 +0000 (18:03 +0000)] 
Work round for eapol_test not compiling on debian sid

2 years agoBump hostap to latest released version
Nick Porter [Mon, 16 Jan 2023 18:03:04 +0000 (18:03 +0000)] 
Bump hostap to latest released version

2 years agoremove unused assignment
Alan T. DeKok [Mon, 16 Jan 2023 15:37:37 +0000 (10:37 -0500)] 
remove unused assignment

2 years agoit would help if the local compiler was as picky as CI
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

2 years agomore NDEBUG
Alan T. DeKok [Mon, 16 Jan 2023 13:55:08 +0000 (08:55 -0500)] 
more NDEBUG

2 years agoremove unused variable
Alan T. DeKok [Mon, 16 Jan 2023 13:34:26 +0000 (08:34 -0500)] 
remove unused variable

2 years agoclean up "todos"
Alan T. DeKok [Mon, 16 Jan 2023 13:26:52 +0000 (08:26 -0500)] 
clean up "todos"

2 years agoallow for and initialize retries
Alan T. DeKok [Mon, 16 Jan 2023 13:26:34 +0000 (08:26 -0500)] 
allow for and initialize retries

2 years agodo 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

2 years agoreset can also reset the timer
Alan T. DeKok [Mon, 16 Jan 2023 13:12:25 +0000 (08:12 -0500)] 
reset can also reset the timer

2 years agoctype macros should take explicitly unsigned input
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)

2 years agoadd TCP output which is compile-tested.
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

2 years agoExplicitly ignore return code (CID #1519000)
Nick Porter [Mon, 16 Jan 2023 12:28:03 +0000 (12:28 +0000)] 
Explicitly ignore return code (CID #1519000)

2 years agoRemove useless code (CID #1519003)
Nick Porter [Mon, 16 Jan 2023 12:06:47 +0000 (12:06 +0000)] 
Remove useless code (CID #1519003)

2 years agoUse MEM() to add safety check (CID #1519004)
Nick Porter [Mon, 16 Jan 2023 11:49:36 +0000 (11:49 +0000)] 
Use MEM() to add safety check (CID #1519004)

2 years agoUse print_hex() to dump hex data
Nick Porter [Mon, 16 Jan 2023 10:37:17 +0000 (10:37 +0000)] 
Use print_hex() to dump hex data

2 years agoUse accessor function for PyFrameObject members on python >= 3.10
Nick Porter [Fri, 13 Jan 2023 18:05:38 +0000 (18:05 +0000)] 
Use accessor function for PyFrameObject members on python >= 3.10

2 years agoFix comment
Arran Cudbard-Bell [Fri, 13 Jan 2023 23:23:39 +0000 (17:23 -0600)] 
Fix comment

2 years agoAdd function for set global library directory
Jorge Pereira [Wed, 11 Jan 2023 22:37:24 +0000 (19:37 -0300)] 
Add function for set global library directory

2 years agogrumble
Alan T. DeKok [Fri, 13 Jan 2023 21:36:59 +0000 (16:36 -0500)] 
grumble

2 years agoremove unused variable
Alan T. DeKok [Fri, 13 Jan 2023 20:37:39 +0000 (15:37 -0500)] 
remove unused variable

2 years agoadd and use fr_tacacs_packet_log_hex()
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.

2 years agoRevert "fix decode_args() function"
Alan T. DeKok [Fri, 13 Jan 2023 17:20:11 +0000 (12:20 -0500)] 
Revert "fix decode_args() function"

This reverts commit 0aa0f42d90b15366ab79ac364d55b45cffae7a60.

2 years agorun busy loop over 1msec. Fixes #4846 in a clearer manner.
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

2 years agofirst draft of "front end" for TACACS+ client
Alan T. DeKok [Sat, 7 Jan 2023 16:30:39 +0000 (11:30 -0500)] 
first draft of "front end" for TACACS+ client

2 years agomove commonly used functions to the trunk code
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.

2 years agofix decode_args() function
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.

2 years agono need to update the output ptr
Alan T. DeKok [Fri, 6 Jan 2023 21:55:46 +0000 (16:55 -0500)] 
no need to update the output ptr

2 years agoprint packet name, too
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

2 years agoallow parsing expressions on the RHS of edit instructions
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.

2 years agowe don't support "filter" any more
Alan T. DeKok [Tue, 3 Jan 2023 15:29:12 +0000 (10:29 -0500)] 
we don't support "filter" any more

2 years agoremove extraneous brackets
Alan T. DeKok [Tue, 3 Jan 2023 15:29:01 +0000 (10:29 -0500)] 
remove extraneous brackets

2 years agomake the skip condition code a bit more generic
Alan T. DeKok [Tue, 3 Jan 2023 15:07:54 +0000 (10:07 -0500)] 
make the skip condition code a bit more generic

2 years agodon't resolve enums here, the caller should do that
Alan T. DeKok [Sat, 31 Dec 2022 15:43:20 +0000 (10:43 -0500)] 
don't resolve enums here, the caller should do that

2 years agohoist rcode parsing
Alan T. DeKok [Sat, 31 Dec 2022 15:41:57 +0000 (10:41 -0500)] 
hoist rcode parsing

so that tmpl_tokenize functions don't need to parse bare words
as enums

2 years agoInclude talloc headers in atexit code and fix erroneous uses of include <talloc.h>
Arran Cudbard-Bell [Thu, 12 Jan 2023 22:04:09 +0000 (16:04 -0600)] 
Include talloc headers in atexit code and fix erroneous uses of include <talloc.h>

2 years agoPunctuation
Arran Cudbard-Bell [Thu, 12 Jan 2023 22:00:36 +0000 (16:00 -0600)] 
Punctuation

2 years agoAdd generic talloc free function for the atexit code
Arran Cudbard-Bell [Thu, 12 Jan 2023 21:58:42 +0000 (15:58 -0600)] 
Add  generic talloc free function for the atexit code

2 years agoJust create two fr_atexit_global_once macros
Arran Cudbard-Bell [Thu, 12 Jan 2023 20:17:47 +0000 (14:17 -0600)] 
Just create two fr_atexit_global_once macros

One that returns values, one that doesn't

2 years ago...as demonstrated by these
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:52:29 +0000 (13:52 -0600)] 
...as demonstrated by these