]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
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

2 years agoallow for nested edit lists
Alan T. DeKok [Tue, 12 Dec 2023 21:15:56 +0000 (16:15 -0500)] 
allow for nested edit lists

2 years agosplit out string functions into their own files
Alan T. DeKok [Tue, 12 Dec 2023 13:34:58 +0000 (08:34 -0500)] 
split out string functions into their own files

2 years agoclarify example
Alan T. DeKok [Tue, 12 Dec 2023 15:39:28 +0000 (10:39 -0500)] 
clarify example

2 years agonotes for the future for string casting
Alan T. DeKok [Tue, 12 Dec 2023 13:34:35 +0000 (08:34 -0500)] 
notes for the future for string casting

2 years agoAllow encoding name_only attributes if the data is going to be consumed internally
Arran Cudbard-Bell [Wed, 13 Dec 2023 20:13:50 +0000 (14:13 -0600)] 
Allow encoding name_only attributes if the data is going to be consumed internally

2 years agoAlign function prototypes with the functions
Nick Porter [Wed, 13 Dec 2023 08:04:42 +0000 (08:04 +0000)] 
Align function prototypes with the functions

2 years agofunctions are single-thing expansions, too
Alan T. DeKok [Tue, 12 Dec 2023 12:18:58 +0000 (07:18 -0500)] 
functions are single-thing expansions, too

2 years agoCheck return (CID #1559169)
Nick Porter [Mon, 11 Dec 2023 20:20:41 +0000 (20:20 +0000)] 
Check return (CID #1559169)

2 years agoadd test for acct_unique policy
Alan T. DeKok [Mon, 11 Dec 2023 19:41:37 +0000 (14:41 -0500)] 
add test for acct_unique policy

and re-add commas in between fields.  Which makes it harder for
malicious actors to mangle multiple fields together.

The real solution is to make md5() take varargs, and then do the MD5
separately for each argument.  And to pass the values as raw
value-boxes, instead of as printable strings

2 years agoremove last vestige of %string(...)
Alan T. DeKok [Mon, 11 Dec 2023 19:58:13 +0000 (14:58 -0500)] 
remove last vestige of %string(...)

and correct the filter_password policy so that it works

2 years agodeprecate %string(...).
Alan T. DeKok [Mon, 11 Dec 2023 19:25:58 +0000 (14:25 -0500)] 
deprecate %string(...).

We should instead use %{(string) (...)}

2 years agoadd more upcast corner cases
Alan T. DeKok [Sun, 10 Dec 2023 13:23:02 +0000 (08:23 -0500)] 
add more upcast corner cases

2 years agoCorrect accouning unique id policy
Nick Porter [Mon, 11 Dec 2023 18:32:18 +0000 (18:32 +0000)] 
Correct accouning unique id policy

2 years agoFail sample load Cookie if no cookie retrieved
Nick Porter [Mon, 11 Dec 2023 17:30:47 +0000 (17:30 +0000)] 
Fail sample load Cookie if no cookie retrieved

2 years agoUpdate sample virtual server to reflect new load Cookie behaviour
Nick Porter [Mon, 11 Dec 2023 12:12:16 +0000 (12:12 +0000)] 
Update sample virtual server to reflect new load Cookie behaviour

2 years agoAdd a timed event to retry "load Cookie" on failure
Nick Porter [Mon, 11 Dec 2023 12:03:17 +0000 (12:03 +0000)] 
Add a timed event to retry "load Cookie" on failure

2 years agoIf "load Cookie" returns a failure code change reply packet type
Nick Porter [Mon, 11 Dec 2023 11:53:48 +0000 (11:53 +0000)] 
If "load Cookie" returns a failure code change reply packet type

2 years agoMove sending of fake "load Cookie" packets to a function
Nick Porter [Mon, 11 Dec 2023 10:03:49 +0000 (10:03 +0000)] 
Move sending of fake "load Cookie" packets to a function

So it can be used by a timer event if the initial load fails

2 years agoTypos
Nick Porter [Mon, 11 Dec 2023 09:50:24 +0000 (09:50 +0000)] 
Typos

2 years agoRevert "Tighten scope on addr"
Alan T. DeKok [Fri, 8 Dec 2023 19:17:42 +0000 (14:17 -0500)] 
Revert "Tighten scope on addr"

This reverts commit 3523ad74f62e23b7254a464c2e026d86a610acfe.

just leave it hoisted to the top of the function, where it causes
the least amount of problems.

2 years agoadd operations and upcast on combo-ips and prefixes
Alan T. DeKok [Fri, 8 Dec 2023 19:01:16 +0000 (14:01 -0500)] 
add operations and upcast on combo-ips and prefixes

2 years agoallow combo-ip/prefix to be input types
Alan T. DeKok [Fri, 8 Dec 2023 16:07:10 +0000 (11:07 -0500)] 
allow combo-ip/prefix to be input types

2 years agoAvoid misleading errors in tmpl tokenizing
Nick Porter [Fri, 8 Dec 2023 15:00:44 +0000 (15:00 +0000)] 
Avoid misleading errors in tmpl tokenizing

When resolving an internal attriubute, often a lookup will first have
been done in a protocol dictionary, which results in an error being
recorded.
However, if the attribute was subsequently found in the internal
dictionary, that error is meaningless - but will still be printed if
something else causes errors to print.

2 years agoInternal attributes can be inside group attributes
Nick Porter [Fri, 8 Dec 2023 14:57:33 +0000 (14:57 +0000)] 
Internal attributes can be inside group attributes

2 years agoEnsure pairs sent to internal encoder are nested correctly
Nick Porter [Fri, 8 Dec 2023 14:21:05 +0000 (14:21 +0000)] 
Ensure pairs sent to internal encoder are nested correctly

2 years agoIf we've got a cookie, send it back
Nick Porter [Fri, 8 Dec 2023 14:02:40 +0000 (14:02 +0000)] 
If we've got a cookie, send it back

Relying on the rcode does not match any other encoders.  If we need to
make the cookie return optional, it should be based on
request->reply->code

2 years agoclean up and normalize error messages
Alan T. DeKok [Fri, 8 Dec 2023 13:32:44 +0000 (08:32 -0500)] 
clean up and normalize error messages

2 years agomacro is unused
Alan T. DeKok [Fri, 8 Dec 2023 13:12:09 +0000 (08:12 -0500)] 
macro is unused

2 years agounused is used
Alan T. DeKok [Fri, 8 Dec 2023 13:11:26 +0000 (08:11 -0500)] 
unused is used

2 years agoremove unused variable
Alan T. DeKok [Fri, 8 Dec 2023 13:05:38 +0000 (08:05 -0500)] 
remove unused variable

2 years agoclean up error handling in exec oneshot
Alan T. DeKok [Fri, 8 Dec 2023 12:57:06 +0000 (07:57 -0500)] 
clean up error handling in exec oneshot

so that the it saves an fr_strerror(), and all callers use
RPEDEBUG() to describe the error.  This gives a consistent
behavior

2 years agoWS
Arran Cudbard-Bell [Thu, 7 Dec 2023 19:40:22 +0000 (13:40 -0600)] 
WS

2 years agoTighten scope on addr
Arran Cudbard-Bell [Thu, 7 Dec 2023 19:39:41 +0000 (13:39 -0600)] 
Tighten scope on addr

2 years agohoist declaration to quiet analyzer
Alan T. DeKok [Thu, 7 Dec 2023 19:22:26 +0000 (14:22 -0500)] 
hoist declaration to quiet analyzer

2 years agoFix support for outer, and fix support for caller and subrequests in conditions
Arran Cudbard-Bell [Thu, 7 Dec 2023 18:40:32 +0000 (12:40 -0600)] 
Fix support for outer, and fix support for caller and subrequests in conditions

2 years agoadd tests for combo-ip comparisons
Alan T. DeKok [Thu, 7 Dec 2023 17:32:59 +0000 (12:32 -0500)] 
add tests for combo-ip comparisons

2 years agoadd combo-ip and combo-prefix to upcast_cmp
Alan T. DeKok [Thu, 7 Dec 2023 17:26:24 +0000 (12:26 -0500)] 
add combo-ip and combo-prefix to upcast_cmp

2 years agoupdate fr_value_box_cmp_op() to handle combo-ip and combo-prefix
Alan T. DeKok [Thu, 7 Dec 2023 17:25:38 +0000 (12:25 -0500)] 
update fr_value_box_cmp_op() to handle combo-ip and combo-prefix

2 years agoparse combo-ip and combo-ip
Alan T. DeKok [Thu, 7 Dec 2023 17:25:01 +0000 (12:25 -0500)] 
parse combo-ip and combo-ip

2 years agoAdd timer slop to redis tests for macOS
Arran Cudbard-Bell [Thu, 7 Dec 2023 15:12:17 +0000 (09:12 -0600)] 
Add timer slop to redis tests for macOS

2 years agoIt's fine/useful to be able to cast to combo ip addr/prefix attributes and back again
Arran Cudbard-Bell [Thu, 7 Dec 2023 15:11:17 +0000 (09:11 -0600)] 
It's fine/useful to be able to cast to combo ip addr/prefix attributes and back again

We usually don't care what address family an IP is unless we're putting it on the wire.

2 years agocall_env needs to manipulate rules too
Arran Cudbard-Bell [Thu, 7 Dec 2023 14:59:42 +0000 (08:59 -0600)] 
call_env needs to manipulate rules too

2 years agoParse requested addr as an IP address
Arran Cudbard-Bell [Thu, 7 Dec 2023 04:08:19 +0000 (22:08 -0600)] 
Parse requested addr as an IP address

2 years agoNested subrequest test
Arran Cudbard-Bell [Thu, 7 Dec 2023 04:07:45 +0000 (22:07 -0600)] 
Nested subrequest test

2 years agoUse exec with env passthrough so PATH works for local testing for redis tests
Arran Cudbard-Bell [Thu, 7 Dec 2023 04:07:08 +0000 (22:07 -0600)] 
Use exec with env passthrough so PATH works for local testing for redis tests

2 years agoJust cast...
Arran Cudbard-Bell [Thu, 7 Dec 2023 04:06:36 +0000 (22:06 -0600)] 
Just cast...

2 years agoFixup compile so that caller and subrequest autoload dictionaries if they're not...
Arran Cudbard-Bell [Wed, 6 Dec 2023 23:20:07 +0000 (17:20 -0600)] 
Fixup compile so that caller and subrequest autoload dictionaries if they're not already loaded

2 years agoAdd utility function to allow dictionaries to be dynamically autoloaded
Arran Cudbard-Bell [Wed, 6 Dec 2023 23:19:45 +0000 (17:19 -0600)] 
Add utility function to allow dictionaries to be dynamically autoloaded

2 years agoUse tmpl_rules_t when compiling call-envs
Arran Cudbard-Bell [Wed, 6 Dec 2023 23:19:22 +0000 (17:19 -0600)] 
Use tmpl_rules_t when compiling call-envs

This allows parent and caller to work correctly

2 years agoclarify behavior
Alan T. DeKok [Wed, 6 Dec 2023 19:42:37 +0000 (14:42 -0500)] 
clarify behavior

2 years agotpo
Alan T. DeKok [Tue, 5 Dec 2023 00:51:55 +0000 (19:51 -0500)] 
tpo

2 years agomake function static
Alan T. DeKok [Tue, 5 Dec 2023 00:34:40 +0000 (19:34 -0500)] 
make function static

it's only called from log.c, so it doesn't need to be public.

And avoid one extra malloc / free where possible

2 years agoremove unnecessary function
Alan T. DeKok [Mon, 4 Dec 2023 16:59:55 +0000 (11:59 -0500)] 
remove unnecessary function

and use more descriptive message in the one place where the
function was used

2 years agofile may be NULL on newer versions of OpenSSL
Alan T. DeKok [Mon, 4 Dec 2023 12:11:15 +0000 (07:11 -0500)] 
file may be NULL on newer versions of OpenSSL

2 years agoDoesn't need field specifier
Arran Cudbard-Bell [Mon, 4 Dec 2023 22:30:55 +0000 (16:30 -0600)] 
Doesn't need field specifier

2 years agoantora fixes
Alan T. DeKok [Sun, 3 Dec 2023 15:02:03 +0000 (10:02 -0500)] 
antora fixes

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sun, 3 Dec 2023 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sun, 3 Dec 2023 09:34:40 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Sun, 3 Dec 2023 09:34:37 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

2 years agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sun, 3 Dec 2023 09:34:35 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar