]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Nick Porter [Wed, 13 Apr 2022 09:30:27 +0000 (10:30 +0100)]
Define tests for RFC4533 LDAP server
Nick Porter [Wed, 13 Apr 2022 09:29:57 +0000 (10:29 +0100)]
Run tests on RFC4533 LDAP server
Nick Porter [Wed, 13 Apr 2022 09:25:40 +0000 (10:25 +0100)]
Add config for testing RFC4533 LDAP server
Nick Porter [Wed, 13 Apr 2022 09:25:02 +0000 (10:25 +0100)]
Define test.ldap_sync to run tests for all types of directory
Nick Porter [Thu, 21 Apr 2022 08:20:38 +0000 (09:20 +0100)]
Add syncprov overlay to test LDAP database
Nick Porter [Thu, 21 Apr 2022 08:20:13 +0000 (09:20 +0100)]
Re-order LDAP permissions
Nick Porter [Thu, 21 Apr 2022 08:19:38 +0000 (09:19 +0100)]
Remove un-needed database from test LDAP server
Nick Porter [Mon, 29 Aug 2022 07:16:05 +0000 (08:16 +0100)]
Check return of ber_scanf() CID #
1512416
Alan T. DeKok [Sun, 28 Aug 2022 21:35:18 +0000 (17:35 -0400)]
parital revert (again) because of ubsan issues
Alan T. DeKok [Sun, 28 Aug 2022 14:01:47 +0000 (10:01 -0400)]
add ungroup and use it
because %{request[*]} returns a group, as it really means
"all request attributes". We really want to have %{request.[*]},
but that is not yet supported
Alan T. DeKok [Sat, 27 Aug 2022 12:57:20 +0000 (08:57 -0400)]
change docs to deprecate "update"
Alan T. DeKok [Sat, 27 Aug 2022 12:52:18 +0000 (08:52 -0400)]
make prepend work, and update doecs and tests to match
Alan T. DeKok [Fri, 26 Aug 2022 13:56:12 +0000 (09:56 -0400)]
more "convert update"
Alan T. DeKok [Thu, 25 Aug 2022 21:23:34 +0000 (17:23 -0400)]
raw now works
Alan T. DeKok [Thu, 25 Aug 2022 20:39:57 +0000 (16:39 -0400)]
multi-line "if" works by magic
tho you can't (yet) put comments on a multiline "if" statement
Alan T. DeKok [Thu, 25 Aug 2022 14:30:04 +0000 (10:30 -0400)]
move peephole optimization to xlat_purify_op()
Nick Porter [Fri, 26 Aug 2022 17:40:35 +0000 (18:40 +0100)]
v4: Implement LDAP persistent search handling (#4455)
* Remove LDAP-Sync dictonary attrbutes not required
* Add ldap to list of protocols for auto-generated headers
* Add definition of internal packet types for LDAP sync messages
* Define process module for LDAP sync
* Define core structures for LDAP sync protocol
* Define parent listener for proto_ldap_sync
* Include proto_ldap_sync in build
* Add Directory-Root-DN to dictionary
* Enumerate dictionary values for LDAP Scope
* Define fr_app_io_t proto_ldap_sync_ldap and associated structures
* Allow socket listeners to have either an open or close callback
LDAP sync requires a very specific way to start up which results in the
socket listener not having an open callback.
* Define child fr_app_io_t for proto_ldap_sync
* Add functions to allocate and compare sync_state_t
* Add functions to send LDAP sync internal packets
* Define ldap_sync_conf_attr_add for building the list of attrs
* Define LDAP sync callbacks for RFC 4533 servers
* Define LDAP sync callbacks for Active Directory
* Parse LDAP filters for Active Directory
to compensate for Active Directory's limitation when performing
persistent searches.
* Evaluate LDAP filters against packets received from Active Directory
* Define LDAP sync callbacks for directories implementing persistent search
* Add proto_ldap_sync_ldap to build
* Remove old proto_ldap_sync module and fix sync_touch.mk
* Update sample ldap_sync site
Nick Porter [Fri, 26 Aug 2022 12:51:35 +0000 (13:51 +0100)]
Quiet clang scan
Nick Porter [Fri, 26 Aug 2022 08:10:23 +0000 (09:10 +0100)]
Define pair_append_by_tmpl_parent() - simple vp allocation from a tmpl_t
James Jones [Thu, 25 Aug 2022 20:46:22 +0000 (15:46 -0500)]
Convert one last memset to fr_value_box_copy_unsafe() (CID #
1508480 ) (#4694)
James Jones [Thu, 25 Aug 2022 20:46:03 +0000 (15:46 -0500)]
Annotate memmcpy() used to copy fr_pair_t (CID #
1508479 ) (#4695)
James Jones [Thu, 25 Aug 2022 20:45:51 +0000 (15:45 -0500)]
Annotate false positive tainted_argument (CID #
1419883 ) (#4696)
Coverity doesn't see that buffer[0] is checked twice, so
it can never be an invalid subscript for fr_packet_codes[].
James Jones [Thu, 25 Aug 2022 20:45:33 +0000 (15:45 -0500)]
Take out nonnull hint on _fr_dbuff_init() for coverity (CIDs below) (#4697)
Coverity assumes that the nonnull means we'll dereference the end
pointer... so leave it out when coverity runs.
CIDs:
1503895 ,
1503905 ,
1503907 ,
1503914 ,
1503915 ,
1503924
1503956 ,
1503970 ,
1503973 ,
1503979 ,
1503980 ,
1503988
1504000 ,
1504034 ,
1504035 ,
1504039 ,
1504040 ,
1504059
Nick Porter [Thu, 25 Aug 2022 14:59:24 +0000 (15:59 +0100)]
Shorten the name of the protocol encapsulation attribute
Nick Porter [Thu, 25 Aug 2022 15:01:49 +0000 (16:01 +0100)]
Make fr_internal_decode_list_dbuff simply decode as is
Any manipulation of the retrieved attributes should be done by the
caller
Nick Porter [Thu, 25 Aug 2022 15:01:03 +0000 (16:01 +0100)]
Make fr_internal_encode_list simply encode what is presented
Any wrapping of other protocols in the protocol encapsulation attribute
should be done by the caller
Nick Porter [Thu, 25 Aug 2022 14:58:06 +0000 (15:58 +0100)]
On RHEL >= 8 MySQL client libraries are in mysql-libs
Nick Porter [Wed, 24 Aug 2022 11:47:12 +0000 (12:47 +0100)]
fr_dlist_talloc_free_item returns previous item in list
So retain functionality for typed versions of the function.
Nick Porter [Thu, 25 Aug 2022 15:33:14 +0000 (16:33 +0100)]
Quiet clang scan
Alan T. DeKok [Thu, 25 Aug 2022 02:18:19 +0000 (22:18 -0400)]
cleanups for clang scan
which notices that the regex_rhs() function returns an error,
but for some reason assumes that it returns a positive number on
error.
Alan T. DeKok [Thu, 25 Aug 2022 00:27:38 +0000 (20:27 -0400)]
update message so that xlat-subst passes
and we get the real error from the underlying function, and
not the error from something else.
Alan T. DeKok [Wed, 24 Aug 2022 16:02:48 +0000 (12:02 -0400)]
remove filter { ... }
Which was added earlier in v4 development. No one uses it,
and we need to get rid of old-style update sections as soon as
possible.
Alan T. DeKok [Wed, 24 Aug 2022 15:57:54 +0000 (11:57 -0400)]
point to certificate documentation, too
Alan T. DeKok [Wed, 24 Aug 2022 15:50:48 +0000 (11:50 -0400)]
notes on where the new documentation is located
Alan T. DeKok [Wed, 24 Aug 2022 15:39:28 +0000 (11:39 -0400)]
regenerate from source raddb files
Alan T. DeKok [Wed, 24 Aug 2022 15:13:50 +0000 (11:13 -0400)]
peephole optimization for conditions
Alan T. DeKok [Tue, 23 Aug 2022 21:25:42 +0000 (17:25 -0400)]
peephole optimization for logical &&, ||
Alan T. DeKok [Tue, 23 Aug 2022 19:33:20 +0000 (15:33 -0400)]
simplifications
James Jones [Wed, 24 Aug 2022 22:02:12 +0000 (17:02 -0500)]
Annotate remaining false positives in sbuff_tests.c (CIDs below) (#4693)
CIDs: #
1503906 , #
1503912 , #
1504003 , #
1504019
coverity doesn't recognize that fr_sbuff_out_bstrncpy_exact() and
fr_sbuff_out_unescape_until() will always put something in the
output sbuffs, if only a NUL terminator.
James Jones [Wed, 24 Aug 2022 22:01:59 +0000 (17:01 -0500)]
Annotate false positive uninit (CID #
1504020 ) (#4692)
coverity doesn't realize that at this point ether is necessarily
initialized, with all the fr_base16_decode()s successful.
James Jones [Wed, 24 Aug 2022 22:01:46 +0000 (17:01 -0500)]
Silence coverity about fr_value_box_t assignment (CIDs below) (#4685)
CIDs: #
1508477 , #
1508480 , #
1508482 , #
1508484 , #
1508486
1508482 just uses an initializer. For the rest, we create an
always-inlined function, fr_value_box_copy_unsafe(), to simply
copy the raw bytes from one value box to another. Since it's
a function, not a macro, the annotation should work. Since what
fr_value_box_init() was doing didn't work, it too uses the
function (and we had to move the box-to-box copy declarations
and definitions so it would be visible in fr_value_box_init()).
James Jones [Wed, 24 Aug 2022 18:30:13 +0000 (13:30 -0500)]
Make use of the fr_nbo_to*() functions where possible (#4691)
It appears to appease coverity complaints about tainted data.
Jorge Pereira [Tue, 23 Aug 2022 17:40:36 +0000 (14:40 -0300)]
More "update {....}" to edit against raddb/sites-available/* (#4684)
Jorge Pereira [Tue, 23 Aug 2022 17:30:32 +0000 (14:30 -0300)]
doc: Fix typo (#4683)
James Jones [Tue, 23 Aug 2022 15:25:15 +0000 (10:25 -0500)]
Annotate tainted data (CID #
1455247 ) (#4686)
data, not *data, controls the loop in fr_radius_decode(). The packet
length is checked against byte-swapped data from the packet, but
discrepancies are errors, so it's not set to a tainted value.
James Jones [Tue, 23 Aug 2022 15:24:35 +0000 (10:24 -0500)]
Remove needless if (#4687)
There's no unused result--the comparison just checks slen, which is
used in the code startng with done:, which is always gone to.
Alan T. DeKok [Tue, 23 Aug 2022 13:59:09 +0000 (09:59 -0400)]
add support for mod (%)
Alan T. DeKok [Tue, 23 Aug 2022 13:25:58 +0000 (09:25 -0400)]
we now support native expressions in conditions
Alan T. DeKok [Tue, 23 Aug 2022 13:19:39 +0000 (09:19 -0400)]
we don't need an empty dependency
James Jones [Tue, 23 Aug 2022 14:48:42 +0000 (09:48 -0500)]
Correct vendor calculation typo (#4688)
Alan T. DeKok [Mon, 22 Aug 2022 22:09:55 +0000 (18:09 -0400)]
manually do the loops
because the previous code resulted in `EXPAND -> NULL`, and this
method doesn't
Alan T. DeKok [Mon, 22 Aug 2022 21:59:06 +0000 (17:59 -0400)]
print the tainted flag, and do better indentation
Alan T. DeKok [Mon, 22 Aug 2022 21:11:17 +0000 (17:11 -0400)]
let's be a little more forgiving about parsing conditions
Alan T. DeKok [Sun, 21 Aug 2022 14:03:51 +0000 (10:03 -0400)]
convert xlat-string to the new method
Previously "cast to string" was "print to string" for everything
except octets. For octets, it was "cast". That inconsistency
causes issues.
Now, "cast to string" is "print to string" for everything.
If the user wants to *convert* data to a string, the %{string:...}
function can be used.
Alan T. DeKok [Mon, 22 Aug 2022 14:54:56 +0000 (10:54 -0400)]
docs on ci-debug
Alan T. DeKok [Mon, 22 Aug 2022 14:11:01 +0000 (10:11 -0400)]
have ubsan print stack traces
Alan T. DeKok [Sat, 20 Aug 2022 13:06:33 +0000 (09:06 -0400)]
temporary migration tools
where we can enable / disable flatten / nested pairs at run time.
Arran Cudbard-Bell [Tue, 23 Aug 2022 00:20:47 +0000 (19:20 -0500)]
Tainted needs to be initialised
Nick Porter [Mon, 22 Aug 2022 14:25:02 +0000 (15:25 +0100)]
Correct test for building 2 leaf vps
Nick Porter [Mon, 22 Aug 2022 14:24:29 +0000 (15:24 +0100)]
Call tmpl_dcursor_build_init with correct args
Arran Cudbard-Bell [Mon, 22 Aug 2022 14:00:55 +0000 (09:00 -0500)]
Make the tmpl_dcursor_tests macros slightly less obscure...
Arran Cudbard-Bell [Mon, 22 Aug 2022 12:54:38 +0000 (07:54 -0500)]
Add TEST_CHECK_PAIR_NEQ
Alan T. DeKok [Sun, 21 Aug 2022 15:39:48 +0000 (11:39 -0400)]
temporarily use the old condition code
because the new one (as yet) does not purify complex conditions.
We could call xlat_purify() from compile.c, or just manually
check the || and && when parsing in xlat_expr.c
Alan T. DeKok [Sun, 21 Aug 2022 14:23:51 +0000 (10:23 -0400)]
if we set use_new_conditions, don't even parse the old ones
and remove the one test which no longer fails at load time.
The old code would check if the condition could at all be done,
such as assigning a value which is too large.
The old code would see that one side had a fixed data type, and
try to cast the other side to that data type. The new code does not
(as yet) do this
Alan T. DeKok [Sun, 21 Aug 2022 13:46:31 +0000 (09:46 -0400)]
check run-time variables for new conditions
and update the unit tests to use the new conditions, except for
a few cases which haven't yet been migrated.
Alan T. DeKok [Sun, 21 Aug 2022 13:45:27 +0000 (09:45 -0400)]
allow setting of options via the command line for migration
We need to have the variables set before parsing the configuration
files, so their configuration can't go into the files.
Alan T. DeKok [Sat, 20 Aug 2022 13:58:17 +0000 (09:58 -0400)]
we will need this after some cleanups
Alan T. DeKok [Sat, 20 Aug 2022 13:06:33 +0000 (09:06 -0400)]
temporary migration tools
where we can enable / disable flatten / nested pairs at run time.
Alan T. DeKok [Sat, 20 Aug 2022 13:02:42 +0000 (09:02 -0400)]
tests for flat / nested VSAs
Alan T. DeKok [Wed, 17 Aug 2022 18:19:11 +0000 (14:19 -0400)]
add fr_pair_dcursor_nested_init()
which takes a pair dcursor as input uctx, and iterates over that
to produce value-pairs.
This is needed by the xlat / edit code
Alan T. DeKok [Wed, 17 Aug 2022 18:01:15 +0000 (14:01 -0400)]
add fr_pair_dcursor_value_init()
which takes a pair_list_t, and then returns the relevant value-boxes
This is so that we can return the value-boxes to functions which
take a dcursor, and expect to see value-boxes out of it
Nick Porter [Fri, 19 Aug 2022 08:25:43 +0000 (09:25 +0100)]
Use TEST_CHECK_PAIR to improve test output
Nick Porter [Wed, 17 Aug 2022 18:10:38 +0000 (19:10 +0100)]
Add tests for fr_pair_append_by_da_parent()
Nick Porter [Thu, 4 Aug 2022 10:42:26 +0000 (11:42 +0100)]
Define fr_pair_append_by_parent_da() for automatic creation of nested pairs
plus macros for appending and populating pairs
Nick Porter [Thu, 18 Aug 2022 12:06:31 +0000 (13:06 +0100)]
Cast return value
Arran Cudbard-Bell [Thu, 18 Aug 2022 10:36:11 +0000 (17:36 +0700)]
Print out more about what we expected in the test
Arran Cudbard-Bell [Thu, 18 Aug 2022 06:30:19 +0000 (13:30 +0700)]
Add inverse of fr_pair_list_to_dlist
James Jones [Wed, 17 Aug 2022 18:00:14 +0000 (13:00 -0500)]
Annotate ifs that placate gcc but rile coverity (CID #
1504005 ) (#4681)
unlang_function_clear() has the warn_unused_result attribute,
hence the seemingly pointless if statements about which
coverity complains. Annotation should silence coverity.
Alan T. DeKok [Wed, 17 Aug 2022 15:59:08 +0000 (11:59 -0400)]
allow for and test &Foo := &bar[*]
Nick Porter [Wed, 17 Aug 2022 14:04:08 +0000 (15:04 +0100)]
Set path to use homebrew clang rather than Apple's version
Alan T. DeKok [Wed, 17 Aug 2022 12:41:55 +0000 (08:41 -0400)]
remove nested unions
compilers are too dumb to notice that flexible array members
are fine when there is no field which follows them.
Nick Porter [Wed, 17 Aug 2022 09:35:43 +0000 (10:35 +0100)]
No need to output receipt files when debugging module tests
Nick Porter [Thu, 4 Aug 2022 10:24:06 +0000 (11:24 +0100)]
Add fr_internal_decode_list_dbuff() to decode an entire list of attributes
Nick Porter [Thu, 4 Aug 2022 10:06:53 +0000 (11:06 +0100)]
Internal decoder should always build nested attribute structure for TLVs
Nick Porter [Thu, 4 Aug 2022 10:16:47 +0000 (11:16 +0100)]
Add use of Protocol-Encapsulation attribute to internal encoder
Nick Porter [Thu, 5 May 2022 10:46:04 +0000 (11:46 +0100)]
Define fr_internal_encode_list() to internally encode a fr_pair_list_t
Nick Porter [Wed, 17 Aug 2022 07:18:26 +0000 (08:18 +0100)]
Typos
Alan T. DeKok [Wed, 17 Aug 2022 01:11:52 +0000 (21:11 -0400)]
Revert "we don't need to mash everything to strings."
This reverts commit
5d227175ad3cf99db16180abf6e93db48220c591 .
until we get time to do a few more tests
Alan T. DeKok [Tue, 16 Aug 2022 23:59:42 +0000 (19:59 -0400)]
update after encoder change
Alan T. DeKok [Tue, 16 Aug 2022 22:19:05 +0000 (18:19 -0400)]
use utility functions instead of memcpy()
Alan T. DeKok [Tue, 16 Aug 2022 21:55:03 +0000 (17:55 -0400)]
more documentation updates
Alan T. DeKok [Tue, 16 Aug 2022 21:44:33 +0000 (17:44 -0400)]
rename the alias files to something which isn't stupid
Alan T. DeKok [Tue, 16 Aug 2022 21:31:00 +0000 (17:31 -0400)]
we don't need to mash everything to strings.
v4 supports bare
%{foo...}
which is better than
"%{foo...}"
Jorge Pereira [Tue, 16 Aug 2022 00:55:17 +0000 (21:55 -0300)]
More "update {....}" to edit against raddb/mods-*
Jorge Pereira [Tue, 16 Aug 2022 01:27:10 +0000 (22:27 -0300)]
More "update {....}" to edit against policy.d/*
Alan T. DeKok [Tue, 16 Aug 2022 20:41:02 +0000 (16:41 -0400)]
just use a different method of initialization. Helps with #4674
In all honesty, if there's no /dev/random on the system, we should
probably just call _exit(1).
Alan T. DeKok [Tue, 16 Aug 2022 19:21:44 +0000 (15:21 -0400)]
fix use of arg_cnt vs arg_len
James Jones [Tue, 16 Aug 2022 20:16:32 +0000 (15:16 -0500)]
Catch NULL return from fr_value_box_alloc() (CID #
1507889 ) (#4672)
James Jones [Tue, 16 Aug 2022 20:10:59 +0000 (15:10 -0500)]
Annotate false positive tainted_data on get_chunk() result (CIDs below) (#4671)
coverity doesn't realize the relation between node->bits and the
allocated space for node->trie.
CIDs: #
1503960 , #
1503982 , #
1504064
James Jones [Tue, 16 Aug 2022 20:10:39 +0000 (15:10 -0500)]
Annotate false positive on NUL termination (CID #
1504058 ) (#4669)
Coverity is faked out by check_library_exists(), which either
returns NULL (which the caller checks for) or returns a pointer
to a NUL-terminated string.