]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoclean up handling of := deletion
Alan T. DeKok [Sun, 24 Dec 2023 01:22:09 +0000 (20:22 -0500)] 
clean up handling of := deletion

2 years agodon't init the pairs, it's not needed
Alan T. DeKok [Sat, 23 Dec 2023 22:35:47 +0000 (17:35 -0500)] 
don't init the pairs, it's not needed

2 years agoclean up and simplify
Alan T. DeKok [Sat, 23 Dec 2023 19:50:14 +0000 (14:50 -0500)] 
clean up and simplify

along with notes that &foo[1].bar[2]... isn't supported.

and we should really move some of the functionality to the edit
code, except that the callers (rlm_files and rlm_sql) don't expect
this function to return UNLANG_ACTION_PUSHED_CHILD

2 years agois RHS of struct assignment is xlat, cast it to a string
Alan T. DeKok [Sat, 23 Dec 2023 19:48:55 +0000 (14:48 -0500)] 
is RHS of struct assignment is xlat, cast it to a string

so that radius_legacy_map_apply() doesn't have to do much else

2 years agore-add support for nested attributes via ".foo" notation
Alan T. DeKok [Sat, 23 Dec 2023 14:24:47 +0000 (09:24 -0500)] 
re-add support for nested attributes via ".foo" notation

2 years agoprepare for nested maps in SQL
Alan T. DeKok [Fri, 22 Dec 2023 14:57:43 +0000 (09:57 -0500)] 
prepare for nested maps in SQL

the radius_legacy_map_apply() function doesn't support them yet,
but that's no longer difficult.

2 years agoBroken link in unlang doc
James Jones [Thu, 21 Dec 2023 20:04:50 +0000 (14:04 -0600)] 
Broken link in unlang doc

builtin.adoc is in the same directory as function.adoc

2 years agoName only attributes can be encoded as per commit 7f9e643e4e6b3ad7
Nick Porter [Fri, 22 Dec 2023 10:18:10 +0000 (10:18 +0000)] 
Name only attributes can be encoded as per commit 7f9e643e4e6b3ad7

2 years agoLDAP sync cookies contain all contextCSN values separated by ';'
Nick Porter [Fri, 22 Dec 2023 10:13:23 +0000 (10:13 +0000)] 
LDAP sync cookies contain all contextCSN values separated by ';'

2 years ago-Wunused
Alan T. DeKok [Fri, 22 Dec 2023 01:26:47 +0000 (20:26 -0500)] 
-Wunused

2 years agoremove dead code after commit 742e7f9a7f662b0f
Alan T. DeKok [Fri, 22 Dec 2023 00:55:52 +0000 (19:55 -0500)] 
remove dead code after commit 742e7f9a7f662b0f

2 years agoremove dead code
Alan T. DeKok [Fri, 22 Dec 2023 00:54:23 +0000 (19:54 -0500)] 
remove dead code

2 years agoshut up spurious Coverity complaints
Alan T. DeKok [Fri, 22 Dec 2023 00:53:21 +0000 (19:53 -0500)] 
shut up spurious Coverity complaints

2 years agoensure talloc parenting is OK
Alan T. DeKok [Thu, 21 Dec 2023 17:46:55 +0000 (12:46 -0500)] 
ensure talloc parenting is OK

2 years agoclean up corner cases
Alan T. DeKok [Thu, 21 Dec 2023 16:39:40 +0000 (11:39 -0500)] 
clean up corner cases

we don't allow comparison or assignment operators in child maps.
the legacy map cmp / apply functions don't handle that.

we don't allow expandable strings on the LHS. The legacy map
functions don't handle that, either.

2 years agoTypo
James Jones [Thu, 21 Dec 2023 17:05:13 +0000 (11:05 -0600)] 
Typo

Corrects description of octal escape in unlang double quoted strings

2 years agomove exec to new radius_legacy_map_apply() API
Alan T. DeKok [Thu, 21 Dec 2023 15:59:04 +0000 (10:59 -0500)] 
move exec to new radius_legacy_map_apply() API

2 years agoupdate comment to refer to newer code
Alan T. DeKok [Thu, 21 Dec 2023 14:37:58 +0000 (09:37 -0500)] 
update comment to refer to newer code

2 years agoupdate code and documentation for structural attributes in "users"
Alan T. DeKok [Thu, 21 Dec 2023 14:34:53 +0000 (09:34 -0500)] 
update code and documentation for structural attributes in "users"

2 years agoRework base64 keyword test to use local variables
Nick Porter [Thu, 21 Dec 2023 14:06:36 +0000 (14:06 +0000)] 
Rework base64 keyword test to use local variables

2 years agoupdate for string expansions on RHS of SQL
Alan T. DeKok [Thu, 21 Dec 2023 12:56:10 +0000 (07:56 -0500)] 
update for string expansions on RHS of SQL

and add tests

2 years agoallow attribute references for SQL, too
Alan T. DeKok [Thu, 21 Dec 2023 12:17:56 +0000 (07:17 -0500)] 
allow attribute references for SQL, too

2 years agono reason to close the connection after 2 uses
Alan T. DeKok [Thu, 21 Dec 2023 12:17:29 +0000 (07:17 -0500)] 
no reason to close the connection after 2 uses

2 years agoadd "make doc.raddb" target to auto-generate raddb files
Alan T. DeKok [Thu, 21 Dec 2023 11:55:20 +0000 (06:55 -0500)] 
add "make doc.raddb" target to auto-generate raddb files

2 years agorefresh antora documentation
Matthew Newton [Thu, 21 Dec 2023 11:07:52 +0000 (11:07 +0000)] 
refresh antora documentation

2 years agoFix typos in scripts
Dimitri Papadopoulos [Thu, 21 Dec 2023 09:08:00 +0000 (10:08 +0100)] 
Fix typos in scripts

Misspellings found by codespell.

I have left out files that appear to have been generated, such as:
scripts/boiler.mk
which has been generated from:
https://github.com/dmoulding/boilermake

2 years agoFix typos in documentation
Dimitri Papadopoulos [Wed, 20 Dec 2023 20:59:22 +0000 (21:59 +0100)] 
Fix typos in documentation

Misspellings found by codespell.

2 years agoFix typos in raddb
Dimitri Papadopoulos [Thu, 21 Dec 2023 08:40:55 +0000 (09:40 +0100)] 
Fix typos in raddb

Misspellings found by codespell.

2 years agoFix typos in assorted build files
Dimitri Papadopoulos [Thu, 21 Dec 2023 09:46:35 +0000 (10:46 +0100)] 
Fix typos in assorted build files

Misspellings found by codespell.

I have left out generated files such as:
configure
debian/rules

2 years agoFix typos in man
Dimitri Papadopoulos [Thu, 21 Dec 2023 09:38:47 +0000 (10:38 +0100)] 
Fix typos in man

Misspellings found by codespell.

2 years agoFix typos in share/dictionary
Dimitri Papadopoulos [Thu, 21 Dec 2023 09:32:46 +0000 (10:32 +0100)] 
Fix typos in share/dictionary

Misspellings found by codespell.

2 years agotypo in prototype (#5236)
James Jones [Thu, 21 Dec 2023 03:54:38 +0000 (21:54 -0600)] 
typo in prototype (#5236)

No semantic difference, but once you see it you can't unsee it.

2 years agofix the Null pointer dereference: prefix (#5251)
zengwei2000 [Thu, 21 Dec 2023 03:51:03 +0000 (11:51 +0800)] 
fix the Null pointer dereference: prefix (#5251)

fix the Null pointer dereference: prefix

Signed-off-by: zengwei zengwei1@uniontech.com
Signed-off-by: zengwei zengwei1@uniontech.com
2 years agorevert recent changes
Alan T. DeKok [Thu, 21 Dec 2023 02:24:53 +0000 (21:24 -0500)] 
revert recent changes

until they can be addressed a different way

Commits f1f7f31b5fa15bc5a97bec2, and 182209360

2 years agotry to quiet scanner
Alan T. DeKok [Thu, 21 Dec 2023 01:16:05 +0000 (20:16 -0500)] 
try to quiet scanner

2 years agoreturn on error or correct parse. Ignore noop
Alan T. DeKok [Thu, 21 Dec 2023 00:59:18 +0000 (19:59 -0500)] 
return on error or correct parse.  Ignore noop

2 years agolist is only NULL when ctx is NULL
Alan T. DeKok [Wed, 20 Dec 2023 22:38:09 +0000 (17:38 -0500)] 
list is only NULL when ctx is NULL

2 years agostruct fixes for radius_legacy_map_apply()
Alan T. DeKok [Wed, 20 Dec 2023 22:33:52 +0000 (17:33 -0500)] 
struct fixes for radius_legacy_map_apply()

parse structs from RHS strings

and various other cleanups

relative attributes on multiple lines in SQL aren't supported.

inter-attribute copies are permitted for structural types

tests still need to be finalized

2 years agostart of allowing structural attributes in legacy pairmove
Alan T. DeKok [Wed, 20 Dec 2023 21:48:43 +0000 (16:48 -0500)] 
start of allowing structural attributes in legacy pairmove

2 years agomore sanity checks
Alan T. DeKok [Wed, 20 Dec 2023 21:47:36 +0000 (16:47 -0500)] 
more sanity checks

2 years agohoist run-time checks to tmpl_afrom_value_substr()
Alan T. DeKok [Wed, 20 Dec 2023 19:58:14 +0000 (14:58 -0500)] 
hoist run-time checks to tmpl_afrom_value_substr()

because the same logic has to run in multiple places

2 years agoEnsure we have a list
Nick Porter [Wed, 20 Dec 2023 17:22:53 +0000 (17:22 +0000)] 
Ensure we have a list

2 years agolimitations have mostly been removed
Alan T. DeKok [Wed, 20 Dec 2023 16:06:52 +0000 (11:06 -0500)] 
limitations have mostly been removed

2 years agore-enable nested (sort of)
Alan T. DeKok [Wed, 20 Dec 2023 15:41:40 +0000 (10:41 -0500)] 
re-enable nested (sort of)

for now, only create an empty structural attribute.  Don't parse
the RHS as a list of pairs.  Don't allow relative names like
".foo"

2 years agoupdate depdendicies so rlm_sql is rebuilt before running sql tests
Alan T. DeKok [Wed, 20 Dec 2023 15:34:18 +0000 (10:34 -0500)] 
update depdendicies so rlm_sql is rebuilt before running sql tests

2 years agorename for clarity
Alan T. DeKok [Wed, 20 Dec 2023 15:12:30 +0000 (10:12 -0500)] 
rename for clarity

2 years agoupdate to use maps instead of vps
Alan T. DeKok [Wed, 20 Dec 2023 15:05:35 +0000 (10:05 -0500)] 
update to use maps instead of vps

call map_afrom_fields() for the various SQL fields.

call radius_legacy_map_cmp() and radius_legacy_map_apply() to
do the actual work.

It does not currently handle nested attributes, so the nested
tests have been omitted.  It also needs some minor cleanups

2 years agoadd map_afrom_fields() which will be used by SQL
Alan T. DeKok [Wed, 20 Dec 2023 15:04:51 +0000 (10:04 -0500)] 
add map_afrom_fields() which will be used by SQL

2 years agoif we can't find the vp, add it when requested
Alan T. DeKok [Wed, 20 Dec 2023 14:12:12 +0000 (09:12 -0500)] 
if we can't find the vp, add it when requested

2 years agoleave fewer unresolved tmpls at runtime
Alan T. DeKok [Wed, 20 Dec 2023 14:10:25 +0000 (09:10 -0500)] 
leave fewer unresolved tmpls at runtime

If it's runtime, then we know an enum name can't possibly match
at some point in the future.  We we just parse it now as the
expected data type.

2 years agore-add !* and =* for backwards compatibility
Alan T. DeKok [Tue, 19 Dec 2023 19:47:04 +0000 (14:47 -0500)] 
re-add !* and =* for backwards compatibility

2 years agouse consistent filenames
Alan T. DeKok [Tue, 19 Dec 2023 15:04:24 +0000 (10:04 -0500)] 
use consistent filenames

2 years agoauto-link files in doc/antora
Alan T. DeKok [Tue, 19 Dec 2023 14:05:16 +0000 (09:05 -0500)] 
auto-link files in doc/antora

so that the input file can give the full filename, but the asciidoc
files contain a proper antora xref link

2 years agoupdate and clarify the documentation
Alan T. DeKok [Tue, 19 Dec 2023 13:30:12 +0000 (08:30 -0500)] 
update and clarify the documentation

2 years agoconfigure: Fix type of argument to backtrace_symbols
Florian Weimer [Tue, 19 Dec 2023 06:56:42 +0000 (07:56 +0100)] 
configure: Fix type of argument to backtrace_symbols

The backtrace_symbols function expects a pointer to an array of
void * values, not a pointer to an array of a single element.
Removing the address operator ensures that the right type is used.

This avoids an unconditional failure of this probe with compilers
that treat incompatible pointer types as a compilation error.

2 years agoRemove man page from RHEL packaging
Nick Porter [Tue, 19 Dec 2023 08:02:14 +0000 (08:02 +0000)] 
Remove man page from RHEL packaging

2 years agoadd new-style documentation, and remove the old docs
Alan T. DeKok [Tue, 19 Dec 2023 01:43:36 +0000 (20:43 -0500)] 
add new-style documentation, and remove the old docs

2 years agoadd notes on automatic casting
Alan T. DeKok [Tue, 19 Dec 2023 01:14:10 +0000 (20:14 -0500)] 
add notes on automatic casting

2 years ago<cast> is not supported
Alan T. DeKok [Mon, 18 Dec 2023 23:57:31 +0000 (18:57 -0500)] 
<cast> is not supported

2 years agoadd more data types to htrie hint
Alan T. DeKok [Mon, 18 Dec 2023 23:14:45 +0000 (18:14 -0500)] 
add more data types to htrie hint

2 years agomove regex comparisons to calc.c code
Alan T. DeKok [Mon, 18 Dec 2023 22:28:33 +0000 (17:28 -0500)] 
move regex comparisons to calc.c code

2 years agodon't use stack-local buffer
Alan T. DeKok [Mon, 18 Dec 2023 21:11:10 +0000 (16:11 -0500)] 
don't use stack-local buffer

2 years agoAvoid spurious debug output
Nick Porter [Mon, 18 Dec 2023 15:33:44 +0000 (15:33 +0000)] 
Avoid spurious debug output

2 years agouse cast instead of copy
Alan T. DeKok [Mon, 18 Dec 2023 14:19:09 +0000 (09:19 -0500)] 
use cast instead of copy

which allows us to copy differing src/dst types

2 years agohoist legacy map comparison code to pairmove.c
Alan T. DeKok [Mon, 18 Dec 2023 13:48:44 +0000 (08:48 -0500)] 
hoist legacy map comparison code to pairmove.c

and add support for more functionality:

* we call calc cmp functions, not value cmp functions, so that
  comparisons of different types can be automatically upcast

* xlats are now supported again

* inter-attribute comparisons are now supported

2 years ago%<alnum> is the start of a function - so use %% for literal %
Nick Porter [Mon, 18 Dec 2023 12:13:32 +0000 (12:13 +0000)] 
%<alnum> is the start of a function - so use %% for literal %

2 years agoxlat args are static
Nick Porter [Mon, 18 Dec 2023 11:22:40 +0000 (11:22 +0000)] 
xlat args are static

2 years agoComplete 3gpp_pseudonym -> 3gpp_temporary_id
Nick Porter [Mon, 18 Dec 2023 11:20:24 +0000 (11:20 +0000)] 
Complete 3gpp_pseudonym -> 3gpp_temporary_id

2 years agoXlats can begin with digits (e.g. %3gpp_...)
Nick Porter [Mon, 18 Dec 2023 11:01:04 +0000 (11:01 +0000)] 
Xlats can begin with digits (e.g. %3gpp_...)

2 years agoAdd fr_sbuff_is_alnum
Nick Porter [Mon, 18 Dec 2023 10:57:46 +0000 (10:57 +0000)] 
Add fr_sbuff_is_alnum

2 years ago-Wunused
Alan T. DeKok [Mon, 18 Dec 2023 01:06:30 +0000 (20:06 -0500)] 
-Wunused

2 years agotypo
Alan T. DeKok [Mon, 18 Dec 2023 00:52:25 +0000 (19:52 -0500)] 
typo

2 years agoadd expansion of RHS for reply items
Alan T. DeKok [Mon, 18 Dec 2023 00:38:18 +0000 (19:38 -0500)] 
add expansion of RHS for reply items

2 years agoAdd more functionality.
Alan T. DeKok [Mon, 18 Dec 2023 00:09:32 +0000 (19:09 -0500)] 
Add more functionality.

Allow inter-attribute comparisons in the "users" file.

Allow list references in the reply list.

2 years agoverify that the RHS is static data
Alan T. DeKok [Sun, 17 Dec 2023 23:52:10 +0000 (18:52 -0500)] 
verify that the RHS is static data

2 years agomake sure to handle nested, too
Alan T. DeKok [Sun, 17 Dec 2023 23:14:41 +0000 (18:14 -0500)] 
make sure to handle nested, too

and add tests so that everything is parented correctly

2 years agofix ordering issues by reordering the editing list
Alan T. DeKok [Sun, 17 Dec 2023 23:06:47 +0000 (18:06 -0500)] 
fix ordering issues by reordering the editing list

The old radius_pairmove() function went through a lot of work to
avoid deleting attributes it just added.  For example, if it had
"add" followed by "delete", it wouldn't delete the attribute which
it had just added.

That functionality in rlm_files broke when the subnet functionality
was added, as the call to radius_pairmove() was placed inside
of the loop over maps, instead of after it.

Instead of going through all kinds of crazy work again at run time,
we instead just reorder the list when sanitizing it.

Deletions are placed first.  Then set (which is partially delete)
and then any other add operations.

That way we know that we are never deleting an attribute which we
just added.

2 years agostart of new pairmove API
Alan T. DeKok [Sun, 17 Dec 2023 22:38:02 +0000 (17:38 -0500)] 
start of new pairmove API

which will (eventually) take LHS / op / RHS, so that it can be
called from SQL with fields.

Update rlm_files to call the new API, so that it no longer creates
an intermediate VP, and just passes the map to the new API.

Update rlm_files to move the "update control" attributes to the
reply list.  The new API will look at the tmpl to find the correct
request and list context.

2 years agothe operator !* is not allowed as a reply item
Alan T. DeKok [Sun, 17 Dec 2023 19:00:40 +0000 (14:00 -0500)] 
the operator !* is not allowed as a reply item

the code silently ignored it, but the documentation said that
it's not allowed.

2 years agoOnly create map when update section exists
Nick Porter [Fri, 15 Dec 2023 21:11:54 +0000 (21:11 +0000)] 
Only create map when update section exists

2 years agoAllocate enough space for trailing NULL
Nick Porter [Fri, 15 Dec 2023 20:49:10 +0000 (20:49 +0000)] 
Allocate enough space for trailing NULL

2 years agoSimplify policy since failed edits will fail the section
Nick Porter [Fri, 15 Dec 2023 20:48:22 +0000 (20:48 +0000)] 
Simplify policy since failed edits will fail the section

2 years agocall_env->user_map is always populated
Nick Porter [Fri, 15 Dec 2023 16:56:13 +0000 (16:56 +0000)] 
call_env->user_map is always populated

2 years agoAlways expand LDAP update maps
Nick Porter [Fri, 15 Dec 2023 16:54:52 +0000 (16:54 +0000)] 
Always expand LDAP update maps

Ensuring that the `expanded` structure is correctly populated.

2 years agoUse CALL_ENV_FLAG_PARSE_MISSING for LDAP update sections
Nick Porter [Fri, 15 Dec 2023 16:51:34 +0000 (16:51 +0000)] 
Use CALL_ENV_FLAG_PARSE_MISSING for LDAP update sections

To ensure map_pair_list_t is always created

2 years agoAdd CALL_ENV_FLAG_PARSE_MISSING
Nick Porter [Fri, 15 Dec 2023 16:50:30 +0000 (16:50 +0000)] 
Add CALL_ENV_FLAG_PARSE_MISSING

For the case where the parser should still run for missing sections - to
run the parsing callback function.

2 years agoupdate docs
Alan T. DeKok [Fri, 15 Dec 2023 14:18:36 +0000 (09:18 -0500)] 
update docs

2 years agoallow "catch" to have multiple rcodes
Alan T. DeKok [Fri, 15 Dec 2023 02:20:24 +0000 (21:20 -0500)] 
allow "catch" to have multiple rcodes

2 years agoadd compilation for try / catch
Alan T. DeKok [Thu, 14 Dec 2023 21:43:59 +0000 (16:43 -0500)] 
add compilation for try / catch

along with docs and test cases

2 years agoimplement try / catch
Alan T. DeKok [Thu, 14 Dec 2023 18:01:57 +0000 (13:01 -0500)] 
implement try / catch

there's no compilation, but the intended functionality is present.

2 years agofinalize docs a bit
Alan T. DeKok [Thu, 14 Dec 2023 16:27:21 +0000 (11:27 -0500)] 
finalize docs a bit

2 years agoremove unnecessary fall-through
Alan T. DeKok [Thu, 14 Dec 2023 15:08:42 +0000 (10:08 -0500)] 
remove unnecessary fall-through

2 years agodon't reset module on resume.
Alan T. DeKok [Thu, 14 Dec 2023 15:07:42 +0000 (10:07 -0500)] 
don't reset module on resume.

it breaks the debug output

2 years agouncomment checks
Alan T. DeKok [Thu, 14 Dec 2023 14:11:01 +0000 (09:11 -0500)] 
uncomment checks

2 years agomake edits return fail when aborting the edit changes
Alan T. DeKok [Thu, 14 Dec 2023 13:53:08 +0000 (08:53 -0500)] 
make edits return fail when aborting the edit changes

make transactions default to "fail=1", which is much more useful
than bailing (for now).

remove auto-grouping of edits in a "group", and require the use
of "transaction"

Clean up the tests so that they pass under the new framework

update documentation to match

2 years agoset default action return codes to "fail=1"
Alan T. DeKok [Thu, 14 Dec 2023 02:02:53 +0000 (21:02 -0500)] 
set default action return codes to "fail=1"

because otherwise most tests will have to manually set an "actions"
block

2 years agocall cf_canonicalize_error() for consistency
Alan T. DeKok [Thu, 14 Dec 2023 00:42:37 +0000 (19:42 -0500)] 
call cf_canonicalize_error() for consistency

2 years agoadd cf_ wrapper for fr_canonicalize_error()
Alan T. DeKok [Thu, 14 Dec 2023 00:01:33 +0000 (19:01 -0500)] 
add cf_ wrapper for fr_canonicalize_error()

2 years agoadd the "transaction" keyword.
Alan T. DeKok [Wed, 13 Dec 2023 21:54:58 +0000 (16:54 -0500)] 
add the "transaction" keyword.

For now, the compile hack "all_edits" remains.  It should be
removed once the tests have been updated to use transactions

2 years agodocument priorities
Alan T. DeKok [Wed, 13 Dec 2023 15:20:12 +0000 (10:20 -0500)] 
document priorities