]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Nick Porter [Thu, 18 Jan 2024 17:57:36 +0000 (17:57 +0000)]
Reduce boilerplate
Nick Porter [Thu, 18 Jan 2024 17:56:15 +0000 (17:56 +0000)]
Remove legacy sqlippool single letter expansions
Nick Porter [Thu, 18 Jan 2024 17:43:36 +0000 (17:43 +0000)]
Ensure IP updated is from the correct pool
In case IPs exist in more than one pool.
Nick Porter [Thu, 18 Jan 2024 17:38:51 +0000 (17:38 +0000)]
Remove use of %I expansion from sqlippool queries
Nick Porter [Thu, 18 Jan 2024 17:03:06 +0000 (17:03 +0000)]
sqlite3_prepare functions prepare only the next query in the string
and return a pointer to the character after what was parsed - so this
provides a more robust method of parsing the SQL to execute than simply
looking for ';' followed by '\n' or '\0'.
E.g. if there are comments which end the line with a ';' that fails with
the old parsing.
In addition, if there were ';' in data inside a string, the previous
parsing would have thrown away the portion of the string before that.
Nick Porter [Thu, 18 Jan 2024 10:07:48 +0000 (10:07 +0000)]
Use method names consistent with rlm_redis_ippool
Nick Porter [Thu, 18 Jan 2024 10:06:16 +0000 (10:06 +0000)]
Ensure values are strings before attempting SQL escaping
Alan T. DeKok [Thu, 18 Jan 2024 17:51:50 +0000 (12:51 -0500)]
always set event list. Should help with #5270
Alan T. DeKok [Thu, 18 Jan 2024 16:29:51 +0000 (11:29 -0500)]
add FreeRADIUS VSA for Acct-Unique-Session-Id
James Jones [Tue, 31 Oct 2023 17:22:01 +0000 (12:22 -0500)]
Hoist some fr_radius_ok() calls above decode() (CID #
1544988 , #
1503910 )
This should make show coverity that the packet and length are
validated before being passed to decode().
James Jones [Tue, 7 Nov 2023 18:54:54 +0000 (12:54 -0600)]
Tweak mod_read() range check on packet code (CID #
1419883 ?)
buffer[0] is used as index into fr_radius_packet_names[], so
allowing FR_PACKET_CODE_MAX will fall off the end. This may
placate coverity, but I believe it is needed in any case.
James Jones [Wed, 8 Nov 2023 22:29:49 +0000 (16:29 -0600)]
Make IN_RANGE_INTEGER_*() nontrivial iff it can actually fail (CID #
1445201 )
The range check can only fail if PTRDIFF_MAX < INT64_MAX. Since
that's not the case for the Coverity run, you get a defect of the
result_independent_of_operands flavor, just like the range checks
for fr_sbuff_out_[u]int64() used to.
The floating point version, I believe, will notice +/-infinity
and denormalized numbers, so Coverity wouldn't complain about it.
James Jones [Mon, 4 Dec 2023 19:02:21 +0000 (13:02 -0600)]
Start converting remaining unlang function calls to new syntax
James Jones [Tue, 17 Oct 2023 20:33:00 +0000 (15:33 -0500)]
Try to make coverity recognize range check on len (CID #
1448182 )
James Jones [Thu, 5 Oct 2023 18:45:42 +0000 (13:45 -0500)]
Deal with remaining toctou defect (CID #
1503910 )
Fabrice Fontaine [Thu, 11 Jan 2024 16:38:41 +0000 (17:38 +0100)]
src/modules/rlm_python: fix build with -Ofast
Stripping logic wrongly translates -Ofast into ast resulting in the
following build failure:
configure: /home/fabrice/buildroot/output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/bin/python3-config's cflags were "-I/home/fabrice/buildroot/output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/python3.11 -I/home/fabrice/buildroot/output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/python3.11 -Wsign-compare -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Ofast -g0 -D_FORTIFY_SOURCE=2 -DNDEBUG -g -fwrapv -O3 -Wall"
configure: Sanitized cflags were " -isystem/home/fabrice/buildroot/output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/python3.11 -isystem/home/fabrice/buildroot/output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/python3.11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ast -D_FORTIFY_SOURCE=2 -fwrapv "
[...]
powerpc64-buildroot-linux-gnu-gcc.br_real: error: ast: linker input file not found: No such file or directory
Fixes:
- http://autobuild.buildroot.org/results/
904c43241b99a8d848c1891cb5af132a291311b4
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Arran Cudbard-Bell [Wed, 17 Jan 2024 17:41:40 +0000 (11:41 -0600)]
Setting local variables from mapping sections does seem to work...
Alan T. DeKok [Wed, 17 Jan 2024 02:20:14 +0000 (21:20 -0500)]
lowercase. Manual port of
8f4fcd3dc4
James Jones [Thu, 11 Jan 2024 20:25:20 +0000 (14:25 -0600)]
Quote parameter of ldap.memberof
James Jones [Fri, 12 Jan 2024 21:30:08 +0000 (15:30 -0600)]
Attempt to fix test_condition_levels_max() issue
test_condition_levels_max() seemingly randomly fails the check for
preq_a->{completed, freed} being true. It happens to work locally,
so submitting to try to provoke it again.
Previous trunk tests needed virtual time to pass to work, so we're
trying that here.
James Jones [Mon, 27 Nov 2023 20:19:23 +0000 (14:19 -0600)]
Annotate return when exfile_open() fails (CID #
1206498 , #
1206499 )
Unfortunately, this is in the callers of exfile_open(), not
exfile_open() itself. Coverity doesn't notice that the mutex
is unlocked in exfile_open() if it fails, and we haven't been
able to model it, hence the annotations.
James Jones [Mon, 27 Nov 2023 19:52:00 +0000 (13:52 -0600)]
Annotate missing unlock in connection_spawn() (CID #
1414434 )
Coverity insists on unlocking mutexes in the same function
invocation the lock occurs in, but there are times when you
want exclusive use of a resource and thus lock it on allocation
and free on release, hence the annotation.
James Jones [Thu, 16 Nov 2023 20:42:44 +0000 (14:42 -0600)]
Revise a couple of uses of FR_TYPE_STRUCTURAL
FR_TYPE_STRUCTURAL has a name of the same form as the values of
fr_type_t, but is carefully #defined so it can appear in a switch
statement looking like a single value but underneath expanding to
multiple cases, making some of its uses counterintuitive.
Alan T. DeKok [Mon, 15 Jan 2024 18:53:15 +0000 (13:53 -0500)]
add missing '}'. Fixes #5264
Nick Porter [Fri, 12 Jan 2024 14:53:56 +0000 (14:53 +0000)]
More Tmp- attribute removal from tests
Nick Porter [Fri, 12 Jan 2024 12:23:34 +0000 (12:23 +0000)]
Remove Tmp- attributes from unit tests
Nick Porter [Thu, 11 Jan 2024 18:27:47 +0000 (18:27 +0000)]
Use triggers to detect readiness for LDAP sync tests
Already working for rfc4533 - no reason they should have issues for
other directories.
Nick Porter [Thu, 11 Jan 2024 17:48:10 +0000 (17:48 +0000)]
Better failure messages
Nick Porter [Thu, 11 Jan 2024 17:46:04 +0000 (17:46 +0000)]
Remove Tmp- attributes from LDAP sync tests
Nick Porter [Thu, 11 Jan 2024 17:42:56 +0000 (17:42 +0000)]
Minimise number of LDAP connections starting
Nick Porter [Thu, 11 Jan 2024 17:42:11 +0000 (17:42 +0000)]
Add cookie to LDAP sync start debug
Alan T. DeKok [Thu, 11 Jan 2024 16:27:06 +0000 (11:27 -0500)]
add "-t timeout" to radsniff
So that it will exit cleanly after a given timeout
Alan T. DeKok [Thu, 11 Jan 2024 14:06:27 +0000 (09:06 -0500)]
unix sockets need permissions, uid, and gid
Arran Cudbard-Bell [Thu, 11 Jan 2024 15:10:40 +0000 (10:10 -0500)]
'by' is not a name component
Nick Porter [Thu, 11 Jan 2024 11:21:10 +0000 (11:21 +0000)]
Assign tmpl on heap for async expansion
Nick Porter [Thu, 11 Jan 2024 10:44:28 +0000 (10:44 +0000)]
Fix ldap-setup CI script
Arran Cudbard-Bell [Wed, 10 Jan 2024 22:27:01 +0000 (17:27 -0500)]
Decrease trunk management verbosity
Alan T. DeKok [Wed, 10 Jan 2024 22:24:41 +0000 (17:24 -0500)]
add more debugging
Alan T. DeKok [Wed, 10 Jan 2024 14:48:52 +0000 (09:48 -0500)]
use type (SOCK_STREAM or SOCK_DGRAM) instead of IPPROTO
fr_socket_t can allegedly describe unix sockets. So let's get
started down that path.
Alan T. DeKok [Wed, 10 Jan 2024 13:05:05 +0000 (08:05 -0500)]
we can transition init -> connected
for connected datagram sockets, connect() generally returns "OK"
immediately.
Arran Cudbard-Bell [Wed, 10 Jan 2024 20:58:35 +0000 (15:58 -0500)]
Missing cast
Arran Cudbard-Bell [Wed, 10 Jan 2024 20:55:42 +0000 (15:55 -0500)]
RPM Builder gets the deps wrong for openldap-ltb
Arran Cudbard-Bell [Wed, 10 Jan 2024 20:50:01 +0000 (15:50 -0500)]
Add support for escaping call_env results
Add async support to rlm_linelog
Allow call_env code to expand the header instead of doing it the legacy way
Ass escaping back
Arran Cudbard-Bell [Thu, 14 Dec 2023 04:00:57 +0000 (22:00 -0600)]
Stop processing isn't really correct here, and leads to spurious errors
Alan T. DeKok [Wed, 10 Jan 2024 00:01:26 +0000 (19:01 -0500)]
don't use extra comma
Alan T. DeKok [Tue, 9 Jan 2024 23:48:09 +0000 (18:48 -0500)]
add MS-CHAP-Use-NTLM-Auth := Auto
Nick Porter [Tue, 9 Jan 2024 17:11:22 +0000 (17:11 +0000)]
Set copy_on_update for redis_ippool tests
Works fine with tests now - and should be tested as it's the module
default.
Nick Porter [Tue, 9 Jan 2024 16:47:26 +0000 (16:47 +0000)]
Add tests of linelog failure paths
Nick Porter [Tue, 9 Jan 2024 16:34:13 +0000 (16:34 +0000)]
Use call_env for linelog format / reference tmpls
Alan T. DeKok [Tue, 9 Jan 2024 13:48:10 +0000 (08:48 -0500)]
use $< and $@ for simplicity
Alan T. DeKok [Tue, 9 Jan 2024 13:25:02 +0000 (08:25 -0500)]
Add group read permissions for certificates.
Manual port of
29add13
Recent versions of OpenSSL appear to create keys with owner-only
permissions. Allow owning group to read the created default files
in raddb/certs, so that they stay the same as with older OpenSSL, and
that the server can read its key, and the p12 / pem files.
Nick Porter [Tue, 9 Jan 2024 13:57:53 +0000 (13:57 +0000)]
Rearrange exec_timeout() to keep consistent error message
Nick Porter [Tue, 9 Jan 2024 11:49:49 +0000 (11:49 +0000)]
Install libyubikey for MacOS and FreeBSD tests
Nick Porter [Tue, 9 Jan 2024 11:02:27 +0000 (11:02 +0000)]
Correct debug macro
Nick Porter [Tue, 9 Jan 2024 11:01:53 +0000 (11:01 +0000)]
Add test of Yubikey decrypt
Nick Porter [Tue, 9 Jan 2024 11:01:01 +0000 (11:01 +0000)]
Attributes marked as secret are automatically hidden
Nick Porter [Tue, 9 Jan 2024 10:59:33 +0000 (10:59 +0000)]
Yubikey attributes are nested
Nick Porter [Tue, 9 Jan 2024 10:59:02 +0000 (10:59 +0000)]
Mark selected Yukikey attributes as secret
Nick Porter [Tue, 9 Jan 2024 10:58:15 +0000 (10:58 +0000)]
Update yukikey sample module to refelect nested attribute names
Nick Porter [Mon, 8 Jan 2024 12:35:35 +0000 (12:35 +0000)]
Remove Tmp- attributes from remaining module tests
Nick Porter [Mon, 8 Jan 2024 12:35:16 +0000 (12:35 +0000)]
Remove Tmp- attributes from perl module tests
And re-enable with nested attribute check temporarily disabled.
Nick Porter [Mon, 8 Jan 2024 12:34:11 +0000 (12:34 +0000)]
Remove Tmp- attributes from rest module tests
Nick Porter [Mon, 8 Jan 2024 11:48:34 +0000 (11:48 +0000)]
Remove Tmp- attributes from ldap module tests
Nick Porter [Mon, 8 Jan 2024 11:48:09 +0000 (11:48 +0000)]
Remove Tmp- attributes from json module tests
Nick Porter [Mon, 8 Jan 2024 11:46:24 +0000 (11:46 +0000)]
Remove Tmp- attributes from exec module tests
Nick Porter [Mon, 8 Jan 2024 11:45:19 +0000 (11:45 +0000)]
Remove Tmp- attributes from eap_sim module tests
Nick Porter [Mon, 8 Jan 2024 11:44:58 +0000 (11:44 +0000)]
Remove Tmp- attributes from client module tests
Nick Porter [Mon, 8 Jan 2024 11:41:12 +0000 (11:41 +0000)]
Remove Tmp- attributes from cipher module tests
Nick Porter [Fri, 5 Jan 2024 16:48:24 +0000 (16:48 +0000)]
Remove Tmp- attributes from linelog module tests
Nick Porter [Fri, 5 Jan 2024 16:47:19 +0000 (16:47 +0000)]
Remove Tmp- attributes from yubikey module tests
Nick Porter [Fri, 5 Jan 2024 15:59:35 +0000 (15:59 +0000)]
Don't run redis tests if redis doesn't start
Nick Porter [Fri, 5 Jan 2024 15:44:33 +0000 (15:44 +0000)]
Remove Tmp- attributes from unbound module tests
And check for multiple return values now they are supported
Nick Porter [Fri, 5 Jan 2024 14:28:22 +0000 (14:28 +0000)]
Remove Tmp- attributes from SQL module tests
Nick Porter [Fri, 5 Jan 2024 14:27:58 +0000 (14:27 +0000)]
Remove Tmp- attributes from cache module tests
Alan T. DeKok [Fri, 5 Jan 2024 15:29:31 +0000 (10:29 -0500)]
mash results into a string
as we can't do list comparisons. Perhaps we need to add that.
Alan T. DeKok [Fri, 5 Jan 2024 14:29:35 +0000 (09:29 -0500)]
more xlat cleanups
Alan T. DeKok [Fri, 5 Jan 2024 13:59:31 +0000 (08:59 -0500)]
If arguments contain comments, they need to be quoted
Alan T. DeKok [Fri, 5 Jan 2024 13:37:37 +0000 (08:37 -0500)]
pull in some changes from PR #5244
James Jones [Wed, 29 Nov 2023 22:54:39 +0000 (16:54 -0600)]
Typos
Nick Porter [Fri, 5 Jan 2024 11:57:37 +0000 (11:57 +0000)]
Remove Tmp-Group from keyword tests that don't use lists
Nick Porter [Fri, 5 Jan 2024 11:57:01 +0000 (11:57 +0000)]
Don't add data to pair that's been deleted
Nick Porter [Fri, 5 Jan 2024 11:09:20 +0000 (11:09 +0000)]
Remove Tmp- variables from redis ippool tests
Nick Porter [Fri, 5 Jan 2024 10:06:04 +0000 (10:06 +0000)]
Remove Tmp- from redis tests
Alan T. DeKok [Thu, 4 Jan 2024 22:54:52 +0000 (17:54 -0500)]
operations on NULL are invalid
Alan T. DeKok [Fri, 5 Jan 2024 00:08:16 +0000 (19:08 -0500)]
don't cast TO or FROM structural types
Alan T. DeKok [Thu, 4 Jan 2024 14:17:10 +0000 (09:17 -0500)]
repack structure for size
Alan T. DeKok [Thu, 4 Jan 2024 14:10:00 +0000 (09:10 -0500)]
add address family to fr_socket_t
AF_UNIX isn't an IPPROTO, so we can't use the proto field.
and AF_UNIX uses SOCK_STREAM instead of IPPROTO_TCP, and
SOCK_SEQPACKET instead of IPPROTO_UDP.
Note that SOCK_DGRAM is an unconnected, one-way unix socket!
Alan T. DeKok [Thu, 4 Jan 2024 14:00:32 +0000 (09:00 -0500)]
socket() is a function. Use another name
Nick Porter [Thu, 4 Jan 2024 14:27:15 +0000 (14:27 +0000)]
Revised sanity checking on local variable tmpls
Allows for real attributes inside a local variable group, but local
variables cannot have list modifiers
Nick Porter [Wed, 3 Jan 2024 15:06:30 +0000 (15:06 +0000)]
Handle cast when combo address type == destination type
Nick Porter [Wed, 3 Jan 2024 13:37:36 +0000 (13:37 +0000)]
Remove spurious warnings about ignoring values
Alan T. DeKok [Wed, 3 Jan 2024 14:25:47 +0000 (09:25 -0500)]
typo
Alan T. DeKok [Wed, 3 Jan 2024 14:17:52 +0000 (09:17 -0500)]
might as well support this, too
Alan T. DeKok [Wed, 3 Jan 2024 14:17:28 +0000 (09:17 -0500)]
allow cast from combo-ip and combo-ip-prefix to normal ip / prefix
Alan T. DeKok [Wed, 3 Jan 2024 14:17:11 +0000 (09:17 -0500)]
add missing return
Alan T. DeKok [Tue, 2 Jan 2024 01:25:53 +0000 (20:25 -0500)]
add AF to udpfromto_init()
to avoid getsockbyname() when it's not necessary
Nick Porter [Wed, 3 Jan 2024 09:27:52 +0000 (09:27 +0000)]
Replace Tmp- with local variables / real attributes in keyword tests
Local variables used where possible, real attributes where the tests are
about manipulation in lists.
Tmp-Group- is still in use.
Nick Porter [Tue, 2 Jan 2024 13:33:32 +0000 (13:33 +0000)]
Grouping edits is now done with transactions
github-actions[bot] [Wed, 3 Jan 2024 09:34:40 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Wed, 3 Jan 2024 09:34:34 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar