]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Sat, 30 Sep 2023 12:08:54 +0000 (08:08 -0400)]
move documentation to new syntax
Alan T. DeKok [Fri, 29 Sep 2023 22:42:48 +0000 (18:42 -0400)]
clean up and rework casting in xlat expressions
nothing changes except for a few corner cases which didn't work
before.
Alan T. DeKok [Fri, 29 Sep 2023 18:42:25 +0000 (14:42 -0400)]
note that %integer()... is no longer needed. Casting works fine
Alan T. DeKok [Fri, 29 Sep 2023 17:46:55 +0000 (13:46 -0400)]
more tests for cast
(uint32) &Service-Type
has the cast omitted, as Service-Type is already uint32
However, the cast is still useful, as we may want to print the
integer value of Service-Type!
So we have to do:
(uint32) (&Service-Type)
which is a bit stupid
Alan T. DeKok [Fri, 29 Sep 2023 17:09:05 +0000 (13:09 -0400)]
allow ::NAME for enum names
Alan T. DeKok [Fri, 29 Sep 2023 16:55:41 +0000 (12:55 -0400)]
print out the correct command string
Alan T. DeKok [Fri, 29 Sep 2023 16:18:47 +0000 (12:18 -0400)]
local variables can't be named for data types
string string
is bad.
Alan T. DeKok [Fri, 29 Sep 2023 16:13:03 +0000 (12:13 -0400)]
start moving to the new function call syntax
Arran Cudbard-Bell [Fri, 29 Sep 2023 21:13:05 +0000 (15:13 -0600)]
Split out thread instantiation into its own function
James Jones [Fri, 29 Sep 2023 20:55:12 +0000 (15:55 -0500)]
Add comments on how to verify poimters. (#5196)
Alan T. DeKok [Fri, 29 Sep 2023 15:11:47 +0000 (11:11 -0400)]
just key on '%' for in-place xlats
no module name will start with '%', so that's fine
Alan T. DeKok [Fri, 29 Sep 2023 14:26:06 +0000 (10:26 -0400)]
wrap tests in group { ... } so the tests can declare local variables
Alan T. DeKok [Fri, 29 Sep 2023 14:01:31 +0000 (10:01 -0400)]
add comment on "massive" "use" of "quotes"
Alan T. DeKok [Fri, 29 Sep 2023 13:59:36 +0000 (09:59 -0400)]
start of documentation on new function syntax
Alan T. DeKok [Fri, 29 Sep 2023 12:43:50 +0000 (08:43 -0400)]
update preparse functions for new xlat syntax
Alan T. DeKok [Fri, 29 Sep 2023 12:34:58 +0000 (08:34 -0400)]
remove debug
Alan T. DeKok [Fri, 29 Sep 2023 12:10:20 +0000 (08:10 -0400)]
remove unused assignment
Arran Cudbard-Bell [Fri, 29 Sep 2023 05:22:51 +0000 (23:22 -0600)]
Fix rlm_perl configure script under clang
Alan T. DeKok [Thu, 28 Sep 2023 22:01:39 +0000 (18:01 -0400)]
catch more edge cases for new functions and single-letter expansions
so that we just skip the new function parser in more cases, which
makes the new function parser a bit simpler.
Alan T. DeKok [Thu, 28 Sep 2023 21:30:17 +0000 (17:30 -0400)]
allow &Attr references in function mono
not in other ones, as the rest of the functions expect to see
an input argument which is a string, and they convert that to
a tmpl.
The tokenize / eval framework likely needs to be updated to
allow for something like &%{...}, which would create the tmpl
name at run time. And then the function can get passed a tmpl
(in a value-box?) and not a raw value-box.
Alan T. DeKok [Thu, 28 Sep 2023 21:03:23 +0000 (17:03 -0400)]
use correct macro
Alan T. DeKok [Thu, 28 Sep 2023 20:46:53 +0000 (16:46 -0400)]
allow input packet for test.xlat
Alan T. DeKok [Thu, 28 Sep 2023 20:46:36 +0000 (16:46 -0400)]
remove redundant line
Alan T. DeKok [Thu, 28 Sep 2023 16:59:42 +0000 (12:59 -0400)]
fix assertions
Alan T. DeKok [Thu, 28 Sep 2023 15:10:28 +0000 (11:10 -0400)]
minor tweaks
Alan T. DeKok [Thu, 28 Sep 2023 14:55:51 +0000 (10:55 -0400)]
note filter changes
James Jones [Thu, 28 Sep 2023 16:35:34 +0000 (11:35 -0500)]
Cast sbuff write calls in fr_vlog_perror() to void (CID #
1533664 ) (#5158)
fr_vlog_perror() returns void, so one can't use FR_SBUFF_FOO_RETURN();
the function must always do something reasonable. The possible
errors are invalid format strings or running out of space, and
here rather than a fixed local buffer, the buffer can grow to 16K.
Errors are printed one at a time rather than accumulating them all
in the buffer, so such an event is highly unlikely. We thus cast
the calls to void.
Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
James Jones [Thu, 28 Sep 2023 16:32:18 +0000 (11:32 -0500)]
Comment on trunk test annotations (CID #
1469174 ) (#5188)
Coverity doesn't recognize the validation of the read treq pointer
that text_demux() does, which, aside from signaling complete or
cancel complete, is the majority of the loop body.
James Jones [Thu, 28 Sep 2023 16:31:53 +0000 (11:31 -0500)]
Comment on annotations in pair_init_from_da() (CID #
1517674 ) (#5186)
James Jones [Thu, 28 Sep 2023 16:31:32 +0000 (11:31 -0500)]
Comment annnotation in fr_value_box_init() (CID #
1543214 ) (#5185)
James Jones [Thu, 28 Sep 2023 16:31:02 +0000 (11:31 -0500)]
Add comment explaining annotation (CID #
1414431 ) (#5184)
James Jones [Thu, 28 Sep 2023 16:30:45 +0000 (11:30 -0500)]
Typos, grammar fixes, cutting back on verbosity. (#5178)
James Jones [Thu, 28 Sep 2023 16:30:16 +0000 (11:30 -0500)]
Avoid what coverity calls "downcasting" (CID #
1542293 ) (#5170)
packet->data is a uint8_t * formerly cast to dhcp_packet_t const *
to be passed to fr_dhcpv4_packet_get_option(). dhcp_packet_t is
more strictly aligned than uint8_t, so coverity considers this a
"tainted_data_downcast" and infers that the pointed-at data is
tainted.
To avoid the issue, the talloc_memdup() result is assigned first
to a dhcp_packet_t * to pass to fr_dhcpv4_packet_get_option(),
and cast to (uint8_t *) to assign to packet->data.
James Jones [Thu, 28 Sep 2023 16:29:07 +0000 (11:29 -0500)]
Placate coverity CID #
1542424 , #152423, #152422) (#5168)
Currently, three functions mark requests as fake. That involves
calling fr_pair_value_from_str() with the string being "127.0.0.1".
Coverity notices that fr_pair_value_from_str() returns a value
that isn't checked.
* setup_fake_request() nominally returns an int, but it always
returns zero, and no caller actuallly checks its return value.
* The other functions, chbind_process() and eap_fast_eap_payload(),
return fr_radius_packet_code_t, and it's not clear which
fr_radius_packet_code_t makes sense in this case.
So... we cast the fr_pair_value_from_str() calls to void.
Jorge Pereira [Thu, 28 Sep 2023 16:20:13 +0000 (13:20 -0300)]
Fix od_mschap_auth() call in rlm_mschap (#5192)
When build against the OSX
Alan T. DeKok [Thu, 28 Sep 2023 14:49:56 +0000 (10:49 -0400)]
add, document, and test filtering operators
Alan T. DeKok [Thu, 28 Sep 2023 12:36:28 +0000 (08:36 -0400)]
allow multiple local variables to be defined
Alan T. DeKok [Thu, 28 Sep 2023 12:33:04 +0000 (08:33 -0400)]
don't smash operator before printing it in error message
Alan T. DeKok [Thu, 28 Sep 2023 02:32:51 +0000 (22:32 -0400)]
remove policies which aren't really correct
they use old %C.%c, instead of just relying on the new fr_time_t
and fr_time_delta_t
Alan T. DeKok [Wed, 27 Sep 2023 23:45:47 +0000 (19:45 -0400)]
test function call inside of function argument
Alan T. DeKok [Wed, 27 Sep 2023 23:42:47 +0000 (19:42 -0400)]
add test for condition / edit of %func(args)
Alan T. DeKok [Wed, 27 Sep 2023 23:42:30 +0000 (19:42 -0400)]
use input ctx, as output value-box may be on the stack
Alan T. DeKok [Wed, 27 Sep 2023 20:08:40 +0000 (16:08 -0400)]
note new function syntax
Alan T. DeKok [Wed, 27 Sep 2023 20:01:57 +0000 (16:01 -0400)]
fix debugging error message
Alan T. DeKok [Wed, 27 Sep 2023 19:56:32 +0000 (15:56 -0400)]
be more careful about one-letter expansions
Alan T. DeKok [Wed, 27 Sep 2023 18:58:28 +0000 (14:58 -0400)]
don't allow registrations of one-letter overlaps with %Y etc.
Alan T. DeKok [Wed, 27 Sep 2023 18:52:05 +0000 (14:52 -0400)]
always support new function syntax
and put in hacks to allow %Y to work.
Alan T. DeKok [Wed, 27 Sep 2023 17:36:58 +0000 (13:36 -0400)]
make new function parsing work
%foo(bar, baz)
Something something miracle.
Alan T. DeKok [Wed, 27 Sep 2023 15:04:36 +0000 (11:04 -0400)]
$INCLUDE does not yet support file globbing
Alan T. DeKok [Wed, 27 Sep 2023 15:00:53 +0000 (11:00 -0400)]
shut up compiler
Alan T. DeKok [Wed, 27 Sep 2023 14:51:11 +0000 (10:51 -0400)]
move process $INCLUDE to its own function
Alan T. DeKok [Wed, 27 Sep 2023 13:49:55 +0000 (09:49 -0400)]
move testing code to totp.c
Alan T. DeKok [Wed, 27 Sep 2023 13:26:04 +0000 (09:26 -0400)]
Make rlm_totp use the API in libfreeradius-totp
and do some more cleanups
Jorge Pereira [Thu, 14 Sep 2023 01:09:02 +0000 (22:09 -0300)]
Add TOTP functionality in libfreeradius-totp.a
And add it to the packages
Jorge Pereira [Thu, 14 Sep 2023 00:58:24 +0000 (21:58 -0300)]
Hoist TOTP attribute out of Password
until we clean up some other dictionary things.
Jorge Pereira [Thu, 14 Sep 2023 03:19:28 +0000 (00:19 -0300)]
totp: Add scripts/totp/totp-gen.py sample
It's helpful to validate rlm_totp in realtime.
Jorge Pereira [Thu, 14 Sep 2023 01:06:56 +0000 (22:06 -0300)]
totp: Add Antora documentation
Jorge Pereira [Thu, 14 Sep 2023 01:03:18 +0000 (22:03 -0300)]
totp: Update raddb/mods-available/totp
* Update mods-available/totp to new asciidoc markup
* Fix the attributes
Alan T. DeKok [Wed, 27 Sep 2023 12:44:26 +0000 (08:44 -0400)]
move to v4 API for base32 functionality
Jorge Pereira [Wed, 6 Sep 2023 20:40:09 +0000 (17:40 -0300)]
Port new features and documentation from v3.2
Alan T. DeKok [Tue, 26 Sep 2023 22:10:41 +0000 (18:10 -0400)]
rename variable and clean up debug output
so that we show both the input string, and the unescaped string
Alan T. DeKok [Tue, 26 Sep 2023 20:23:01 +0000 (16:23 -0400)]
move check for brace to calling function
so xlat_tokenize_input() does not need to do it.
Alan T. DeKok [Tue, 26 Sep 2023 20:22:30 +0000 (16:22 -0400)]
Don't free node on error. The error label already does this
Alan T. DeKok [Tue, 26 Sep 2023 20:09:54 +0000 (16:09 -0400)]
rearrange xlat_tokenize_input() as part of rearchitecture
Alan T. DeKok [Tue, 26 Sep 2023 19:47:32 +0000 (15:47 -0400)]
single-quoted strings are constant
Alan T. DeKok [Tue, 26 Sep 2023 19:05:42 +0000 (15:05 -0400)]
rename function in preparation for cleanup
xlat_tokenize_string() in fact does not tokenize quoted strings.
There are multiple other places which parse quoted strings. That
code needs to be unified.
Alan T. DeKok [Tue, 26 Sep 2023 18:19:25 +0000 (14:19 -0400)]
debug output should not un-escape the input.
When we're trying to debug xlats, the output text should show
exactly what is being parsed.
Alan T. DeKok [Tue, 26 Sep 2023 18:17:16 +0000 (14:17 -0400)]
Documentation for things helps rather a lot.
Alan T. DeKok [Tue, 26 Sep 2023 18:06:22 +0000 (14:06 -0400)]
point to the global.d/ directory for more information.
Alan T. DeKok [Tue, 26 Sep 2023 18:02:24 +0000 (14:02 -0400)]
Revert "document path configuration. Fixes #5190"
This reverts commit
907f8f8a35962fdd60f6c1d9eede3dc7e5a855c2 .
Alan T. DeKok [Tue, 26 Sep 2023 13:38:38 +0000 (09:38 -0400)]
start of rearrangement
and t_rules may be NULL
Alan T. DeKok [Tue, 26 Sep 2023 13:11:14 +0000 (09:11 -0400)]
enforce correct names on function registrations
Alan T. DeKok [Tue, 26 Sep 2023 13:11:00 +0000 (09:11 -0400)]
move release to after the marker is used
Alan T. DeKok [Tue, 26 Sep 2023 12:50:09 +0000 (08:50 -0400)]
document path configuration. Fixes #5190
Alan T. DeKok [Mon, 25 Sep 2023 21:40:05 +0000 (17:40 -0400)]
start of %func()
Alan T. DeKok [Mon, 25 Sep 2023 21:19:36 +0000 (17:19 -0400)]
move to local variables, and away from Tmp-*
Alan T. DeKok [Mon, 25 Sep 2023 21:19:21 +0000 (17:19 -0400)]
whitespace
Nick Porter [Tue, 26 Sep 2023 07:34:20 +0000 (08:34 +0100)]
Remove remaining use of tacacs policy
All modules needed for TACACS authentication are now protocol agnostic.
Nick Porter [Thu, 31 Aug 2023 21:07:16 +0000 (22:07 +0100)]
Use a call_env in rlm_mschap
James Jones [Mon, 25 Sep 2023 19:33:39 +0000 (14:33 -0500)]
typo
Alan T. DeKok [Mon, 25 Sep 2023 18:43:12 +0000 (14:43 -0400)]
more text on what has changed, and what is changing
Alan T. DeKok [Mon, 25 Sep 2023 16:57:55 +0000 (12:57 -0400)]
remove debugging stuff
Nick Porter [Fri, 22 Sep 2023 12:27:34 +0000 (13:27 +0100)]
No need for extra escaping now
The `program` option is always parsed as T_BACK_QUOTED_STRING
Nick Porter [Wed, 13 Sep 2023 15:08:02 +0000 (16:08 +0100)]
Use call_env for rlm_exec
Nick Porter [Wed, 13 Sep 2023 15:06:43 +0000 (16:06 +0100)]
Allow call_env to force quoting when parsing tmpls
Nick Porter [Wed, 13 Sep 2023 12:59:59 +0000 (13:59 +0100)]
Whitespace
Alan T. DeKok [Mon, 25 Sep 2023 13:30:23 +0000 (09:30 -0400)]
typo
Alan T. DeKok [Mon, 25 Sep 2023 13:29:01 +0000 (09:29 -0400)]
more notes on what doesn't work in v4
Alan T. DeKok [Mon, 25 Sep 2023 12:29:17 +0000 (08:29 -0400)]
document new dictionary section
Alan T. DeKok [Mon, 25 Sep 2023 12:21:31 +0000 (08:21 -0400)]
allow for values too
this isn't quite a duplicate of the dictionary code, as it allows
the "local" dictionaries to be included with the virtual server.
We can always define a new configuration entry:
filename = ...
which loads dictionary entries from the given filename.
However, that SHOULD have a number of limitations:
* only DEFINE is allowed. No ATTRIBUTE or PROTO
The user shouldn't be tracking numbers
* no struct / vendor / vsa data types
* allow VALUEs
At some point in the future, we may allow server-specific _protocol_
attributes. But that would require updating the encoders to look
for dictionaries by number, and not by cached fr_dict_t
Nick Porter [Mon, 25 Sep 2023 08:18:18 +0000 (09:18 +0100)]
Placate clang scan
Alan T. DeKok [Mon, 25 Sep 2023 00:23:31 +0000 (20:23 -0400)]
delete all matchine local variables
they can be created in any order, so we can't rely on just checking
the tail
Alan T. DeKok [Mon, 25 Sep 2023 00:21:34 +0000 (20:21 -0400)]
dictionaries in virtual servers are internal, but not local
Alan T. DeKok [Mon, 25 Sep 2023 00:21:15 +0000 (20:21 -0400)]
stupid compiler
Alan T. DeKok [Sun, 24 Sep 2023 23:49:09 +0000 (19:49 -0400)]
allow local dictionaries to define TLVs
Alan T. DeKok [Sun, 24 Sep 2023 23:48:01 +0000 (19:48 -0400)]
allow TLVs for local dictionary definitions
Alan T. DeKok [Sun, 24 Sep 2023 23:47:36 +0000 (19:47 -0400)]
allow local varibles to be structured (e.g. tlv)
Alan T. DeKok [Sun, 24 Sep 2023 14:31:46 +0000 (10:31 -0400)]
allow local variables in case, but not in switch
Alan T. DeKok [Sun, 24 Sep 2023 14:14:17 +0000 (10:14 -0400)]
stupid compiler doesn't catch issues
Alan T. DeKok [Sun, 24 Sep 2023 13:59:15 +0000 (09:59 -0400)]
whitespace