]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
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

3 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

3 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

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

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

3 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

3 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

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

3 years agoType and func macros don't use semicolons in other places
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:43:31 +0000 (13:43 -0600)] 
Type and func macros don't use semicolons in other places

3 years agoAnother attempt at accepting NULL macro args
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:43:16 +0000 (13:43 -0600)] 
Another attempt at accepting NULL macro args

3 years agoAllow global at exit init functions to return error codes
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:06:20 +0000 (13:06 -0600)] 
Allow global at exit init functions to return error codes

3 years agoToo many semicolons
Arran Cudbard-Bell [Thu, 12 Jan 2023 19:06:02 +0000 (13:06 -0600)] 
Too many semicolons

3 years agoFix -Werror=address complaints... maybe
Arran Cudbard-Bell [Thu, 12 Jan 2023 18:40:34 +0000 (12:40 -0600)] 
Fix -Werror=address complaints... maybe

3 years agoAllow NULL init and free functions for fr_atexit_global_once
Arran Cudbard-Bell [Thu, 12 Jan 2023 16:08:28 +0000 (10:08 -0600)] 
Allow NULL init and free functions for fr_atexit_global_once

3 years agoTests for slab allocator
Nick Porter [Wed, 21 Dec 2022 19:25:07 +0000 (19:25 +0000)] 
Tests for slab allocator

3 years agoDefine a talloc based slab allocator
Nick Porter [Wed, 21 Dec 2022 19:09:55 +0000 (19:09 +0000)] 
Define a talloc based slab allocator

Allows regularly re-used objects to be allocated from a slab once and
reused.

3 years agoJust sneak this in there...
Arran Cudbard-Bell [Wed, 11 Jan 2023 15:24:07 +0000 (09:24 -0600)] 
Just sneak this in there...

3 years agoFix rpmbuilding for Alma Linux
Arran Cudbard-Bell [Wed, 11 Jan 2023 15:09:02 +0000 (09:09 -0600)] 
Fix rpmbuilding for Alma Linux

3 years agoRemove confe file
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:33:48 +0000 (14:33 -0600)] 
Remove confe file

3 years agorpmbuild really wants these flags together
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:28:29 +0000 (14:28 -0600)] 
rpmbuild really wants these flags together

3 years agoDoesn't seem necessary to use perl here... and rpmbuild seems to sub it anyway
Arran Cudbard-Bell [Tue, 10 Jan 2023 20:24:52 +0000 (14:24 -0600)] 
Doesn't seem necessary to use perl here... and rpmbuild seems to sub it anyway

3 years agoFix typo. refs #4836 (#4843)
Jorge Pereira [Tue, 10 Jan 2023 16:50:30 +0000 (13:50 -0300)] 
Fix typo. refs #4836 (#4843)

3 years agoForce openSSL version check literals to unsigned long
Arran Cudbard-Bell [Tue, 10 Jan 2023 16:15:10 +0000 (10:15 -0600)] 
Force openSSL version check literals to unsigned long

3 years agoCorrect syntax of debug_ policies
Nick Porter [Tue, 10 Jan 2023 11:50:16 +0000 (11:50 +0000)] 
Correct syntax of debug_ policies

