]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoremove mach functions.
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.

3 years agoclarifications and typo fixes
Alan T. DeKok [Mon, 23 Jan 2023 21:34:24 +0000 (16:34 -0500)] 
clarifications and typo fixes

3 years agoadd functions to get gmt offset and daylight savings flag
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.

3 years agoupdate for expressions terminating before EOL
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

3 years agoadd week / month / year time resolution
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

3 years agoGet rid of double unlock in fr_atexit_global_once_ret() (CID #1518999) (#4855)
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)

3 years agoadd Tmp-Time-Delta-*
Alan T. DeKok [Sat, 21 Jan 2023 21:48:40 +0000 (16:48 -0500)] 
add Tmp-Time-Delta-*

we really need local variables :(

3 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.

3 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.

3 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

3 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.

3 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

3 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

3 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

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

3 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

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

3 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

3 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.

3 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

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

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

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

3 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

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

3 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

3 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

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

3 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.

3 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

3 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

3 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

3 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

3 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

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

3 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

3 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.

3 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

3 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)

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

3 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.

3 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

3 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

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

3 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

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

3 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.

3 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

3 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

3 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.

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

3 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

3 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

3 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.

3 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

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

3 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

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

3 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

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

3 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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

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

3 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

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

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

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

3 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

3 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

3 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

3 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)

3 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

3 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)

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

3 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)

3 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

3 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

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

3 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

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

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

3 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.

3 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.

3 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

3 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

3 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.

3 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.

3 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

3 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

3 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.

3 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

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

3 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