]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoSQL uses SQL-Group, so use the old conditions here, too
Alan T. DeKok [Tue, 25 Oct 2022 20:57:00 +0000 (16:57 -0400)] 
SQL uses SQL-Group, so use the old conditions here, too

3 years agoupcast to 64-bits for integers
Alan T. DeKok [Tue, 25 Oct 2022 20:33:34 +0000 (16:33 -0400)] 
upcast to 64-bits for integers

3 years agotypo
Alan T. DeKok [Tue, 25 Oct 2022 20:26:21 +0000 (16:26 -0400)] 
typo

3 years agoCI: run sanitizers in a separate non-Docker job on GitHub
Matthew Newton [Tue, 25 Oct 2022 22:45:19 +0000 (23:45 +0100)] 
CI: run sanitizers in a separate non-Docker job on GitHub

3 years agoCI: fixes for when running directly on GitHub images
Matthew Newton [Tue, 25 Oct 2022 23:01:38 +0000 (00:01 +0100)] 
CI: fixes for when running directly on GitHub images

3 years agoFix dangling pointer issue (#4786)
James Jones [Tue, 25 Oct 2022 22:22:44 +0000 (17:22 -0500)] 
Fix dangling pointer issue (#4786)

clang may not realize that memcpy() doesn't keep the pointers handed
to it around, so there's no risk of the address of an auto being kept
past the caller's return, hence the "dangling pointer" warning.

Instead, head it off at the pass by immediately returning if len
is zero, so in needn't be set to the address of an auto; the only
explicit passing of NULL for in passes 0 for len. (Comments explain
how if len == 0, nothing changes in the context.) One could argue
for checking in rather than or in addition to checking len... OTOH,
shouldn't passing NULL and a non-zero len break loudly?

3 years agoCI: disable sanitizers until we can work out why it deadlocks in Docker
Matthew Newton [Tue, 25 Oct 2022 16:39:34 +0000 (17:39 +0100)] 
CI: disable sanitizers until we can work out why it deadlocks in Docker

3 years agoCI: fix comment
Matthew Newton [Tue, 25 Oct 2022 14:14:16 +0000 (15:14 +0100)] 
CI: fix comment

3 years agoOnly run the main CI build on our infrastructure
Arran Cudbard-Bell [Tue, 25 Oct 2022 13:21:49 +0000 (09:21 -0400)] 
Only run the main CI build on our infrastructure

3 years agoRemove unused
Nick Porter [Tue, 25 Oct 2022 10:09:36 +0000 (11:09 +0100)] 
Remove unused

3 years agopush xlat condition parsing until later
Alan T. DeKok [Mon, 24 Oct 2022 21:31:12 +0000 (17:31 -0400)] 
push xlat condition parsing until later

to avoid having unused xlats hanging around when we parse
policies.

3 years agoregister function arguments if available
Alan T. DeKok [Mon, 24 Oct 2022 21:30:19 +0000 (17:30 -0400)] 
register function arguments if available

so that the parser can do the correct thing

3 years agoadd "don't use new conditions" for LDAP tests
Alan T. DeKok [Mon, 24 Oct 2022 19:43:35 +0000 (15:43 -0400)] 
add "don't use new conditions" for LDAP tests

so that when we "flip the switch" to always enable them, nothing
should break

3 years agoAmend Active Directory persistent search tests for parallel runs
Nick Porter [Mon, 24 Oct 2022 08:58:56 +0000 (09:58 +0100)] 
Amend Active Directory persistent search tests for parallel runs

3 years agoAmend persistent search tests to use different output files for parallel runs
Nick Porter [Mon, 24 Oct 2022 08:08:52 +0000 (09:08 +0100)] 
Amend persistent search tests to use different output files for parallel runs

3 years agoAmend persistent search tests to use new entries
Nick Porter [Mon, 24 Oct 2022 08:07:34 +0000 (09:07 +0100)] 
Amend persistent search tests to use new entries

3 years agoAdd extra entries to 389ds test directory
Nick Porter [Mon, 24 Oct 2022 08:05:13 +0000 (09:05 +0100)] 
Add extra entries to 389ds test directory

3 years agoCI: clean up docker cruft after job runs
Matthew Newton [Sun, 23 Oct 2022 17:27:06 +0000 (18:27 +0100)] 
CI: clean up docker cruft after job runs

3 years agoMake the same fix for mkdirat
Arran Cudbard-Bell [Sat, 22 Oct 2022 20:21:51 +0000 (16:21 -0400)] 
Make the same fix for mkdirat

3 years agoIf the directory already exists then we need to provide a handle to it
Arran Cudbard-Bell [Sat, 22 Oct 2022 20:12:47 +0000 (16:12 -0400)] 
If the directory already exists then we need to provide a handle to it

3 years agoReturn the actual number of bytes processed, and the actual negative failure offset...
Arran Cudbard-Bell [Sat, 22 Oct 2022 19:03:12 +0000 (15:03 -0400)] 
Return the actual number of bytes processed, and the actual negative failure offset in fd_mkdir

3 years agoReturning path - p where p is NULL results in a positive value
Arran Cudbard-Bell [Sat, 22 Oct 2022 18:22:25 +0000 (14:22 -0400)] 
Returning path - p where p is NULL results in a positive value

3 years agoUnclear at this point why mkdirat is returning EBADF
Arran Cudbard-Bell [Sat, 22 Oct 2022 17:50:10 +0000 (13:50 -0400)] 
Unclear at this point why mkdirat is returning EBADF

3 years agoAllow FR to start its LDAP persistent search before starting tests
Nick Porter [Sat, 22 Oct 2022 15:42:36 +0000 (16:42 +0100)] 
Allow FR to start its LDAP persistent search before starting tests

3 years agoDelete correct output file
Nick Porter [Sat, 22 Oct 2022 15:42:54 +0000 (16:42 +0100)] 
Delete correct output file

3 years agoRevert "Re-work ldap setup script"
Nick Porter [Sat, 22 Oct 2022 17:33:49 +0000 (18:33 +0100)] 
Revert "Re-work ldap setup script"

ss is not available on self-hosted runners, and further
observation shows this is not the cause of the random
failures

3 years agoNeed to check for both...
Arran Cudbard-Bell [Sat, 22 Oct 2022 17:23:50 +0000 (13:23 -0400)] 
Need to check for both...

3 years ago*sigh* the real issue is path is not const
Arran Cudbard-Bell [Sat, 22 Oct 2022 17:00:29 +0000 (13:00 -0400)] 
*sigh* the real issue is path is not const

3 years agoconst
Arran Cudbard-Bell [Sat, 22 Oct 2022 16:51:11 +0000 (12:51 -0400)] 
const

3 years agoFix comment on status line length in rlm_rest (#4783)
Dominik George [Sat, 22 Oct 2022 16:49:05 +0000 (18:49 +0200)] 
Fix comment on status line length in rlm_rest (#4783)

3 years agoDon't return garbage when failing to create the top level directory
Arran Cudbard-Bell [Sat, 22 Oct 2022 16:46:25 +0000 (12:46 -0400)] 
Don't return garbage when failing to create the top level directory

3 years agoDon't lose the context for mkdir errors
Arran Cudbard-Bell [Sat, 22 Oct 2022 08:55:08 +0000 (04:55 -0400)] 
Don't lose the context for mkdir errors

3 years agoRemove one fork() per utility invocation
Arran Cudbard-Bell [Sat, 22 Oct 2022 08:52:07 +0000 (04:52 -0400)] 
Remove one fork() per utility invocation

3 years agoIt's fine if the dir we're making already exists
Arran Cudbard-Bell [Sat, 22 Oct 2022 08:21:02 +0000 (04:21 -0400)] 
It's fine if the dir we're making already exists

3 years agosyserror isn't useful here, whereas our thread local buffer will be
Arran Cudbard-Bell [Sat, 22 Oct 2022 08:16:29 +0000 (04:16 -0400)] 
syserror isn't useful here, whereas our thread local buffer will be

3 years agoCatch commands returning invalid codes
Arran Cudbard-Bell [Sat, 22 Oct 2022 08:15:33 +0000 (04:15 -0400)] 
Catch commands returning invalid codes

3 years agoPass mode when creating output files
Arran Cudbard-Bell [Sat, 22 Oct 2022 07:34:52 +0000 (03:34 -0400)] 
Pass mode when creating output files

3 years agoNeed sys/file.h
Arran Cudbard-Bell [Sat, 22 Oct 2022 07:25:16 +0000 (03:25 -0400)] 
Need sys/file.h

3 years agoPrevent several race conditions in unit_test_attribute
Arran Cudbard-Bell [Sat, 22 Oct 2022 07:19:56 +0000 (03:19 -0400)] 
Prevent several race conditions in unit_test_attribute

Make writing as robust as possible

3 years agoMove to node16 version of github actions
Nick Porter [Fri, 21 Oct 2022 20:07:42 +0000 (21:07 +0100)] 
Move to node16 version of github actions

3 years agoRemove deprecated set-output
Nick Porter [Fri, 21 Oct 2022 19:23:15 +0000 (20:23 +0100)] 
Remove deprecated set-output

3 years agoRe-work ldap setup script
Nick Porter [Fri, 21 Oct 2022 18:53:45 +0000 (19:53 +0100)] 
Re-work ldap setup script

To check server is listening before attempting to add data

3 years ago...and no one actually put the sneaky alias in FreeBSD
Arran Cudbard-Bell [Fri, 21 Oct 2022 19:02:25 +0000 (15:02 -0400)] 
...and no one actually put the sneaky alias in FreeBSD

3 years agoExcept when a test sneakily creates a wrapper script
Arran Cudbard-Bell [Fri, 21 Oct 2022 18:57:14 +0000 (14:57 -0400)] 
Except when a test sneakily creates a wrapper script

but then not so sneakily fails to catch all the previous sysctl instances

3 years agosignal the request to cancel, too
Alan T. DeKok [Tue, 18 Oct 2022 14:10:48 +0000 (10:10 -0400)] 
signal the request to cancel, too

3 years agonproc doesn't exist on freebsd
Arran Cudbard-Bell [Fri, 21 Oct 2022 18:53:06 +0000 (14:53 -0400)] 
nproc doesn't exist on freebsd

3 years agotest: Quick wins by performing some tests in parallel (#4782)
Terry Burton [Fri, 21 Oct 2022 18:41:30 +0000 (19:41 +0100)] 
test: Quick wins by performing some tests in parallel (#4782)

3 years agoUpdate tests to use different output filenames for parallel running
Nick Porter [Fri, 21 Oct 2022 16:40:42 +0000 (17:40 +0100)] 
Update tests to use different output filenames for parallel running

3 years agoAmend tests to use new entries
Nick Porter [Fri, 21 Oct 2022 16:39:45 +0000 (17:39 +0100)] 
Amend tests to use new entries

3 years agoAdd extra entries to LDAP directory for parallel tests
Nick Porter [Fri, 21 Oct 2022 16:37:22 +0000 (17:37 +0100)] 
Add extra entries to LDAP directory for parallel tests

3 years agoIgnore returns from certain sbuff calls (CIDs #1504025, #1504070) (#4750)
James Jones [Fri, 21 Oct 2022 17:59:13 +0000 (12:59 -0500)] 
Ignore returns from certain sbuff calls (CIDs #1504025, #1504070) (#4750)

These are cases in which sbuffs are either created from C arrays
or are allocated from the heap but given initial and maximum sizes.
The author(s) of the code presumably chose sizes intended to suffice,
but despite that, coverity will notice that the sbuff functions
used return a value, and hence will report check_return barring
either explicit cast to void or annotation. We therefore cast to void.

3 years agoCheck return of fr_pair_list_copy_by_da() (CID #1469148) (#4752)
James Jones [Fri, 21 Oct 2022 17:58:55 +0000 (12:58 -0500)] 
Check return of fr_pair_list_copy_by_da() (CID #1469148) (#4752)

3 years agoExplicitly ignore the curl_mime_type() return (CID #1504071) (#4764)
James Jones [Fri, 21 Oct 2022 17:51:58 +0000 (12:51 -0500)] 
Explicitly ignore the curl_mime_type() return (CID #1504071) (#4764)

* Check curl calls that allocate memory (CID #1504071)

This includes the curl_mime_type() call that gives rise to the
coverity defect, but also checks the mime and mime part allocations
that must work for body_init() to work.

* Formatting

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agoCheck fr_event_timer_in() return value (CID #1503926) (#4774)
James Jones [Fri, 21 Oct 2022 17:50:25 +0000 (12:50 -0500)] 
Check fr_event_timer_in() return value (CID #1503926) (#4774)

* Check fr_event_timer_in() return value (CID #1503926)

* Assert and error if we can't insert timer events

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
3 years agotests: Ignore spurious output from jlibtool with VERBOSE=1 (#4781)
Terry Burton [Fri, 21 Oct 2022 17:46:39 +0000 (18:46 +0100)] 
tests: Ignore spurious output from jlibtool with VERBOSE=1 (#4781)

3 years agoAdd ability to set static headers to rlm_rest
Arran Cudbard-Bell [Thu, 20 Oct 2022 02:40:34 +0000 (22:40 -0400)] 
Add ability to set static headers to rlm_rest

3 years agofr_value_box_from_network: Fix NULL pointer dereference when truncating (#4779)
Max Khon [Wed, 19 Oct 2022 13:36:49 +0000 (16:36 +0300)] 
fr_value_box_from_network: Fix NULL pointer dereference when truncating (#4779)

3 years agoAnnotate fs_check_call (CID #1271307) (#4778)
James Jones [Tue, 18 Oct 2022 17:15:55 +0000 (12:15 -0500)] 
Annotate fs_check_call (CID #1271307) (#4778)

The unlink() call (the use of the toctou) does check its return
code. Also, it's not liwted among the UseSet functions in "TOCTTOU
Vulnerabilities in Unix-Style File Systems: An Anatomical Study",
https://www.usenix.org/legacy/events/fast05/tech/full_papers/wei/wei.pdf

3 years agoIgnore fr_sbuff_in_strcpy() return in fr_pair_list_log_sbuff() (CID #1504278) (#4775)
James Jones [Tue, 18 Oct 2022 17:15:35 +0000 (12:15 -0500)] 
Ignore fr_sbuff_in_strcpy() return in fr_pair_list_log_sbuff() (CID #1504278) (#4775)

sbuff is emptied each time through the for loop, and down this
path it will only contain the output of fr_dict_attr_oid_print(),
possibly preceded by "raw.". fr_pair_list_log_sbuff() is only
called from one place, which passes in an sbuff using an array
of 1024 characters. This should suffice to make appending " = "
always work.

3 years agoIgnore fr_event_timer_in() return here, too (CID #154036) (#4773)
James Jones [Tue, 18 Oct 2022 17:13:07 +0000 (12:13 -0500)] 
Ignore fr_event_timer_in() return here, too (CID #154036) (#4773)

Like 1503936, this is in a callback and will reuse the idle
timeout event.

3 years agoDeal with time of check/time of use complaints (CIDs below) (#4768)
James Jones [Tue, 18 Oct 2022 17:12:55 +0000 (12:12 -0500)] 
Deal with time of check/time of use complaints (CIDs below) (#4768)

1400053: the call coverity complains about is just there to
         determine why the dlopen() failed.
1445217: the fopen() return is checked, so any changes between
         the stat() call and it should be detected.
1503910: here, the unlink() return is checked

3 years agoonly NDEBUG
Alan T. DeKok [Tue, 18 Oct 2022 13:57:49 +0000 (09:57 -0400)] 
only NDEBUG

3 years agoAdd username to the REDIS auth command
Arran Cudbard-Bell [Tue, 18 Oct 2022 13:31:34 +0000 (09:31 -0400)] 
Add username to the REDIS auth command

3 years agotypo
Alan T. DeKok [Tue, 18 Oct 2022 12:53:35 +0000 (08:53 -0400)] 
typo

3 years agocleanups and fixes for #4777
Alan T. DeKok [Tue, 18 Oct 2022 12:44:01 +0000 (08:44 -0400)] 
cleanups and fixes for #4777

Move common macros and includes to a common header file.

Create a macro which wraps OpenBSD's closefrom() in a macro,
so that the source code isn't littered with ifdef's

3 years agodon't run this in parallel
Alan T. DeKok [Tue, 18 Oct 2022 12:31:17 +0000 (08:31 -0400)] 
don't run this in parallel

3 years agoupdate request_clone() so that it works
Alan T. DeKok [Mon, 17 Oct 2022 20:09:49 +0000 (16:09 -0400)] 
update request_clone() so that it works

3 years agodo perf updates before freeing the bits from the frame
Alan T. DeKok [Mon, 17 Oct 2022 19:43:22 +0000 (15:43 -0400)] 
do perf updates before freeing the bits from the frame

3 years agoadd "interpret" section with instruction limiting pieces
Alan T. DeKok [Mon, 17 Oct 2022 19:12:36 +0000 (15:12 -0400)] 
add "interpret" section with instruction limiting pieces

3 years agoadd maximum instruction count for failure testing
Alan T. DeKok [Mon, 17 Oct 2022 19:03:20 +0000 (15:03 -0400)] 
add maximum instruction count for failure testing

3 years agoCI: bump timeout
Matthew Newton [Sun, 16 Oct 2022 18:35:54 +0000 (19:35 +0100)] 
CI: bump timeout

see if that's causing random failures

3 years agoFallback to `uname -n` on missing `hostname` in radtest (#4771)
Christian Hesse [Sun, 16 Oct 2022 11:39:24 +0000 (13:39 +0200)] 
Fallback to `uname -n` on missing `hostname` in radtest (#4771)

This should work without inetutils being installed, so add a fallback.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Christian Hesse <mail@eworm.de>
3 years agoCI: remove debugging
Matthew Newton [Fri, 14 Oct 2022 16:48:25 +0000 (17:48 +0100)] 
CI: remove debugging

3 years agoCI: install git-lfs early, too
Matthew Newton [Fri, 14 Oct 2022 14:47:04 +0000 (15:47 +0100)] 
CI: install git-lfs early, too

3 years agoExplicitly ignore fr_event_timer_in() return value (CID #1503936) (#4769)
James Jones [Fri, 14 Oct 2022 14:14:44 +0000 (09:14 -0500)] 
Explicitly ignore fr_event_timer_in() return value (CID #1503936) (#4769)

fr_event_timer_in() (actually _fr_event_timer_at()) reuses events
where possible, and being in the idle timeout means that there is
such an event available for reuse.

3 years agoCI: Tidy home directory in Docker
Matthew Newton [Fri, 14 Oct 2022 12:32:05 +0000 (13:32 +0100)] 
CI: Tidy home directory in Docker

3 years agoCI: ruby/setup-ruby broken in GitHub container right now
Matthew Newton [Thu, 13 Oct 2022 16:18:40 +0000 (17:18 +0100)] 
CI: ruby/setup-ruby broken in GitHub container right now

3 years agoCI: for the time being run on both GitHub and self-hosted
Matthew Newton [Thu, 13 Oct 2022 14:45:22 +0000 (15:45 +0100)] 
CI: for the time being run on both GitHub and self-hosted

3 years agoCI: fixups to use 389ds in Docker container
Matthew Newton [Wed, 12 Oct 2022 23:03:50 +0000 (00:03 +0100)] 
CI: fixups to use 389ds in Docker container

3 years agoCI: use vars to set llvm/gcc versions
Matthew Newton [Mon, 10 Oct 2022 13:34:35 +0000 (14:34 +0100)] 
CI: use vars to set llvm/gcc versions

3 years agoCI: move fuzzer tests to separate composite action
Matthew Newton [Thu, 13 Oct 2022 14:02:19 +0000 (15:02 +0100)] 
CI: move fuzzer tests to separate composite action

3 years agoCI: move main tests to separate composite action
Matthew Newton [Thu, 13 Oct 2022 11:33:47 +0000 (12:33 +0100)] 
CI: move main tests to separate composite action

3 years agoCI: move build process to separate composite action
Matthew Newton [Wed, 12 Oct 2022 22:47:02 +0000 (23:47 +0100)] 
CI: move build process to separate composite action

3 years agoCI: prepare Docker image more like GitHub runner
Matthew Newton [Wed, 12 Oct 2022 22:54:22 +0000 (23:54 +0100)] 
CI: prepare Docker image more like GitHub runner

3 years agoCI: run in Docker and add test service containers
Matthew Newton [Wed, 12 Oct 2022 21:52:15 +0000 (22:52 +0100)] 
CI: run in Docker and add test service containers

- mariadb
- postgres
- redis
- 389ds

3 years agoCI: add matrix.os to set where jobs run
Matthew Newton [Wed, 12 Oct 2022 19:58:37 +0000 (20:58 +0100)] 
CI: add matrix.os to set where jobs run

3 years agoCI: move macOS to a separate job
Matthew Newton [Wed, 12 Oct 2022 19:57:40 +0000 (20:57 +0100)] 
CI: move macOS to a separate job

3 years agoCI: actions/setup-ruby is deprecated
Matthew Newton [Thu, 13 Oct 2022 13:48:03 +0000 (14:48 +0100)] 
CI: actions/setup-ruby is deprecated

3 years agoCI: explicitly enable developer mode
Matthew Newton [Mon, 10 Oct 2022 15:18:00 +0000 (16:18 +0100)] 
CI: explicitly enable developer mode

3 years agoCI: fix YAML whitespace
Matthew Newton [Thu, 13 Oct 2022 09:58:42 +0000 (10:58 +0100)] 
CI: fix YAML whitespace

3 years agorlm_sql_oracle: Fix typo (#4765)
Jorge Pereira [Thu, 13 Oct 2022 02:16:34 +0000 (23:16 -0300)] 
rlm_sql_oracle: Fix typo (#4765)

3 years agoSuppress MacOS ld warning from native compilation (#4766)
Jorge Pereira [Wed, 12 Oct 2022 12:50:00 +0000 (09:50 -0300)] 
Suppress MacOS ld warning from native compilation (#4766)

Add the option '-Wl,-w' as suggested in https://issues.guix.gnu.org/issue/57849

3 years agoImprove queries for processing radacct into periodic usage data
Nick Porter [Wed, 12 Oct 2022 10:37:17 +0000 (11:37 +0100)] 
Improve queries for processing radacct into periodic usage data

Removing `OR` from the query allows better index usage

3 years agoTypo
Nick Porter [Wed, 12 Oct 2022 10:32:55 +0000 (11:32 +0100)] 
Typo

3 years agoFix typo (#4763)
Jorge Pereira [Tue, 11 Oct 2022 20:54:30 +0000 (17:54 -0300)] 
Fix typo (#4763)

3 years agoeapol_test: Add paths for Brew on OSX/M1 (#4757)
Jorge Pereira [Thu, 6 Oct 2022 17:45:37 +0000 (14:45 -0300)] 
eapol_test: Add paths for Brew on OSX/M1 (#4757)

Needed for the Brew running on OSX/M1 due to the new base path is in /opt/homebrew
as described on https://earthly.dev/blog/homebrew-on-m1/

3 years agoMake plain 'autoconf' 'autoheader' 'autoupdate' invocations work again
Arran Cudbard-Bell [Thu, 6 Oct 2022 04:02:52 +0000 (00:02 -0400)] 
Make plain 'autoconf' 'autoheader' 'autoupdate' invocations work again

Reading the autoconf docs the preferred way to do includes is to set `AC_CONFIG_MACRO_DIR([m4])` then run aclocal to figure out which .m4 files need including.

Check the size of time_t so we can determine if we're going to overflow it...

3 years agofr_perror should accept a NULL fmt string
Arran Cudbard-Bell [Wed, 5 Oct 2022 14:15:44 +0000 (10:15 -0400)] 
fr_perror should accept a NULL fmt string

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Wed, 5 Oct 2022 09:49:16 +0000 (09:49 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

3 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Wed, 5 Oct 2022 09:49:13 +0000 (09:49 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar