]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 years agoparent from the correct ctx
Alan T. DeKok [Tue, 26 Oct 2021 12:39:46 +0000 (08:39 -0400)] 
parent from the correct ctx

4 years agofix these, too
Alan T. DeKok [Tue, 26 Oct 2021 12:35:32 +0000 (08:35 -0400)] 
fix these, too

4 years agoUINT8_MAX is 255. Characters go from 0..255. Which is 256
Alan T. DeKok [Tue, 26 Oct 2021 12:32:56 +0000 (08:32 -0400)] 
UINT8_MAX is 255.  Characters go from 0..255.  Which is 256

4 years agoNot committed yet
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:25:10 +0000 (14:25 -0400)] 
Not committed yet

4 years agoConvert fixed width type conversion sbuff functions to return a fr_slen_t
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:21:06 +0000 (14:21 -0400)] 
Convert fixed width type conversion sbuff functions to return a fr_slen_t

4 years agoAdd function to converting parse errors to strerrors
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:20:04 +0000 (14:20 -0400)] 
Add function to converting parse errors to strerrors

4 years agoError out if setting tmpl cast failed
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:19:24 +0000 (14:19 -0400)] 
Error out if setting tmpl cast failed

4 years agoMore verbose assert on type mismatch
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:18:01 +0000 (14:18 -0400)] 
More verbose assert on type mismatch

4 years agoAssert that *out isn't set if the substr parsers return an error
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:17:19 +0000 (14:17 -0400)] 
Assert that *out isn't set if the substr parsers return an error

4 years agoUse a single error label in compile_switch
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:16:29 +0000 (14:16 -0400)] 
Use a single error label in compile_switch

4 years agoFix some capitalisation
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:15:44 +0000 (14:15 -0400)] 
Fix some capitalisation

4 years agoAdd macro for automatic thread-local sbuffs
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:14:44 +0000 (14:14 -0400)] 
Add macro for automatic thread-local sbuffs

4 years agoUse size_t for recording token len
Arran Cudbard-Bell [Mon, 25 Oct 2021 18:10:53 +0000 (14:10 -0400)] 
Use size_t for recording token len

4 years agoHandle is used
Arran Cudbard-Bell [Mon, 25 Oct 2021 17:55:06 +0000 (13:55 -0400)] 
Handle is used

4 years agoMove tmpl parse rules to value.c
Arran Cudbard-Bell [Mon, 25 Oct 2021 17:53:01 +0000 (13:53 -0400)] 
Move tmpl parse rules to value.c

4 years agofree unknown da's, too.
Alan T. DeKok [Mon, 25 Oct 2021 16:52:38 +0000 (12:52 -0400)] 
free unknown da's, too.

just to have less peak memory usage when decoding bad packets.

4 years agoallocate and free decode_ctx on every run
Alan T. DeKok [Mon, 25 Oct 2021 17:09:21 +0000 (13:09 -0400)] 
allocate and free decode_ctx on every run

4 years agoreturn correct offset
Alan T. DeKok [Mon, 25 Oct 2021 17:02:56 +0000 (13:02 -0400)] 
return correct offset

4 years agoAd hoc fuzzing: Allow selection of a single protocol (in addition to runtime) (#4293)
Terry Burton [Mon, 25 Oct 2021 13:23:02 +0000 (14:23 +0100)] 
Ad hoc fuzzing: Allow selection of a single protocol (in addition to runtime) (#4293)

4 years agoFixed for nightly fuzzing to align with new Make approach (#4289)
Terry Burton [Sun, 24 Oct 2021 19:09:21 +0000 (20:09 +0100)] 
Fixed for nightly fuzzing to align with new Make approach (#4289)

* Fix nightly fuzzing; dynamic matrix of protocols to fuzz

* CI: Don't run all tests for special fuzzer runs

4 years agoignore fuzzer files. Fixes #4287
Alan T. DeKok [Fri, 22 Oct 2021 19:59:19 +0000 (15:59 -0400)] 
ignore fuzzer files.  Fixes #4287

4 years agominimize more includes
Alan T. DeKok [Fri, 22 Oct 2021 13:54:53 +0000 (09:54 -0400)] 
minimize more includes

4 years agov4: Remove old sychronous LDAP code (#4286)
Nick Porter [Fri, 22 Oct 2021 18:54:49 +0000 (19:54 +0100)] 
v4: Remove old sychronous LDAP code (#4286)

4 years agoSome coverity workflow fixes (#4288)
Terry Burton [Fri, 22 Oct 2021 18:28:30 +0000 (19:28 +0100)] 
Some coverity workflow fixes (#4288)

* Don't trigger package builds on push to coverity_scan branch

* Allow out-of-project coverity scans on push to coverity_scan

* Key the cache for the Coverity scan tool based on its MD5

4 years agofuzzer CI: Don't choke on log output alone; sufficient parallelism for all (#4284)
Terry Burton [Fri, 22 Oct 2021 12:16:09 +0000 (13:16 +0100)] 
fuzzer CI: Don't choke on log output alone; sufficient parallelism for all (#4284)

4 years agoFix oracle packaging
Arran Cudbard-Bell [Fri, 22 Oct 2021 02:02:52 +0000 (22:02 -0400)] 
Fix oracle packaging

4 years agoremove unused assignment
Alan T. DeKok [Thu, 21 Oct 2021 22:18:59 +0000 (18:18 -0400)] 
remove unused assignment

4 years agoone more fix
Alan T. DeKok [Thu, 21 Oct 2021 20:32:13 +0000 (16:32 -0400)] 
one more fix

4 years agogit-lfs requires an external mutex (#4283)
Terry Burton [Thu, 21 Oct 2021 19:17:34 +0000 (20:17 +0100)] 
git-lfs requires an external mutex (#4283)

4 years agoneed this too
Alan T. DeKok [Thu, 21 Oct 2021 18:03:23 +0000 (14:03 -0400)] 
need this too

4 years agoclean auto-generated headers only on "make distclean"
Alan T. DeKok [Thu, 21 Oct 2021 18:01:43 +0000 (14:01 -0400)] 
clean auto-generated headers only on "make distclean"

because (at least on OSX) it takes a very long time to regenerate
them.

4 years agomore "run min-includes"
Alan T. DeKok [Thu, 21 Oct 2021 17:44:32 +0000 (13:44 -0400)] 
more "run min-includes"

4 years agorun min-includes
Alan T. DeKok [Thu, 21 Oct 2021 17:42:57 +0000 (13:42 -0400)] 
run min-includes

now that the "include everything" headers have been removed.

4 years agono need to include server/base.h everywhere
Alan T. DeKok [Thu, 21 Oct 2021 17:30:35 +0000 (13:30 -0400)] 
no need to include server/base.h everywhere

4 years agofewer includes
Alan T. DeKok [Thu, 21 Oct 2021 17:29:55 +0000 (13:29 -0400)] 
fewer includes

4 years agoremove unnecessary includes
Alan T. DeKok [Thu, 21 Oct 2021 17:06:18 +0000 (13:06 -0400)] 
remove unnecessary includes

4 years agostart of defining macros, etc. for log IDs
Alan T. DeKok [Thu, 21 Oct 2021 16:08:18 +0000 (12:08 -0400)] 
start of defining macros, etc. for log IDs

only for a few libraries, and not yet plumbed into anything else.

4 years agoremove util/base.h, and replace with specific files
Alan T. DeKok [Thu, 21 Oct 2021 16:06:13 +0000 (12:06 -0400)] 
remove util/base.h, and replace with specific files

4 years agorun min_includes.pl on these files
Alan T. DeKok [Thu, 21 Oct 2021 15:03:45 +0000 (11:03 -0400)] 
run min_includes.pl on these files

which removes extraneous includes.  Not that it does not reorder
the includes, or try to figure out which includes are necessary
for what.  That may be better done by something like
include-what-you-use, but the output of that tool requires
substantial work to understand.

4 years agofixes
Alan T. DeKok [Thu, 21 Oct 2021 15:02:43 +0000 (11:02 -0400)] 
fixes

4 years agoFix rlm_cache build issues (#4282)
Jorge Pereira [Thu, 21 Oct 2021 15:47:16 +0000 (12:47 -0300)] 
Fix rlm_cache build issues (#4282)

4 years agoFix rlm_sql_oracle minor issues (#4281)
Jorge Pereira [Thu, 21 Oct 2021 15:19:38 +0000 (12:19 -0300)] 
Fix rlm_sql_oracle minor issues (#4281)

4 years agoAdd Oracle session pool to rlm_sql oracle driver (#2868)
Robert Biktimirov [Thu, 21 Oct 2021 14:19:23 +0000 (17:19 +0300)] 
Add Oracle session pool to rlm_sql oracle driver (#2868)

Adding support for receiving connections using the built-in oracle client session mechanism.
Changing the function of preparing a query for execution from OCIStmtPrepare to OCIStmtPrepare2, since this function was deprecated beginning with Oracle Database 12c Release 2 (12.2).
This breaks the ability to use Oracle client below 10g

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
4 years agoAdd methods cache.{store,load,status,clear,ttl} for rlm_cache (#3013)
Jorge Pereira [Thu, 21 Oct 2021 14:17:55 +0000 (11:17 -0300)] 
Add methods cache.{store,load,status,clear,ttl} for rlm_cache (#3013)

* Add methods cache.{store,load,status,clear,ttl} for rlm_cache

Now the rlm_cache has the capability of handling the cache entries using
methods.

* Add tests for the methods

It adds tests for the new rlm_cache methods.

* Update the raddb/mods-available/cache

Add references related to the new rlm_cache methods.

4 years agoFix acct_unique policy (#4278) (#4280)
Jorge Pereira [Thu, 21 Oct 2021 14:17:48 +0000 (11:17 -0300)] 
Fix acct_unique policy (#4278) (#4280)

As the 'acct_unique' is setting the request:Tmp-String-9,
then we should unset it!

4 years agoattempts to allow for sorting of includes.
Alan T. DeKok [Thu, 21 Oct 2021 14:05:17 +0000 (10:05 -0400)] 
attempts to allow for sorting of includes.

it's likely that we still need manual edits after that, especially
for stuff in src/lib/util which does PRIVATE things.

4 years agotls/verify: implement allow_not_yet_valid_crl (#4181)
Youfu Zhang [Thu, 21 Oct 2021 14:13:32 +0000 (22:13 +0800)] 
tls/verify: implement allow_not_yet_valid_crl (#4181)

4 years agoAdd fr_heap_verify() and FR_HEAP_VERIFY() (#4274)
James Jones [Thu, 21 Oct 2021 14:07:49 +0000 (09:07 -0500)] 
Add fr_heap_verify() and FR_HEAP_VERIFY() (#4274)

FR_HEAP_VERIFY() invocations are added to fr_heap_test() to confirm
that the verify function works.

4 years agov4: Add additional LDAP tests (#4276)
Nick Porter [Thu, 21 Oct 2021 14:07:20 +0000 (15:07 +0100)] 
v4: Add additional LDAP tests (#4276)

* Add extra entry to test LDAP directory for escaped char matching

* Add tests of %{ldap: } xlat

* Tidy ldap map test - and allow for ldap search results not being fixed order

* Add extra ldap xlat tests

* ldap_debug option is only parsed in the global section

* Add meaningful libldap debugging to tests

* Add secondary LDAP server to CI tests

Allows for referral tests and xlats calling a different server to the
module configured one.

* Add subordinate dc to base.ldif for referral test

* Add tests for referral and requesting an alternate LDAP server

* Add extra LDAP entries for multiple hop referrals

* Test multiple hop LDAP referrals

* Tidy ldap auth test

* Tidy LDAP accounting test

* Tidy LDAP group tests

* "by anonymous auth" needs to be before any "to *" otherwise auth doesn't work

* Add LDAP bind authentication to tests

* LDAP map now returns correct codes

* Add SSL connection to test LDAP server

* Add test SSL LDAP server port to CI config

* Add a second ldap test module instance using SSL

* Add third instance of ldap module using StartTLS

* Add test using SSL connection to LDAP server

* Add test using StartTLS connection to LDAP server

4 years agoupdates based on better / saner fr_dns_packet_ok()
Alan T. DeKok [Thu, 21 Oct 2021 01:47:38 +0000 (21:47 -0400)] 
updates based on better / saner fr_dns_packet_ok()

4 years agoremove unused code
Alan T. DeKok [Thu, 21 Oct 2021 01:12:53 +0000 (21:12 -0400)] 
remove unused code

4 years agoupdate to handle more than 3 layers, and correctly edit the files
Alan T. DeKok [Thu, 21 Oct 2021 00:42:20 +0000 (20:42 -0400)] 
update to handle more than 3 layers, and correctly edit the files

with many more comments and better names

4 years agominimum includes
Alan T. DeKok [Wed, 20 Oct 2021 23:58:16 +0000 (19:58 -0400)] 
minimum includes

4 years agotypo
Alan T. DeKok [Wed, 20 Oct 2021 20:46:15 +0000 (16:46 -0400)] 
typo

4 years agomore cleanups and less work
Alan T. DeKok [Wed, 20 Oct 2021 19:22:28 +0000 (15:22 -0400)] 
more cleanups and less work

4 years agoremove more unneeded headers
Alan T. DeKok [Wed, 20 Oct 2021 15:06:58 +0000 (11:06 -0400)] 
remove more unneeded headers

and make sure that the necessary headers are included

4 years agoremove unnecessary includes
Alan T. DeKok [Wed, 20 Oct 2021 14:56:27 +0000 (10:56 -0400)] 
remove unnecessary includes

4 years agoclean up includes.
Alan T. DeKok [Wed, 20 Oct 2021 14:22:10 +0000 (10:22 -0400)] 
clean up includes.

tcp.h is used only in src/protocols/radius, and so shouldn't be in
src/lib/server, or in src/listen

many things in src/protocols included server/base.h, which makes
no sense, as nothing in them uses any of the server functions

many things included util/base.h, when they only used a tiny
subset of the headers.

Removing dozens of includes from each C file should speed up
compilation.

4 years agoinclude necessary header
Alan T. DeKok [Wed, 20 Oct 2021 14:21:25 +0000 (10:21 -0400)] 
include necessary header

4 years agolet's include all of the headers
Alan T. DeKok [Wed, 20 Oct 2021 14:15:18 +0000 (10:15 -0400)] 
let's include all of the headers

4 years agoupdate, and don't process files repeatedly.
Alan T. DeKok [Wed, 20 Oct 2021 13:46:41 +0000 (09:46 -0400)] 
update, and don't process files repeatedly.

4 years agomove script makefiles to the scripts/ directory
Alan T. DeKok [Wed, 20 Oct 2021 13:23:08 +0000 (09:23 -0400)] 
move script makefiles to the scripts/ directory

4 years agoAdd option to exclude tag in decrypted pseudonym
Arran Cudbard-Bell [Tue, 19 Oct 2021 20:48:25 +0000 (15:48 -0500)] 
Add option to exclude tag in decrypted pseudonym

4 years agoAdd null to the type table so we can print it correctly
Arran Cudbard-Bell [Sat, 16 Oct 2021 03:24:38 +0000 (22:24 -0500)] 
Add null to the type table so we can print it correctly

Don't add cast attribute for "null"

4 years agoSome cosmetics around the scripts/util/pcap2decode-proto.py (#4260)
Jorge Pereira [Tue, 19 Oct 2021 14:41:19 +0000 (11:41 -0300)] 
Some cosmetics around the scripts/util/pcap2decode-proto.py (#4260)

4 years agotypo
Alan T. DeKok [Mon, 18 Oct 2021 19:16:06 +0000 (15:16 -0400)] 
typo

4 years agoManual merge of #4260
Alan T. DeKok [Mon, 18 Oct 2021 18:33:17 +0000 (14:33 -0400)] 
Manual merge of #4260

Packets from https://github.com/the-tcpdump-group/tcpdump/tree/master/tests/dns-badcookie.pcap

4 years agoensure it has_length
Alan T. DeKok [Mon, 18 Oct 2021 18:29:27 +0000 (14:29 -0400)] 
ensure it has_length

4 years agomore checks on packet sanity
Alan T. DeKok [Mon, 18 Oct 2021 18:27:52 +0000 (14:27 -0400)] 
more checks on packet sanity

4 years agomore errors and more pointer validation
Alan T. DeKok [Sat, 16 Oct 2021 20:49:26 +0000 (16:49 -0400)] 
more errors and more pointer validation

4 years agoadd finer-grained errors
Alan T. DeKok [Sat, 16 Oct 2021 20:32:39 +0000 (16:32 -0400)] 
add finer-grained errors

4 years agov4: Fixes for tls and sasl LDAP connections (#4275)
Nick Porter [Mon, 18 Oct 2021 13:10:09 +0000 (14:10 +0100)] 
v4: Fixes for tls and sasl LDAP connections (#4275)

* Free old result before the new one is fetched, not after

* Zero timeout actually causes async connections to hang

* Handle fd discovery for sasl and start_tls the same as simple bind

* Interactive SASL callback needs to set lengths on replies

* Better SASL debug message - if we already have a result then we're continuing

* bind_ctx is parented off the connection - so signalling that the connection...

... is in error will do the free

* Add request to fr_ldap_referral_t

So we know what request to resume when the reply comes

* Use the correct freeing routine for berval

4 years agofix errors
Alan T. DeKok [Fri, 15 Oct 2021 18:58:35 +0000 (14:58 -0400)] 
fix errors

4 years agobetter sanity checker for DNS packets
Alan T. DeKok [Fri, 15 Oct 2021 18:36:25 +0000 (14:36 -0400)] 
better sanity checker for DNS packets

4 years agomake fr_dns_ok() return a reason why the packet is bad
Alan T. DeKok [Fri, 15 Oct 2021 17:32:50 +0000 (13:32 -0400)] 
make fr_dns_ok() return a reason why the packet is bad

and push that through the rest of the code, and the test cases

4 years agofuzzer-fetch-artifacts: Align with artifact name and contents; better usage (#4271)
Terry Burton [Fri, 15 Oct 2021 17:14:44 +0000 (18:14 +0100)] 
fuzzer-fetch-artifacts: Align with artifact name and contents; better usage (#4271)

4 years agoUse the same SBUFF init macro as dbuffs
Arran Cudbard-Bell [Fri, 15 Oct 2021 15:02:01 +0000 (10:02 -0500)] 
Use the same SBUFF init macro as dbuffs

Add more macro options

4 years agoUse the same macro names as dbuffs
Arran Cudbard-Bell [Fri, 15 Oct 2021 14:24:58 +0000 (09:24 -0500)] 
Use the same macro names as dbuffs

4 years agoCI: add Rocky 8 in prep for CentOS 8 EOL
Matthew Newton [Fri, 15 Oct 2021 11:32:07 +0000 (12:32 +0100)] 
CI: add Rocky 8 in prep for CentOS 8 EOL

4 years agoYAML shell scripts are stupid. GNU make is evil, but functional
Alan T. DeKok [Fri, 15 Oct 2021 12:10:49 +0000 (08:10 -0400)] 
YAML shell scripts are stupid.  GNU make is evil, but functional

4 years agonope.
Alan T. DeKok [Fri, 15 Oct 2021 12:06:18 +0000 (08:06 -0400)] 
nope.

whoever decided to use YAML for shell scripts is an idiot.

4 years agoone more try to make the magic github workers happy?
Alan T. DeKok [Fri, 15 Oct 2021 12:04:39 +0000 (08:04 -0400)] 
one more try to make the magic github workers happy?

4 years agono need to dump out the entire fuzzing to the main actions log
Alan T. DeKok [Fri, 15 Oct 2021 11:52:56 +0000 (07:52 -0400)] 
no need to dump out the entire fuzzing to the main actions log

4 years agoRevert "no need to dump out the entire fuzzing to the main actions log"
Alan T. DeKok [Fri, 15 Oct 2021 11:55:23 +0000 (07:55 -0400)] 
Revert "no need to dump out the entire fuzzing to the main actions log"

This reverts commit 7b5697af0e1fa23898307c7514ce230c3964b561.

4 years agono need to dump out the entire fuzzing to the main actions log
Alan T. DeKok [Fri, 15 Oct 2021 11:52:56 +0000 (07:52 -0400)] 
no need to dump out the entire fuzzing to the main actions log

4 years agoldap: Don't leave the ldap handle's fd in the event loop when we're closing the conne...
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:47:45 +0000 (13:47 -0500)] 
ldap: Don't leave the ldap handle's fd in the event loop when we're closing the connection

4 years agoldap: Process all the attributes in the result, not just the first one
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:35:15 +0000 (13:35 -0500)] 
ldap: Process all the attributes in the result, not just the first one

4 years agoldap: Signalling the treq is complete is the _last_ thing we should do
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:09:55 +0000 (13:09 -0500)] 
ldap: Signalling the treq is complete is the _last_ thing we should do

4 years agoldap: Retry ldap_result if it's the first loop through the demuxer
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:02:50 +0000 (13:02 -0500)] 
ldap: Retry ldap_result if it's the first loop through the demuxer

...the demuxer was called for a reason.  It's unlikely we'd get a read notification on the socket and there _really_ be no result.

4 years agoldap: Slightly easier to parse message
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:02:07 +0000 (13:02 -0500)] 
ldap: Slightly easier to parse message

4 years agoldap: If the connection is bad, reconnect it
Arran Cudbard-Bell [Thu, 14 Oct 2021 18:01:22 +0000 (13:01 -0500)] 
ldap: If the connection is bad, reconnect it

4 years agoldap: The on close watcher should be oneshot
Arran Cudbard-Bell [Thu, 14 Oct 2021 17:43:26 +0000 (12:43 -0500)] 
ldap: The on close watcher should be oneshot

otherwise we accrue onclose watchers pointint to fr_ldap_connection_t that have been freed

4 years agoldap: It's fine if the request goes into the backlog
Arran Cudbard-Bell [Thu, 14 Oct 2021 17:42:47 +0000 (12:42 -0500)] 
ldap: It's fine if the request goes into the backlog

4 years agoldap: Remove ttrunk and request from fr_ldap_query_t as they're no longer needed
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:59:49 +0000 (10:59 -0500)] 
ldap: Remove ttrunk and request from fr_ldap_query_t as they're no longer needed

4 years agoldap: Move synchronous evaluation into fr_ldap_trunk_search and fr_ldap_trunk_modify
Arran Cudbard-Bell [Thu, 14 Oct 2021 19:48:19 +0000 (14:48 -0500)] 
ldap: Move synchronous evaluation into fr_ldap_trunk_search and fr_ldap_trunk_modify

4 years agoldap: Use query->treq->request in request_mux and request_demux
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:57:30 +0000 (10:57 -0500)] 
ldap: Use query->treq->request in request_mux and request_demux

4 years agoldap: Pass parameters to referal code explicitly
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:56:40 +0000 (10:56 -0500)] 
ldap: Pass parameters to referal code explicitly

4 years agoldap: Rename t to ttrunk in ldap_trunk_request_demux (to be consistent with everywher...
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:55:56 +0000 (10:55 -0500)] 
ldap: Rename t to ttrunk in ldap_trunk_request_demux (to be consistent with everywhere else)

4 years agoldap: Only do URL parsing when we're allocing ldap queries
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:54:26 +0000 (10:54 -0500)] 
ldap: Only do URL parsing when we're allocing ldap queries

4 years agoldap: Make ldap_query_timeout work for ldap queries without requests
Arran Cudbard-Bell [Thu, 14 Oct 2021 15:52:52 +0000 (10:52 -0500)] 
ldap: Make ldap_query_timeout work for ldap queries without requests