]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agoallow -f to specify all file names
Alan T. DeKok [Sat, 3 Dec 2022 13:07:36 +0000 (08:07 -0500)] 
allow -f to specify all file names

3 years agoEnsure output directory exists for extracted pcap
Nick Porter [Mon, 5 Dec 2022 12:41:37 +0000 (12:41 +0000)] 
Ensure output directory exists for extracted pcap

3 years agoshut up clang scan
Alan T. DeKok [Fri, 2 Dec 2022 22:40:16 +0000 (17:40 -0500)] 
shut up clang scan

3 years agoadd CoA filter and reply file to rc_file_pair_t
Alan T. DeKok [Fri, 2 Dec 2022 22:13:40 +0000 (17:13 -0500)] 
add CoA filter and reply file to rc_file_pair_t

3 years agouse dlists for filenames
Alan T. DeKok [Fri, 2 Dec 2022 21:54:10 +0000 (16:54 -0500)] 
use dlists for filenames

that way they get processed in the order that they appear in
on the command line, and not in some random order by sorting
the filename.

This isn't stricyly needed here, but will be needed for receiving
CoA packets.

3 years agoAdd -A Foo-Bar
Alan T. DeKok [Fri, 2 Dec 2022 21:19:27 +0000 (16:19 -0500)] 
Add -A Foo-Bar

so we can use an arbitrary attribute to match CoA packets to
outgoing requests

3 years agofirst pass at allowing radclient to read CoA packets
Alan T. DeKok [Fri, 2 Dec 2022 21:14:54 +0000 (16:14 -0500)] 
first pass at allowing radclient to read CoA packets

3 years agosimplify code.
Alan T. DeKok [Thu, 1 Dec 2022 21:55:52 +0000 (16:55 -0500)] 
simplify code.

xlat's have not been supported for a while.  So there's no reason
to manually root through the list looking for things.

3 years agouse dlist functions instead of hand-rolled things
Alan T. DeKok [Thu, 1 Dec 2022 20:11:30 +0000 (15:11 -0500)] 
use dlist functions instead of hand-rolled things

3 years agoadd === and !==
Alan T. DeKok [Thu, 1 Dec 2022 19:31:55 +0000 (14:31 -0500)] 
add === and !==

After other languages which have the same thing.

This is less useful for FreeRADIUS, as all "variables" are strongly
typed.  But it could be used for non-quoted xlats, and it could
be used in the future for "void" types

3 years agotests for expr with non-existent attributes
Alan T. DeKok [Tue, 29 Nov 2022 23:34:28 +0000 (18:34 -0500)] 
tests for expr with non-existent attributes

3 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

3 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.

3 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

3 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)

3 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

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

3 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

3 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

3 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.

3 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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

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

3 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.

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

3 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

3 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

3 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.

3 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

3 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

3 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

3 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

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

3 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

3 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.

3 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

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

3 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

3 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.

3 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

3 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

3 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

3 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

3 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.

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

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

3 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)

3 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

3 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.

3 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

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

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

3 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[*]

3 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.

3 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"

3 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}

3 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

3 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

3 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

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

3 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.

3 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

3 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

3 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/

3 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

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

3 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

3 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

3 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

3 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

3 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

3 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.

3 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

3 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

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

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

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

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

3 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

3 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

3 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

3 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

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

3 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

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

3 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

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

3 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

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

3 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

3 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