3 years agorlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute (#4841)
Terry Burton [Mon, 9 Jan 2023 23:24:09 +0000 (23:24 +0000)] 
rlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute (#4841)

* rlm_rest: Prefer the Content-Type provided in a REST-HTTP-Header attribute

* More than just SP is allowed between header attributes and values

* Simplify content_type use

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agoeapol_test-build.sh log output should be to stderr
Nick Porter [Mon, 9 Jan 2023 13:36:42 +0000 (13:36 +0000)] 
eapol_test-build.sh log output should be to stderr

stdout is where the path to the final binary is output.

3 years agoUpdate default delay for rlm_delay
Nick Porter [Fri, 6 Jan 2023 19:36:17 +0000 (19:36 +0000)] 
Update default delay for rlm_delay

Due to the option being parsed as a tmpl, if it is 1.0, it becomes a
float, which doesn't have a cast to fr_time_delta_t.

Adding the time unit, makes it a string which parses fine.

3 years agoHandle corner case in using fr_sbuff_is...() functions on markers (#4839)
Nick Porter [Fri, 6 Jan 2023 16:53:26 +0000 (16:53 +0000)] 
Handle corner case in using fr_sbuff_is...() functions on markers (#4839)

* Corner case fix for calling an fr_sbuff_is... function on a marker

Previously if fr_sbuff_is_...() was called on a marker and the buffer
had advanced past the end, then the function always returned false,
regardless of the character the marker was pointing at.

* Test to check fr_sbuff_is..() handles markers regardless of buffer position

* Correct parsing <num>.0 into fr_time_delta_t

3 years agorlm_rest: Don't skip alternate REST-HTTP-Header entries (#4838)
Terry Burton [Fri, 6 Jan 2023 16:34:54 +0000 (16:34 +0000)] 
rlm_rest: Don't skip alternate REST-HTTP-Header entries (#4838)

3 years agoOnly cleanup child processes if the exec has been populated
Nick Porter [Fri, 6 Jan 2023 11:16:03 +0000 (11:16 +0000)] 
Only cleanup child processes if the exec has been populated

3 years agoAdd error message when delay value fails to parse
Nick Porter [Fri, 6 Jan 2023 11:14:34 +0000 (11:14 +0000)] 
Add error message when delay value fails to parse

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:55 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:49 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:46 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Fri, 6 Jan 2023 09:34:33 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

3 years agoRevert "util: Add new fr_dict_global_set_lib_dir() function (#4835)"
Arran Cudbard-Bell [Thu, 5 Jan 2023 20:12:49 +0000 (15:12 -0500)] 
Revert "util: Add new fr_dict_global_set_lib_dir() function (#4835)"

This reverts commit 2a1a9df08f4baf7d76592325d39c9dd1dd704912.

3 years agoutil: Add new fr_dict_global_set_lib_dir() function (#4835)
Jorge Pereira [Thu, 5 Jan 2023 19:57:28 +0000 (16:57 -0300)] 
util: Add new fr_dict_global_set_lib_dir() function (#4835)

It helps to add extra directories to be checked during library load.

3 years agoUse correct value for last argument of delay_add()
Nick Porter [Thu, 5 Jan 2023 17:54:20 +0000 (17:54 +0000)] 
Use correct value for last argument of delay_add()

3 years agoAlign worker bounds on max_request_time with docs
Nick Porter [Thu, 5 Jan 2023 17:07:07 +0000 (17:07 +0000)] 
Align worker bounds on max_request_time with docs

3 years agomax_request_time is a fr_time_delta_t not uint32_t
Nick Porter [Thu, 5 Jan 2023 17:05:54 +0000 (17:05 +0000)] 
max_request_time is a fr_time_delta_t not uint32_t

3 years agoeapol_test: Add new 'HOSTAPD_REPO' variable (#4834)
Jorge Pereira [Thu, 5 Jan 2023 15:40:16 +0000 (12:40 -0300)] 
eapol_test: Add new 'HOSTAPD_REPO' variable (#4834)

It allows us to build the 'eapol_test' using external repos like:

$ HOSTAPD_REPO="https://github.com/NetworkRADIUS/hostap" \
  HOSTAPD_GIT_TAG="feature/get_radius_reply" \
  ./scripts/ci/eapol_test-build.sh
$

3 years agouse enums when upcasting for comparisons
Alan T. DeKok [Fri, 30 Dec 2022 15:17:02 +0000 (10:17 -0500)] 
use enums when upcasting for comparisons

Note that (for now), we're not doing it in tmpl_cast_in_place(),
which *explicitly* avoids passing enums when casting.

We're also not doing it for expression / math calculations, as
it doesn't make sense to do

Service-Type = Framed-User + 1

It might make sense to use enums for IP address calculations? e.g.

Framed-IP-Address = network & mask

but at that point, you might as well just use attributes or local
variables for everything.

This is in preparation for updating the parser to force the user
to use single-quoted strings for enum names, as in:

Service-Type == 'Framed-User'

Which then means we'll also have to update the printing routines
to always print quotation marks around enums, and then update the
users file, SQL, detail file, etc.

3 years agouser-visible error messages shouldn't have function names in them
Alan T. DeKok [Thu, 29 Dec 2022 19:12:09 +0000 (14:12 -0500)] 
user-visible error messages shouldn't have function names in them

3 years agowe can't define ENUMs for strings or structural types
Alan T. DeKok [Thu, 29 Dec 2022 19:10:57 +0000 (14:10 -0500)] 
we can't define ENUMs for strings or structural types

3 years agonotes for when we parse expressions
Alan T. DeKok [Thu, 29 Dec 2022 18:57:48 +0000 (13:57 -0500)] 
notes for when we parse expressions