]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
22 months agoclean up for clang scan
Alan T. DeKok [Tue, 31 Oct 2023 15:14:51 +0000 (11:14 -0400)] 
clean up for clang scan

22 months agoUse new xlat function syntax in inline comments
Nick Porter [Tue, 31 Oct 2023 08:56:07 +0000 (08:56 +0000)] 
Use new xlat function syntax in inline comments

22 months agonote that we can't do &list1 := &list2 + &list3
Alan T. DeKok [Tue, 31 Oct 2023 14:47:24 +0000 (10:47 -0400)] 
note that we can't do &list1 := &list2 + &list3

it's better to give a descriptive error than crash

22 months agolet's try to use our local repo for pulling from hostap
Alan T. DeKok [Tue, 31 Oct 2023 12:59:03 +0000 (08:59 -0400)] 
let's try to use our local repo for pulling from hostap

so that we don't bug Jouni with endless pull requests

22 months agoremove unused function
Alan T. DeKok [Mon, 30 Oct 2023 18:44:04 +0000 (14:44 -0400)] 
remove unused function

22 months agoallow internal groups to be parents too
Alan T. DeKok [Mon, 30 Oct 2023 18:10:36 +0000 (14:10 -0400)] 
allow internal groups to be parents too

22 months agoremove %pack()
Alan T. DeKok [Mon, 30 Oct 2023 17:52:06 +0000 (13:52 -0400)] 
remove %pack()

22 months agoremove %module
Alan T. DeKok [Mon, 30 Oct 2023 17:48:48 +0000 (13:48 -0400)] 
remove %module

we now use %interpeter('module')

22 months agomove away from backticks, and use %exec()
Alan T. DeKok [Mon, 30 Oct 2023 13:25:45 +0000 (09:25 -0400)] 
move away from backticks, and use %exec()

It looks harder to use.  Instead of passing one string which is
then split by exec, we pass multiple strings as function arguments.

However, this is likely safer, too.

22 months agoadd tainted flag
Alan T. DeKok [Mon, 30 Oct 2023 12:56:08 +0000 (08:56 -0400)] 
add tainted flag

so that we don't have to walk down the list of VPs after creating
them.

22 months agoTypo
James Jones [Mon, 30 Oct 2023 16:29:18 +0000 (11:29 -0500)] 
Typo

Found while looking into CID #1548348

22 months agodocument KRB5_CLIENT_KTNAME
Alan T. DeKok [Sun, 29 Oct 2023 22:32:22 +0000 (18:32 -0400)] 
document KRB5_CLIENT_KTNAME

22 months agoremove this, too
Alan T. DeKok [Sun, 29 Oct 2023 22:28:48 +0000 (18:28 -0400)] 
remove this, too

22 months agoremove unused variable. CID #1548348
Alan T. DeKok [Sun, 29 Oct 2023 22:13:23 +0000 (18:13 -0400)] 
remove unused variable.  CID #1548348

22 months agoallow zero input
Alan T. DeKok [Sun, 29 Oct 2023 16:21:00 +0000 (12:21 -0400)] 
allow zero input

22 months agoremove legacy function
Alan T. DeKok [Sun, 29 Oct 2023 15:52:20 +0000 (11:52 -0400)] 
remove legacy function

22 months agocatch corner case of empty input buffer
Alan T. DeKok [Sun, 29 Oct 2023 15:47:08 +0000 (11:47 -0400)] 
catch corner case of empty input buffer

22 months agomake fr_pair_list_afrom_file() use the new API
Alan T. DeKok [Sun, 29 Oct 2023 15:29:17 +0000 (11:29 -0400)] 
make fr_pair_list_afrom_file() use the new API

and touch up one unit test, as the key field was auto-created,
but created with operator '=' instead of '=='

22 months agowe don't need this any more
Alan T. DeKok [Sun, 29 Oct 2023 15:28:46 +0000 (11:28 -0400)] 
we don't need this any more

22 months agominor tweaks
Alan T. DeKok [Sun, 29 Oct 2023 15:28:05 +0000 (11:28 -0400)] 
minor tweaks

keep going on ,<CR>, too.

produce better error messages when the child attribute is not
found.

22 months agomove detail reader to new API
Alan T. DeKok [Sun, 29 Oct 2023 14:38:22 +0000 (10:38 -0400)] 
move detail reader to new API

with comments that much of the detail file reader won't handle
nested attributes properly. :(

22 months agomove radsniff to new API
Alan T. DeKok [Sun, 29 Oct 2023 14:26:37 +0000 (10:26 -0400)] 
move radsniff to new API

22 months agomove tests to using new function
Alan T. DeKok [Sun, 29 Oct 2023 14:16:19 +0000 (10:16 -0400)] 
move tests to using new function

22 months agoremove more fr_pair_list_afrom_str()
Alan T. DeKok [Sun, 29 Oct 2023 13:46:04 +0000 (09:46 -0400)] 
remove more fr_pair_list_afrom_str()

22 months agomove edit functionality to new pair_list_afrom_substr()
Alan T. DeKok [Sun, 29 Oct 2023 13:24:34 +0000 (09:24 -0400)] 
move edit functionality to new pair_list_afrom_substr()

22 months agoradius_exec_program_legacy() doesn't ever get passed output_pairs
Alan T. DeKok [Sun, 29 Oct 2023 13:01:14 +0000 (09:01 -0400)] 
radius_exec_program_legacy() doesn't ever get passed output_pairs

so remove unused code and arguments.

22 months agomake unit_test_attribute use fr_pair_list_afrom_substr()
Alan T. DeKok [Sat, 28 Oct 2023 19:16:17 +0000 (15:16 -0400)] 
make unit_test_attribute use fr_pair_list_afrom_substr()

and update the tests now that they produce the correct result

22 months agolast tweaks to make new pair parser match the old functionality
Alan T. DeKok [Sat, 28 Oct 2023 12:07:52 +0000 (08:07 -0400)] 
last tweaks to make new pair parser match the old functionality

22 months agoallow full paths for multiple struct members
Alan T. DeKok [Fri, 27 Oct 2023 22:29:46 +0000 (18:29 -0400)] 
allow full paths for multiple struct members

which we automagically turn into multiple struct attributes

22 months agoadd "find last by da" API
Alan T. DeKok [Fri, 27 Oct 2023 22:28:47 +0000 (18:28 -0400)] 
add "find last by da" API

22 months agoautomatically append on common cases
Alan T. DeKok [Fri, 27 Oct 2023 14:55:37 +0000 (10:55 -0400)] 
automatically append on common cases

foo.bar = a, .baz = b, foo.bar = c, .baz = d

will now create 2 "foo" attributes

22 months agowhitespace
Alan T. DeKok [Fri, 27 Oct 2023 14:55:10 +0000 (10:55 -0400)] 
whitespace

22 months agocatch more corner cases
Alan T. DeKok [Fri, 27 Oct 2023 01:15:29 +0000 (21:15 -0400)] 
catch more corner cases

22 months agoremove debugging
Alan T. DeKok [Fri, 27 Oct 2023 01:10:27 +0000 (21:10 -0400)] 
remove debugging

22 months agocleanups and checks for static analysis
Alan T. DeKok [Fri, 27 Oct 2023 00:42:10 +0000 (20:42 -0400)] 
cleanups and checks for static analysis

22 months agoNew fr_pair_list_afrom_substr()
Alan T. DeKok [Thu, 26 Oct 2023 20:30:53 +0000 (16:30 -0400)] 
New fr_pair_list_afrom_substr()

not used yet, but with local changes it passes the unit tests.

The function now creates intermediate pairs, including groups!

22 months agorespect terminals during parsing of values
Alan T. DeKok [Thu, 26 Oct 2023 23:22:40 +0000 (19:22 -0400)] 
respect terminals during parsing of values

brute-force copying _all_ of the input sbuff works only when
there are no terminals.

22 months agoctx is used
Alan T. DeKok [Thu, 26 Oct 2023 20:07:48 +0000 (16:07 -0400)] 
ctx is used

22 months agodon't use := for tests, it's not needed
Alan T. DeKok [Thu, 26 Oct 2023 15:31:51 +0000 (11:31 -0400)] 
don't use := for tests, it's not needed

22 months agocheck return code of fr_dict_attr_by_oid_substr()
Alan T. DeKok [Thu, 26 Oct 2023 12:08:32 +0000 (08:08 -0400)] 
check return code of fr_dict_attr_by_oid_substr()

which can return an error even if the "err" ptr is NULL

22 months agoget rid of Tmp-* in configuration and examples
Alan T. DeKok [Wed, 25 Oct 2023 20:59:03 +0000 (16:59 -0400)] 
get rid of Tmp-* in configuration and examples

22 months agoDon't free tracking for cached packets
Nick Porter [Thu, 26 Oct 2023 19:04:00 +0000 (20:04 +0100)] 
Don't free tracking for cached packets

22 months agoallow local variables in redundant and load-balance
Alan T. DeKok [Wed, 25 Oct 2023 20:52:59 +0000 (16:52 -0400)] 
allow local variables in redundant and load-balance

22 months agoExplicitly free list of VPs to maintain list integrity
Nick Porter [Wed, 25 Oct 2023 09:26:48 +0000 (10:26 +0100)] 
Explicitly free list of VPs to maintain list integrity

22 months agoCopy packet->vector to correctly identify retransmits
Nick Porter [Wed, 25 Oct 2023 09:24:17 +0000 (10:24 +0100)] 
Copy packet->vector to correctly identify retransmits

22 months agoUse fr_pair_list_append to move temporary lists
Nick Porter [Wed, 25 Oct 2023 09:23:08 +0000 (10:23 +0100)] 
Use fr_pair_list_append to move temporary lists

22 months agoAdd radsniff to vscode debug launcher
Nick Porter [Wed, 25 Oct 2023 10:02:09 +0000 (11:02 +0100)] 
Add radsniff to vscode debug launcher

22 months agorework macros to be clearer
Alan T. DeKok [Tue, 24 Oct 2023 19:08:57 +0000 (15:08 -0400)] 
rework macros to be clearer

much less repetition == fewer mistakes, and hopefully less
confusion from Coverity

22 months agomore notes on what we don't want to convert
Alan T. DeKok [Mon, 23 Oct 2023 20:48:28 +0000 (16:48 -0400)] 
more notes on what we don't want to convert

22 months agoskip migration "-->" strings
Alan T. DeKok [Mon, 23 Oct 2023 15:30:32 +0000 (11:30 -0400)] 
skip migration "-->" strings

22 months agoremove old tests which we choose to not support
Alan T. DeKok [Mon, 23 Oct 2023 14:19:21 +0000 (10:19 -0400)] 
remove old tests which we choose to not support

22 months agodisable these as we don't (yet) care
Alan T. DeKok [Mon, 23 Oct 2023 13:57:30 +0000 (09:57 -0400)] 
disable these as we don't (yet) care

22 months agowe don't support groups in update -> edit conversions
Alan T. DeKok [Mon, 23 Oct 2023 13:29:38 +0000 (09:29 -0400)] 
we don't support groups in update -> edit conversions

This could probably be added, but perhaps not today.

22 months agonow supported in the edit code
Alan T. DeKok [Mon, 23 Oct 2023 13:04:25 +0000 (09:04 -0400)] 
now supported in the edit code

22 months agothis one is now supported in the edit code
Alan T. DeKok [Mon, 23 Oct 2023 13:03:13 +0000 (09:03 -0400)] 
this one is now supported in the edit code

22 months agomove more update tests to edit
Alan T. DeKok [Mon, 23 Oct 2023 13:02:16 +0000 (09:02 -0400)] 
move more update tests to edit

22 months agofix comments
Alan T. DeKok [Mon, 23 Oct 2023 12:39:31 +0000 (08:39 -0400)] 
fix comments

22 months agomove test to new edit framework
Alan T. DeKok [Sun, 22 Oct 2023 19:48:00 +0000 (15:48 -0400)] 
move test to new edit framework

and fix issue where

&foo := &non-existent

was different from

&foo := {}

or

%foo := %function_that_returns_nothing()

22 months agotypo in debug
Alan T. DeKok [Sun, 22 Oct 2023 19:24:26 +0000 (15:24 -0400)] 
typo in debug

22 months agoallow removal of attributes by index
Alan T. DeKok [Sun, 22 Oct 2023 15:46:19 +0000 (11:46 -0400)] 
allow removal of attributes by index

this is the start of porting update-remove-index, which currently
doesn't work for a host of reasons.

We should probably remove the syntax of &list -= &attr, as it is
now duplicative, and we don't like that.

22 months agomore debugging, and use better macro
Alan T. DeKok [Sun, 22 Oct 2023 15:42:52 +0000 (11:42 -0400)] 
more debugging, and use better macro

22 months agoprint out more of the parsing error
Alan T. DeKok [Sun, 22 Oct 2023 15:41:31 +0000 (11:41 -0400)] 
print out more of the parsing error

22 months agoremove tests which are no longer necessary
Alan T. DeKok [Sun, 22 Oct 2023 14:31:23 +0000 (10:31 -0400)] 
remove tests which are no longer necessary

we don't support cross-protocol attributes

22 months agofix documentation
Alan T. DeKok [Sat, 21 Oct 2023 12:08:46 +0000 (08:08 -0400)] 
fix documentation

22 months agoit helps to access the variable before its freed
Alan T. DeKok [Sat, 21 Oct 2023 12:08:32 +0000 (08:08 -0400)] 
it helps to access the variable before its freed

22 months agohoist "fall-through" to entry
Alan T. DeKok [Fri, 20 Oct 2023 13:07:41 +0000 (09:07 -0400)] 
hoist "fall-through" to entry

so that we don't need to create the VP every time.  Instead,
we parse it once when the module starts, and cache the resulting
"bool"

22 months agojson: Add support for encoding nested attributes
Arran Cudbard-Bell [Fri, 20 Oct 2023 22:47:04 +0000 (16:47 -0600)] 
json: Add support for encoding nested attributes

22 months agoAdd unlang_edit_push() for external use of the new edit functionality
Alan T. DeKok [Fri, 20 Oct 2023 12:50:07 +0000 (08:50 -0400)] 
Add unlang_edit_push() for external use of the new edit functionality

22 months agothis returns int, not unlang_action_t
Alan T. DeKok [Fri, 20 Oct 2023 12:06:40 +0000 (08:06 -0400)] 
this returns int, not unlang_action_t

22 months agoparse-time errors are better than run-time asserts
Alan T. DeKok [Thu, 19 Oct 2023 21:30:41 +0000 (17:30 -0400)] 
parse-time errors are better than run-time asserts

we don't support structural types on the RHS of maps, so don't
even try to parse them.  Just return an error

22 months agoRevert "try to parse things inside of a {...} block"
Alan T. DeKok [Thu, 19 Oct 2023 21:29:10 +0000 (17:29 -0400)] 
Revert "try to parse things inside of a {...} block"

This reverts commit 1a9970927eef06a6a05e5087bf95047b31c68fa8.

nope, the evaluator doesn't like structural RHS

22 months agotry to parse things inside of a {...} block
Alan T. DeKok [Thu, 19 Oct 2023 21:12:23 +0000 (17:12 -0400)] 
try to parse things inside of a {...} block

if this doesn't work, it should be reverted

22 months agoclarify error message
Alan T. DeKok [Thu, 19 Oct 2023 20:48:08 +0000 (16:48 -0400)] 
clarify error message

22 months agocreate nested VSAs for tagged attributes
Alan T. DeKok [Thu, 19 Oct 2023 19:25:33 +0000 (15:25 -0400)] 
create nested VSAs for tagged attributes

and add tests

22 months agosample code to pass expressions as function arguments
Alan T. DeKok [Wed, 18 Oct 2023 20:43:24 +0000 (16:43 -0400)] 
sample code to pass expressions as function arguments

not yet enabled until we work out the implications and double-check
the tests

22 months agoit helps to document this, too
Alan T. DeKok [Wed, 18 Oct 2023 20:36:05 +0000 (16:36 -0400)] 
it helps to document this, too

We would really like to be able to do

%file.escape("foo/bar/" + %{User-Name})

but if that's an expression, then we get the entire string tainted,
and thge "/" in the first part of the string are escaped.

or maybe

%exec("/bin/rm", "foo/bar" + %file.escape(%{User-Name}))

but we can't (yet) pass expressions as function arguments.

22 months agoMark required arguments as nonnull
Nick Porter [Thu, 19 Oct 2023 17:11:56 +0000 (18:11 +0100)] 
Mark required arguments as nonnull

22 months agoEnsure all URI escaping is only done on strings
Nick Porter [Thu, 19 Oct 2023 16:45:12 +0000 (17:45 +0100)] 
Ensure all URI escaping is only done on strings

Xlats already present strings, but there can be cases where the list is
not all strings, such as LDAP map.

22 months agoCast boxes in a URI to string before escaping
Nick Porter [Thu, 19 Oct 2023 16:24:15 +0000 (17:24 +0100)] 
Cast boxes in a URI to string before escaping

22 months agoUse non_socket_listener to detect non-socket listeners
Nick Porter [Thu, 19 Oct 2023 13:32:26 +0000 (14:32 +0100)] 
Use non_socket_listener to detect non-socket listeners

22 months agoCorrect handling of trunk enqueue responses
Nick Porter [Wed, 18 Oct 2023 20:06:56 +0000 (21:06 +0100)] 
Correct handling of trunk enqueue responses

22 months agodon't return grouped data
Alan T. DeKok [Wed, 18 Oct 2023 20:29:46 +0000 (16:29 -0400)] 
don't return grouped data

the arguments to the function are grouped.  But the actual content
of the arguments is the group contents.  It's not the group.

So we can't copy the input groups to the output, that results in
too many groups.

22 months agothe taint / untaint functions are pure
Alan T. DeKok [Wed, 18 Oct 2023 20:28:58 +0000 (16:28 -0400)] 
the taint / untaint functions are pure

if they operate on pure data, they return tainted but pure data

22 months agoadd %file.escape()
Alan T. DeKok [Wed, 18 Oct 2023 20:28:06 +0000 (16:28 -0400)] 
add %file.escape()

22 months agorlm_detail listener can't take the short cut when adding to a network
Nick Porter [Wed, 18 Oct 2023 14:46:26 +0000 (15:46 +0100)] 
rlm_detail listener can't take the short cut when adding to a network

22 months agoIf poll_interval is set don't open a dummy file
Nick Porter [Tue, 17 Oct 2023 10:20:47 +0000 (11:20 +0100)] 
If poll_interval is set don't open a dummy file

Avoids a libkqueue issue which caused a crash on exit.

22 months agoHide inactive mod_write
Nick Porter [Tue, 17 Oct 2023 10:15:10 +0000 (11:15 +0100)] 
Hide inactive mod_write

22 months agoAdd option to allow for non-socket listeners
Nick Porter [Tue, 17 Oct 2023 10:11:59 +0000 (11:11 +0100)] 
Add option to allow for non-socket listeners

22 months agoMore consistent naming with other xlats
Nick Porter [Wed, 18 Oct 2023 07:49:36 +0000 (08:49 +0100)] 
More consistent naming with other xlats

22 months agoTweaks to the new radius_request_verify function
Arran Cudbard-Bell [Wed, 18 Oct 2023 01:37:15 +0000 (19:37 -0600)] 
Tweaks to the new radius_request_verify function

Rename to radius_secret_verify, as that's what it's doing.  The request has already been verified, we're trying different secrets against the request.

22 months agoUse the same codepath to trigger an exit as the signal handlers
Arran Cudbard-Bell [Wed, 18 Oct 2023 01:17:22 +0000 (19:17 -0600)] 
Use the same codepath to trigger an exit as the signal handlers

This allows other I/O callbacks to complete, so when the server exits, pending I/O events for proto_detail_file should've fired.  This mnay help with the crash on exit

22 months agoInclude missing header
Arran Cudbard-Bell [Tue, 17 Oct 2023 23:37:56 +0000 (17:37 -0600)] 
Include missing header

22 months agoModules should NEVER signal an event loop to exit
Arran Cudbard-Bell [Tue, 17 Oct 2023 23:36:39 +0000 (17:36 -0600)] 
Modules should NEVER signal an event loop to exit

22 months agoAdd %radius_request_verify() xlat
Nick Porter [Mon, 16 Oct 2023 08:39:59 +0000 (09:39 +0100)] 
Add %radius_request_verify() xlat

For verifying dynamic clients against a know shared secret

22 months agoallow relative attributes after DEFINEs
Alan T. DeKok [Tue, 17 Oct 2023 12:15:18 +0000 (08:15 -0400)] 
allow relative attributes after DEFINEs

22 months agomake the tests depend on the RADIUS dictionary
Alan T. DeKok [Tue, 17 Oct 2023 12:13:32 +0000 (08:13 -0400)] 
make the tests depend on the RADIUS dictionary

22 months agoBetter error message
Nick Porter [Tue, 17 Oct 2023 10:31:44 +0000 (11:31 +0100)] 
Better error message

22 months agouse sbuff API to quiet Coverity. CID #1547825
Alan T. DeKok [Mon, 16 Oct 2023 22:30:31 +0000 (18:30 -0400)] 
use sbuff API to quiet Coverity.  CID #1547825

Coverity is too dumb to notice that the buffer is initialized.
However, if we use the sbuff API, then it thinks everything is
fine.

22 months agomove to %file.exists()
Alan T. DeKok [Mon, 16 Oct 2023 22:14:24 +0000 (18:14 -0400)] 
move to %file.exists()

fix typo in deletion of old log file

just use "wc -l FILE", there's no need to "cat" everything

22 months agoremove "hoist vpt->xlat into xlat" in tokenize expression
Alan T. DeKok [Mon, 16 Oct 2023 22:10:58 +0000 (18:10 -0400)] 
remove "hoist vpt->xlat into xlat" in tokenize expression

the hoisting would put the expansion into an XLAT_GROUP, which
meant that any output value-boxes were wrapped in a value-box
group.  Which was distinctly unexpected.