]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoEnsure gdb knows where to load relative path library files
Nick Porter [Thu, 1 Dec 2022 13:54:49 +0000 (13:54 +0000)] 
Ensure gdb knows where to load relative path library files

2 years agoTemporarily revert to sleep in place of triggers
Nick Porter [Thu, 1 Dec 2022 08:35:34 +0000 (08:35 +0000)] 
Temporarily revert to sleep in place of triggers

until issues with exec are resolved.

2 years agoCI: Correct port mapping for 389ds container
Nick Porter [Wed, 30 Nov 2022 11:46:21 +0000 (11:46 +0000)] 
CI: Correct port mapping for 389ds container

2 years agoHandle failure to copy args (CIS #1517104)
Nick Porter [Wed, 30 Nov 2022 08:15:51 +0000 (08:15 +0000)] 
Handle failure to copy args (CIS #1517104)

2 years agoDon't need to build everything to get pkg_version
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:34:42 +0000 (19:34 -0500)] 
Don't need to build everything to get pkg_version

2 years agoA better way...
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:26:26 +0000 (19:26 -0500)] 
A better way...

2 years agoFix local RPM build scripts
Arran Cudbard-Bell [Wed, 30 Nov 2022 00:19:28 +0000 (19:19 -0500)] 
Fix local RPM build scripts

2 years agochange (foo != bar) to !(foo == bar)
Alan T. DeKok [Tue, 29 Nov 2022 23:26:34 +0000 (18:26 -0500)] 
change  (foo != bar) to !(foo == bar)

See previous commit for long explanation, and Perl script which
made the changes

2 years agofix failing tests
Alan T. DeKok [Tue, 29 Nov 2022 23:19:30 +0000 (18:19 -0500)] 
fix failing tests

perl -p -i -e 's/\(([^ ]+) != ([^ ]+)\)/(!($1 == $2))/'  $(make test.keywords.help | sed 's,test\.keywords\.,src/tests/keywords/,g')

i.e. change

if (foo != bar) {
test_fail
}

to

if (!(foo == bar)) {
test_fail
}

The first test is "foo does not exist OR foo != bar"
the second test is "not ( foo exists AND foo == bar )"
which are very different.

After making that change, these tests failed.  So we've updated
the checks to be correct, which now make the tests succeed.

2 years agoif-paircmp uses the old-style conditions
Alan T. DeKok [Tue, 29 Nov 2022 23:18:35 +0000 (18:18 -0500)] 
if-paircmp uses the old-style conditions

2 years agodon't use "update"
Alan T. DeKok [Tue, 29 Nov 2022 23:16:26 +0000 (18:16 -0500)] 
don't use "update"

2 years agoupcast string to octets
Alan T. DeKok [Tue, 29 Nov 2022 21:42:56 +0000 (16:42 -0500)] 
upcast string to octets

everything else was upcast to octets anyways

2 years agoradict: Add new options (#4819)
Jorge Pereira [Tue, 29 Nov 2022 16:55:34 +0000 (13:55 -0300)] 
radict: Add new options (#4819)

-c print out in CSV format
-H print out the Headers

2 years agoremove unnecessary edit
Alan T. DeKok [Tue, 29 Nov 2022 08:46:36 +0000 (03:46 -0500)] 
remove unnecessary edit

probably left over from some earlier cleanup and rewrite

2 years agojust use real attributes in the control list
Alan T. DeKok [Tue, 29 Nov 2022 08:35:29 +0000 (03:35 -0500)] 
just use real attributes in the control list

2 years agoUse trigger to detect when server is ready in ldap_sync tests
Nick Porter [Mon, 14 Nov 2022 18:21:25 +0000 (18:21 +0000)] 
Use trigger to detect when server is ready in ldap_sync tests

More reliable than just a sleep 1

2 years agoAdd trigger calls to ldap_sync when syncs start and stop
Nick Porter [Mon, 14 Nov 2022 17:56:41 +0000 (17:56 +0000)] 
Add trigger calls to ldap_sync when syncs start and stop

2 years agoTake a copy of trigger args so async triggers have access to them
Nick Porter [Fri, 25 Nov 2022 16:06:31 +0000 (16:06 +0000)] 
Take a copy of trigger args so async triggers have access to them

2 years agoSimplify - cursor not needed just to prepend one pair
Nick Porter [Fri, 25 Nov 2022 14:07:27 +0000 (14:07 +0000)] 
Simplify - cursor not needed just to prepend one pair

2 years agoEphemeral xlats do not rely on xlat thread instance data
Nick Porter [Tue, 29 Nov 2022 10:29:31 +0000 (10:29 +0000)] 
Ephemeral xlats do not rely on xlat thread instance data

2 years agoInstantiate ephemeral xlat for trigger
Nick Porter [Thu, 24 Nov 2022 17:38:45 +0000 (17:38 +0000)] 
Instantiate ephemeral xlat for trigger

2 years agoFallback to internal dictionary if request->dict not set
Nick Porter [Thu, 24 Nov 2022 17:34:48 +0000 (17:34 +0000)] 
Fallback to internal dictionary if request->dict not set

Currently all trigger args are in the internal dictionary
and request->dict is not set.

2 years agodocs
Nick Porter [Thu, 24 Nov 2022 17:31:37 +0000 (17:31 +0000)] 
docs

2 years agoReduce debug noise for triggers not configured
Nick Porter [Mon, 14 Nov 2022 17:55:22 +0000 (17:55 +0000)] 
Reduce debug noise for triggers not configured

2 years agoupdate docs to match code
Alan T. DeKok [Fri, 25 Nov 2022 20:51:07 +0000 (15:51 -0500)] 
update docs to match code

2 years agoupdate local dictionaries for local variables.
Alan T. DeKok [Fri, 25 Nov 2022 19:58:32 +0000 (14:58 -0500)] 
update local dictionaries for local variables.

Right now this means that local variables are really just local
attribute definitions.  And we can then use those attributes
anywhere.  And, they're not cleaned up when the scope exits.

So... don't use them for now.

2 years agoAllow dictionaries to depend on each other
Alan T. DeKok [Fri, 25 Nov 2022 18:29:14 +0000 (13:29 -0500)] 
Allow dictionaries to depend on each other

and add API to see if the dictionaries are compatible.
Because we can no longer depend on comparing pointers

2 years agopreliminary code to interpret UNLANG_TYPE_VARIABLE
Alan T. DeKok [Fri, 25 Nov 2022 14:41:28 +0000 (09:41 -0500)] 
preliminary code to interpret UNLANG_TYPE_VARIABLE

does nothing right now, but at least doesn't crash if you try to
use local variables

2 years agoRemove redundant internal dictionary copy of LDAP-Sync attrs
Nick Porter [Thu, 24 Nov 2022 17:39:14 +0000 (17:39 +0000)] 
Remove redundant internal dictionary copy of LDAP-Sync attrs

2 years agoReport which sync is being started / abandoned
Nick Porter [Mon, 14 Nov 2022 17:51:57 +0000 (17:51 +0000)] 
Report which sync is being started / abandoned

2 years agoAdd UBNT dictionary (#4818)
Youfu Zhang [Fri, 25 Nov 2022 13:54:49 +0000 (21:54 +0800)] 
Add UBNT dictionary (#4818)

2 years agoCorrectly parent value boxes from their pairs
Nick Porter [Fri, 25 Nov 2022 12:31:25 +0000 (12:31 +0000)] 
Correctly parent value boxes from their pairs

2 years agopreliminary support for compiling local variables
Alan T. DeKok [Thu, 24 Nov 2022 20:04:40 +0000 (15:04 -0500)] 
preliminary support for compiling local variables

However, it doesn't quite work as yet.  The tmpl_rules_t have
parents, and this a parent dict to check.  But the pass2 resolution
functions just get passed the local dictionary, and not the entire
tmpl_rules_t.

As a result, the attributes are looked up in either the local
dictionary. or in the protocol one.  But there's no fallback
from one to the other.

2 years agouse consistent names
Alan T. DeKok [Thu, 24 Nov 2022 15:56:38 +0000 (10:56 -0500)] 
use consistent names

t_rules is tmpl_rules_t
at_rules is tmpl_attr_rules_t

2 years agotypo
Alan T. DeKok [Thu, 24 Nov 2022 14:39:43 +0000 (09:39 -0500)] 
typo

2 years agoadd fr_dict_protocol_alloc() for use with local dictionaries
Alan T. DeKok [Thu, 24 Nov 2022 14:39:02 +0000 (09:39 -0500)] 
add fr_dict_protocol_alloc() for use with local dictionaries

2 years agoupdate parser to allow local variable definitions
Alan T. DeKok [Thu, 24 Nov 2022 14:22:09 +0000 (09:22 -0500)] 
update parser to allow local variable definitions

and don't allow unlang statements inside of list assignments like

&request += {
...
}

This was previously parsed, and then would result in some weird
load-time error.  Forbidding it here makes the errors a bit clearer.

2 years agoalways initialize output buffer. Fixes #4816
Alan T. DeKok [Thu, 24 Nov 2022 13:14:42 +0000 (08:14 -0500)] 
always initialize output buffer.  Fixes #4816

2 years agoAdd max_outstanding option to limit number of processing ldap_sync packets
Nick Porter [Thu, 17 Nov 2022 19:48:06 +0000 (19:48 +0000)] 
Add max_outstanding option to limit number of processing ldap_sync packets

2 years agoAdd fr_network_listen_outstanding to get the number of outstanding packets
Nick Porter [Thu, 17 Nov 2022 19:28:47 +0000 (19:28 +0000)] 
Add fr_network_listen_outstanding to get the number of outstanding packets

2 years agoVersion number fixes for RPM packaging
Matthew Newton [Wed, 23 Nov 2022 20:20:17 +0000 (20:20 +0000)] 
Version number fixes for RPM packaging

2 years agoremove suse packaging
Matthew Newton [Wed, 23 Nov 2022 20:21:35 +0000 (20:21 +0000)] 
remove suse packaging

It's broken and not been seriously updated in nearly 10 years.

2 years agoCorrect CI test
Nick Porter [Wed, 23 Nov 2022 13:34:28 +0000 (13:34 +0000)] 
Correct CI test

2 years agoRemove duplicate code
Nick Porter [Wed, 23 Nov 2022 08:24:51 +0000 (08:24 +0000)] 
Remove duplicate code

2 years agoDon't leak fd on failure (CIS #1517024)
Nick Porter [Wed, 23 Nov 2022 08:21:28 +0000 (08:21 +0000)] 
Don't leak fd on failure (CIS #1517024)

2 years agoone more fix for CI
Alan T. DeKok [Tue, 22 Nov 2022 22:06:36 +0000 (17:06 -0500)] 
one more fix for CI

2 years agoallow for failed xlats to return empty strings, as a special case
Alan T. DeKok [Tue, 22 Nov 2022 21:11:18 +0000 (16:11 -0500)] 
allow for failed xlats to return empty strings, as a special case

&foo := "%{failed xlat}"

will return

&foo == ""

But

&foo := %{failed xlat}

without quotes, will not create &foo.

2 years agoMore updates to version number handling
Matthew Newton [Fri, 18 Nov 2022 22:52:43 +0000 (22:52 +0000)] 
More updates to version number handling

2 years agopass variable to function
Alan T. DeKok [Tue, 22 Nov 2022 15:40:06 +0000 (10:40 -0500)] 
pass variable to function

2 years agodocument request.[x] syntax
Alan T. DeKok [Tue, 22 Nov 2022 14:00:54 +0000 (09:00 -0500)] 
document request.[x] syntax

2 years agouse list.[*] instead of list[*]
Alan T. DeKok [Tue, 22 Nov 2022 13:47:43 +0000 (08:47 -0500)] 
use list.[*] instead of list[*]

2 years agouse control.[x]
Alan T. DeKok [Tue, 22 Nov 2022 13:41:50 +0000 (08:41 -0500)] 
use control.[x]

and change the tests from

(foo != bar)

to

!(foo == bar)

because the first one passes when "foo" doesn't exist.  So because
we didn't have control.[x], this test was actually failing for a
while, and no one noticed.

2 years agoadd tmpl_attr_unspec
Alan T. DeKok [Tue, 22 Nov 2022 13:37:23 +0000 (08:37 -0500)] 
add tmpl_attr_unspec

because otherwise tmpl_attr_tail_da() returns NULL when we have
constructs like %{control.[*]}.  And there are just too many
places in the code which do things like:

tmpl_attr_tail_da()->type

All of those are potential crash points if that function returns
NULL.

Instead, we add a canonical "unspec" attribute.  It has no name,
numbered zero, is "unknown", and is of FR_TYPE_NULL.  This allows
it to pass all of the derefencing code with "it will never match"

2 years agodon't auto-convert RHS xlats to attribute references
Alan T. DeKok [Tue, 22 Nov 2022 12:15:23 +0000 (07:15 -0500)] 
don't auto-convert RHS xlats to attribute references

if the caller cares, he can use

&foo := %{eval:%{xlat}}

If we care, we can add

&foo := &%{xlat}

2 years agobetter error messages
Alan T. DeKok [Mon, 21 Nov 2022 16:15:23 +0000 (11:15 -0500)] 
better error messages

show which assignment failed

2 years agoupdate docs to match current behavior
Alan T. DeKok [Mon, 21 Nov 2022 16:09:01 +0000 (11:09 -0500)] 
update docs to match current behavior

2 years agoAdd test for linelog header option
Nick Porter [Fri, 11 Nov 2022 13:55:38 +0000 (13:55 +0000)] 
Add test for linelog header option

2 years agoAdd header option to linelog
Nick Porter [Fri, 11 Nov 2022 13:54:53 +0000 (13:54 +0000)] 
Add header option to linelog

2 years agoAmend exfile_open() to optionally return the offset in the opened file
Nick Porter [Wed, 9 Nov 2022 17:52:22 +0000 (17:52 +0000)] 
Amend exfile_open() to optionally return the offset in the opened file

Allow for detecting a new / blank file so headers can be added.

2 years agoAdd support for unspecified attributes
Arran Cudbard-Bell [Tue, 22 Nov 2022 02:04:45 +0000 (18:04 -0800)] 
Add support for unspecified attributes

2 years agoAtt "last_is_*" functions for tmpls
Arran Cudbard-Bell [Tue, 22 Nov 2022 02:04:06 +0000 (18:04 -0800)] 
Att "last_is_*" functions for tmpls

2 years agos/tmpl_attr_count/tmpl_attr_num_elements/
Arran Cudbard-Bell [Tue, 22 Nov 2022 02:03:37 +0000 (18:03 -0800)] 
s/tmpl_attr_count/tmpl_attr_num_elements/

2 years agoMake it clear what's being returned with tmpl_attr accessors
Arran Cudbard-Bell [Mon, 21 Nov 2022 23:32:00 +0000 (15:32 -0800)] 
Make it clear what's being returned with tmpl_attr accessors

2 years agoIgnore depth
Arran Cudbard-Bell [Mon, 21 Nov 2022 21:49:25 +0000 (13:49 -0800)] 
Ignore depth

2 years agoUse tmpl accessor macros, and minor reformatting
Arran Cudbard-Bell [Mon, 21 Nov 2022 21:13:03 +0000 (13:13 -0800)] 
Use tmpl accessor macros, and minor reformatting

2 years agoFix sign warning in jlibtool
Arran Cudbard-Bell [Mon, 21 Nov 2022 21:10:43 +0000 (13:10 -0800)] 
Fix sign warning in jlibtool

2 years agoMissing header in tls/session.h
Arran Cudbard-Bell [Mon, 21 Nov 2022 21:09:42 +0000 (13:09 -0800)] 
Missing header in tls/session.h

2 years agoremove "debug attribute lists" from tests
Alan T. DeKok [Sun, 20 Nov 2022 13:02:12 +0000 (08:02 -0500)] 
remove "debug attribute lists" from tests

if the tests fail, a developer can add those manually

2 years agoit's OK for the RHS of an expansion to *not* be an attr ref
Alan T. DeKok [Sat, 19 Nov 2022 19:15:34 +0000 (14:15 -0500)] 
it's OK for the RHS of an expansion to *not* be an attr ref

We should really do

&foo := &%{...}

for "RHS is an attr ref".

A reasonable compromise is instead

&foo := %{...}

because that's a "bare word".  If the user wants a string on the
RHS, he can do

&foo := "%{...}"

and we won't try to parse the RHS as an attribute

2 years agopartial move to new edit list
Alan T. DeKok [Sat, 19 Nov 2022 14:21:33 +0000 (09:21 -0500)] 
partial move to new edit list

because using &control[*] is just weird.  And should likely not
be supported.

2 years agomove assert to before value-box alloc
Alan T. DeKok [Sat, 19 Nov 2022 12:38:53 +0000 (07:38 -0500)] 
move assert to before value-box alloc

because structural VPs are very different from structural
value-boxes.

So we should never create a structural value-box in a situation
where the intent is to use VPs

2 years agouse macros to initialize fields instead of memset
Alan T. DeKok [Fri, 18 Nov 2022 23:09:05 +0000 (18:09 -0500)] 
use macros to initialize fields instead of memset

for the odd case where we cast a pre-existing value-box from
a string, AND that string is zero length, the cast silently
succeeds BUT leaves the destination value-box as FR_TYPE_NULL

Which seems bad

2 years agofuture notes for -=
Alan T. DeKok [Fri, 18 Nov 2022 19:50:24 +0000 (14:50 -0500)] 
future notes for -=

2 years agocorrect order of comparisons
Alan T. DeKok [Fri, 18 Nov 2022 15:00:12 +0000 (10:00 -0500)] 
correct order of comparisons

2 years agocomments
Alan T. DeKok [Fri, 18 Nov 2022 14:38:30 +0000 (09:38 -0500)] 
comments

2 years agoprint operators, too
Alan T. DeKok [Fri, 18 Nov 2022 14:11:19 +0000 (09:11 -0500)] 
print operators, too

2 years agomake use-specific variables
Alan T. DeKok [Fri, 18 Nov 2022 13:50:50 +0000 (08:50 -0500)] 
make use-specific variables

so we can do nested loops with fr_pair_list_foreach() macros

2 years agogive parse error for behavior differences
Alan T. DeKok [Fri, 18 Nov 2022 13:29:31 +0000 (08:29 -0500)] 
give parse error for behavior differences

and give helpful suggestion for how to fix it

2 years agocompile-time error for things which aren't supported
Alan T. DeKok [Fri, 18 Nov 2022 13:16:52 +0000 (08:16 -0500)] 
compile-time error for things which aren't supported

2 years agonotes on which tests aren't converted, and why
Alan T. DeKok [Fri, 18 Nov 2022 13:16:32 +0000 (08:16 -0500)] 
notes on which tests aren't converted, and why

2 years agoallow &request = `exec stuff`
Alan T. DeKok [Fri, 18 Nov 2022 13:07:41 +0000 (08:07 -0500)] 
allow &request = `exec stuff`

2 years agoAdded Brocade-Cmd attribute sent in command accounting messages (#4808)
garrymar [Mon, 21 Nov 2022 15:04:24 +0000 (16:04 +0100)] 
Added Brocade-Cmd attribute sent in command accounting messages (#4808)

Extreme Networks, a vendor that still actively uses the enterprise
number 1588 (Brocade) in their products, added the attribute 8 (Cmd)
that contains a command line when command accounting is configured.

https://documentation.extremenetworks.com/slxos/sw/20xx/20.4.2/
security/GUID-D8ACA260-DA62-4128-B443-44584AD90D96.shtml

2 years agoCI: Remove uneeded package
Nick Porter [Mon, 21 Nov 2022 12:14:48 +0000 (12:14 +0000)] 
CI: Remove uneeded package

2 years agoFix docs to match dictionary
Arran Cudbard-Bell [Sat, 19 Nov 2022 18:46:55 +0000 (10:46 -0800)] 
Fix docs to match dictionary

2 years agoTypo
Arran Cudbard-Bell [Sat, 19 Nov 2022 18:39:39 +0000 (10:39 -0800)] 
Typo

2 years agoBump AC_PREREQ to 2.71 to avoid configure file churn
Arran Cudbard-Bell [Sat, 19 Nov 2022 18:36:32 +0000 (10:36 -0800)] 
Bump AC_PREREQ to 2.71 to avoid configure file churn

2 years agoneed line continuation
Matthew Newton [Fri, 18 Nov 2022 22:52:54 +0000 (22:52 +0000)] 
need line continuation

2 years agoCheck the return value of ldap_sync init functions
Nick Porter [Thu, 17 Nov 2022 19:42:43 +0000 (19:42 +0000)] 
Check the return value of ldap_sync init functions

2 years agoEnsure that cookie storage which fails to send is left on the queue
Nick Porter [Thu, 17 Nov 2022 19:46:52 +0000 (19:46 +0000)] 
Ensure that cookie storage which fails to send is left on the queue

2 years agoAdd a timer event to retry sending of queued change packets
Nick Porter [Thu, 17 Nov 2022 19:45:41 +0000 (19:45 +0000)] 
Add a timer event to retry sending of queued change packets

2 years agoUse a function to send change packets to the workers
Nick Porter [Thu, 17 Nov 2022 19:37:42 +0000 (19:37 +0000)] 
Use a function to send change packets to the workers

2 years agoBuild pair list within sync_packet_ctx
Nick Porter [Thu, 17 Nov 2022 19:34:15 +0000 (19:34 +0000)] 
Build pair list within sync_packet_ctx

So that packets which fail to send to the worker can be kept queued with
their pair list

2 years agomacos doesn't like big version numbers
Arran Cudbard-Bell [Fri, 18 Nov 2022 13:13:35 +0000 (07:13 -0600)] 
macos doesn't like big version numbers

2 years agouse API instead of direct access. Fixes #4608
Alan T. DeKok [Fri, 18 Nov 2022 12:40:18 +0000 (07:40 -0500)] 
use API instead of direct access.  Fixes #4608

2 years agoRPM spec: there is no LTB release for RH9, and default LDAP is good now
Matthew Newton [Fri, 18 Nov 2022 11:34:25 +0000 (11:34 +0000)] 
RPM spec: there is no LTB release for RH9, and default LDAP is good now

2 years agosrv_cred itself is NULL
Arran Cudbard-Bell [Thu, 17 Nov 2022 23:54:51 +0000 (17:54 -0600)] 
srv_cred itself is NULL

2 years agoTypo
Arran Cudbard-Bell [Thu, 17 Nov 2022 23:46:30 +0000 (17:46 -0600)] 
Typo

2 years agoDon't SEGV at DEBUG3 when running SASL
Arran Cudbard-Bell [Thu, 17 Nov 2022 23:41:50 +0000 (17:41 -0600)] 
Don't SEGV at DEBUG3 when running SASL

2 years agoDeal with null SASL fields
Arran Cudbard-Bell [Thu, 17 Nov 2022 23:21:54 +0000 (17:21 -0600)] 
Deal with null SASL fields

2 years agoRADIUSD_VERSION shouldn't contain a suffix
Arran Cudbard-Bell [Thu, 17 Nov 2022 22:58:52 +0000 (16:58 -0600)] 
RADIUSD_VERSION shouldn't contain a suffix