]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Sun, 27 Aug 2023 18:57:19 +0000 (14:57 -0400)]
we don't need !!!!!!!!
Alan T. DeKok [Sun, 27 Aug 2023 18:37:12 +0000 (14:37 -0400)]
let's set the configuration flag
Alan T. DeKok [Sun, 27 Aug 2023 14:57:22 +0000 (10:57 -0400)]
always use new conditions
Let's set a simple flag to see if anything breaks. That way if
something bad does happen, we only have to revert one line of code.
If everything works. we can then start on the longer process of
removing all of the old condition code.
Alan T. DeKok [Sun, 27 Aug 2023 13:57:13 +0000 (09:57 -0400)]
force new conditions
Alan T. DeKok [Sun, 27 Aug 2023 13:32:44 +0000 (09:32 -0400)]
it helps to check the correct return code
Alan T. DeKok [Sun, 27 Aug 2023 13:17:50 +0000 (09:17 -0400)]
Revert "just call value_box_cmp_op()"
This reverts commit
922064282139d6d30b60e108ee68cf81d55bf156 .
seems to result in talloc failures? It's not clear why, but in
the interest of moving forward in other places, we'll just revert
this
Alan T. DeKok [Sun, 27 Aug 2023 12:45:42 +0000 (08:45 -0400)]
typos
Alan T. DeKok [Sun, 27 Aug 2023 12:43:35 +0000 (08:43 -0400)]
paircmp works with new conditions
Alan T. DeKok [Sun, 27 Aug 2023 12:42:08 +0000 (08:42 -0400)]
merge paircmp tests
Alan T. DeKok [Sun, 27 Aug 2023 12:34:11 +0000 (08:34 -0400)]
move paircmp() to rlm_sql
and drastically simplify it. The behavior is similar enough for
most cases, except:
* regular expression operators are no longer supported. It's not
hard to re-add them. As they're not needed right now, they can
be temporarily removed
* virtual attributes like Packet-Src-IP-Address are not supported
Again, this isn't terribly difficult to re-add. But once the
Packet-* attributes are moved to Net.* attributes, then any
virtual attribute comparisons become much less useful.
The remainder are Virtual-Server, Request-Processing-Stage,
and Module-Return-Code. Those could arguably all be moved to
realized attributes in the control list. And be made immutable,
so that "unlang" can't change them.
Alan T. DeKok [Sun, 27 Aug 2023 12:04:05 +0000 (08:04 -0400)]
just call value_box_cmp_op()
Alan T. DeKok [Sat, 26 Aug 2023 20:20:09 +0000 (16:20 -0400)]
added RFC 9445 dictionary
Alan T. DeKok [Sat, 26 Aug 2023 20:02:04 +0000 (16:02 -0400)]
remove Client-Shortname and replace with %{client:shortname}
Alan T. DeKok [Sat, 26 Aug 2023 19:53:26 +0000 (15:53 -0400)]
Packet-Type is no longer virtual
Alan T. DeKok [Sat, 26 Aug 2023 19:48:20 +0000 (15:48 -0400)]
Packet-Type is a real attribute here, too
Alan T. DeKok [Sat, 26 Aug 2023 19:44:43 +0000 (15:44 -0400)]
we now always use one function: generic_cmp()
Alan T. DeKok [Sat, 26 Aug 2023 19:41:24 +0000 (15:41 -0400)]
Packet-Type is now always a real attribute
which means that we don't need a virtual attribute callback for it.
Alan T. DeKok [Sat, 26 Aug 2023 19:22:38 +0000 (15:22 -0400)]
remove xlat wrapper for paircmp
Alan T. DeKok [Sat, 26 Aug 2023 19:20:26 +0000 (15:20 -0400)]
minro cleanups
Alan T. DeKok [Sat, 26 Aug 2023 19:17:31 +0000 (15:17 -0400)]
remove "firstonly"
Alan T. DeKok [Sat, 26 Aug 2023 19:14:56 +0000 (15:14 -0400)]
remove "from" parameter
Alan T. DeKok [Sat, 26 Aug 2023 19:08:45 +0000 (15:08 -0400)]
remove instance from paircmp()
Alan T. DeKok [Sat, 26 Aug 2023 19:02:04 +0000 (15:02 -0400)]
we no longer need paircmp_unregister_instance()
no modules have registered paircmp() functions
Alan T. DeKok [Sat, 26 Aug 2023 18:43:43 +0000 (14:43 -0400)]
clarifications
James Jones [Fri, 25 Aug 2023 15:43:24 +0000 (10:43 -0500)]
Attempt to keep fr_nbo_to_foo() from tainting the pointer (#5156)
Related CIDs: #
12433443 , #
1448182 , #
1520415 , #
1503937 , #
1503914
Coverity claims the fr_nbo_to_foo() functions taint the pointer
passed to it. Thereafter, any data accessed via that pointer is
considered tainted, and any copy of the pointer has the same
issue.
Something like this (copying the passed pointer to a local--with
any optimization, register coalescence will mean this has zero
overhead, BTW--is the only thing that comes to mind to work around
the issue.
Alan T. DeKok [Fri, 25 Aug 2023 14:59:18 +0000 (10:59 -0400)]
remove test paircmp, and this paircmp_register_by_name
Alan T. DeKok [Fri, 25 Aug 2023 14:51:09 +0000 (10:51 -0400)]
remove Client-IP-Address, and replace with Packet-Src-IP-Address
this is made more problematic by the fact that DHCPv4 defines its
own Client-IP-Address, which is something different.
And there are also FreeRADIUS-Client-IP-Address for dynamic clients,
and FreeRADIUS-Stats-Client-IP-Address for statistics. Both of
those should be replaced with better names, and nested TLVs
Alan T. DeKok [Fri, 25 Aug 2023 14:50:46 +0000 (10:50 -0400)]
regenerate from updated source
Alan T. DeKok [Fri, 25 Aug 2023 14:50:24 +0000 (10:50 -0400)]
typo
Alan T. DeKok [Fri, 25 Aug 2023 13:44:28 +0000 (09:44 -0400)]
move winbind to %{winbind.group:...}
Alan T. DeKok [Fri, 25 Aug 2023 11:59:15 +0000 (07:59 -0400)]
try to shut up scanner
Alan T. DeKok [Fri, 25 Aug 2023 11:55:39 +0000 (07:55 -0400)]
typos and word smithing
Alan T. DeKok [Fri, 25 Aug 2023 11:55:28 +0000 (07:55 -0400)]
be nice to people
Alan T. DeKok [Fri, 25 Aug 2023 11:44:28 +0000 (07:44 -0400)]
create proper nested ctx
Nick Porter [Fri, 25 Aug 2023 08:47:35 +0000 (09:47 +0100)]
No need for an intermediary variable
Nick Porter [Thu, 24 Aug 2023 18:54:07 +0000 (19:54 +0100)]
Always use expanded "if" condition
Makes debug output correct when variables are referenced in conditions.
Alan T. DeKok [Thu, 24 Aug 2023 21:09:38 +0000 (17:09 -0400)]
add missing return
I wish to write an "Ode to C compilers". It will be composed
moslty of curse words.
Alan T. DeKok [Thu, 24 Aug 2023 20:28:47 +0000 (16:28 -0400)]
it helps to define the group attribute
as paircmp no longer does that for us
Alan T. DeKok [Thu, 24 Aug 2023 20:20:35 +0000 (16:20 -0400)]
convert Unix-Group to xlat
Alan T. DeKok [Thu, 24 Aug 2023 19:57:55 +0000 (15:57 -0400)]
pass in correct value
Why won't the local compiler complain?
Alan T. DeKok [Thu, 24 Aug 2023 19:06:34 +0000 (15:06 -0400)]
remove old paircmp, and update docs to match
Alan T. DeKok [Thu, 24 Aug 2023 18:57:37 +0000 (14:57 -0400)]
use real names for counter start / end
Alan T. DeKok [Thu, 24 Aug 2023 18:46:24 +0000 (14:46 -0400)]
convert horrific %b and %e to real attributes
Alan T. DeKok [Thu, 24 Aug 2023 18:33:24 +0000 (14:33 -0400)]
typo
Alan T. DeKok [Thu, 24 Aug 2023 15:25:55 +0000 (11:25 -0400)]
add and document cache_groups
Alan T. DeKok [Thu, 24 Aug 2023 14:35:12 +0000 (10:35 -0400)]
remove paircmp() callback for SQL-Group
James Jones [Thu, 24 Aug 2023 15:26:25 +0000 (10:26 -0500)]
Fix remaining uninitialized scalar values (CID #
1503958 , #
1504020 ) (#5150)
The latter issue was interesting; the dbuff is set to use ether.addr,
but fr_value_box_ethernet_addr() is passed ðer, which looks like
it will put random garbage in the value box until you notice that
the address is the only member of the type. We'll see whether coverity
considers (fr_ethernet_t * const) fr_dbuff_start(&dbuff) a dangerous
downcast (whatever that means in C) and still complains. I hope not,
because the only reason that comes to mind for it is alignment issues,
which shouldn't happen here.
James Jones [Thu, 24 Aug 2023 15:25:42 +0000 (10:25 -0500)]
Change fr_vlog_perror() behavior in what might be an edge case (#5153)
As things stand, if the error stack is non-empty and fmt is null,
the copy of f_rules->first_prefix to sbuff won't make any
difference.
Nick Porter [Thu, 24 Aug 2023 13:50:56 +0000 (14:50 +0100)]
Test LDAP xlat and map using ldapi:// scheme
Nick Porter [Thu, 24 Aug 2023 13:42:57 +0000 (14:42 +0100)]
Use ldap_url_desc2str to canonify LDAP host URI
Gives consistent host URI strings for looking up trunk connections.
Also appears to catch some invalid URIs which ldap_url_parse does not -
e.g. ldap://%2Ftmp%2fldap/...
Nick Porter [Thu, 24 Aug 2023 13:22:19 +0000 (14:22 +0100)]
Add LDAP test using ldapi:// scheme
Nick Porter [Thu, 24 Aug 2023 13:04:38 +0000 (14:04 +0100)]
Set LDAP servers start to 0 in tests
Reduces noise in logs as only the relevant server connection starts
Nick Porter [Thu, 24 Aug 2023 12:57:48 +0000 (13:57 +0100)]
Add LDAP test using SASL for user auth binds
Nick Porter [Thu, 24 Aug 2023 10:54:03 +0000 (11:54 +0100)]
ldap_debug is no longer in module config
Nick Porter [Thu, 24 Aug 2023 10:53:30 +0000 (11:53 +0100)]
Correctly parent value boxes when concatenating
Nick Porter [Thu, 24 Aug 2023 10:44:53 +0000 (11:44 +0100)]
Correctly escape LDAP uri in map
Nick Porter [Thu, 24 Aug 2023 10:33:46 +0000 (11:33 +0100)]
Tidy up
Nick Porter [Thu, 24 Aug 2023 10:23:36 +0000 (11:23 +0100)]
Add regex to allow ldapi:// peercred admin binds in tests
Nick Porter [Thu, 24 Aug 2023 10:22:45 +0000 (11:22 +0100)]
Allow Symas LDAP packages for test server and add ldapi:// listener
Nick Porter [Wed, 23 Aug 2023 18:34:08 +0000 (19:34 +0100)]
Rework LDAP xlat timeout / cancel callbacks
To handle the case where the request has returned but the query has not
yet resumed.
In this case there is no outstanding request to cancel.
Nick Porter [Wed, 23 Aug 2023 18:28:57 +0000 (19:28 +0100)]
Use boolean enum in ldap group membership xlat
To be consistent with SQL group membership xlat
James Jones [Wed, 23 Aug 2023 18:50:32 +0000 (13:50 -0500)]
Rename fr_dhcv4_raw_packet_recv() as fr_dhcpv4_raw_packet_recv()
Nick Porter [Wed, 23 Aug 2023 16:26:38 +0000 (17:26 +0100)]
Correct tests where xlat outputs boolean
Nick Porter [Wed, 23 Aug 2023 15:00:53 +0000 (16:00 +0100)]
Pay attention to return value of fr_trunk_request_enqueue
Nick Porter [Wed, 23 Aug 2023 15:00:02 +0000 (16:00 +0100)]
Re-work failure paths to ensure correct cleanups
Alan T. DeKok [Wed, 23 Aug 2023 17:43:06 +0000 (13:43 -0400)]
typo
Alan T. DeKok [Wed, 23 Aug 2023 16:56:37 +0000 (12:56 -0400)]
we don't need to rename the SQL-Group attribute
Alan T. DeKok [Wed, 23 Aug 2023 15:09:08 +0000 (11:09 -0400)]
the register function automatically adds our instance name
Alan T. DeKok [Wed, 23 Aug 2023 14:23:09 +0000 (10:23 -0400)]
respect group_attribute and update it to sql.group
Alan T. DeKok [Wed, 23 Aug 2023 14:19:24 +0000 (10:19 -0400)]
print error and fail if registration fails
Alan T. DeKok [Wed, 23 Aug 2023 14:16:09 +0000 (10:16 -0400)]
remove logintime module
and all references to it, and the attributes it uses
Alan T. DeKok [Wed, 23 Aug 2023 14:15:29 +0000 (10:15 -0400)]
add rule to make adoc file from configuration
Alan T. DeKok [Wed, 23 Aug 2023 13:50:57 +0000 (09:50 -0400)]
move SQL-Group ==... to %{sql.group:...}
Alan T. DeKok [Wed, 23 Aug 2023 13:12:41 +0000 (09:12 -0400)]
no escaping is done, so we don't need func _or_ uctx
Nick Porter [Wed, 23 Aug 2023 09:15:25 +0000 (10:15 +0100)]
Use a dummy escape function to satisfy xlat arg validation
Alan T. DeKok [Wed, 23 Aug 2023 01:36:04 +0000 (21:36 -0400)]
add %{sql.group:name}
to replace SQL-Group == ...
which was misleading because it didn't allow !=, or =~, etc.
Alan T. DeKok [Wed, 23 Aug 2023 01:18:45 +0000 (21:18 -0400)]
move group check to stand-alone function
in preparation for adding %{sql.group:name}
Alan T. DeKok [Tue, 22 Aug 2023 19:55:01 +0000 (15:55 -0400)]
warn on not removing immutable attribute
Jorge Pereira [Wed, 23 Aug 2023 01:08:11 +0000 (22:08 -0300)]
Fix missing \n (#5155)
Arran Cudbard-Bell [Tue, 22 Aug 2023 21:46:17 +0000 (15:46 -0600)]
Make the configure scripts work better on macOS
Alan T. DeKok [Tue, 22 Aug 2023 14:39:10 +0000 (10:39 -0400)]
cleanups as per unit tests
Alan T. DeKok [Tue, 22 Aug 2023 14:11:59 +0000 (10:11 -0400)]
force these flags, too
Alan T. DeKok [Tue, 22 Aug 2023 13:01:55 +0000 (09:01 -0400)]
don't sort if the list is already flat.
That breaks things due to key fields + child structs
Alan T. DeKok [Tue, 22 Aug 2023 12:57:28 +0000 (08:57 -0400)]
make sorting a bit better
like attributes are now sorted together
Alan T. DeKok [Tue, 22 Aug 2023 12:43:48 +0000 (08:43 -0400)]
also print out offset if the input is long
Alan T. DeKok [Tue, 22 Aug 2023 12:43:28 +0000 (08:43 -0400)]
show which attribute had the issue
Arran Cudbard-Bell [Tue, 22 Aug 2023 02:03:52 +0000 (20:03 -0600)]
Have struct encoder return the PAIR_ENCODE_FATAL_ERROR constant
Arran Cudbard-Bell [Mon, 21 Aug 2023 23:40:44 +0000 (17:40 -0600)]
ldap: Typo
Arran Cudbard-Bell [Mon, 21 Aug 2023 22:58:16 +0000 (16:58 -0600)]
xlat: Fix xlat alternations that use functions
Arran Cudbard-Bell [Thu, 17 Aug 2023 21:17:13 +0000 (15:17 -0600)]
ldap: Print why URI parsing failed
Alan T. DeKok [Mon, 21 Aug 2023 22:19:46 +0000 (18:19 -0400)]
let's make tests pass
Alan T. DeKok [Mon, 21 Aug 2023 21:58:41 +0000 (17:58 -0400)]
+= also means "create if it doesn't exist"
at least for operations where "+=" is meaningful
We probably want to do something similar for union, merge, etc.
if the LHS doesn't exist.
Alan T. DeKok [Mon, 21 Aug 2023 21:37:44 +0000 (17:37 -0400)]
update for new behavior of :=
Alan T. DeKok [Mon, 21 Aug 2023 21:19:58 +0000 (17:19 -0400)]
hoist checks to be more consistent
Alan T. DeKok [Mon, 21 Aug 2023 21:15:19 +0000 (17:15 -0400)]
update behavior of :=
if RHS expansion fails, it still nukes all of the LHS
James Jones [Mon, 21 Aug 2023 19:02:21 +0000 (14:02 -0500)]
Reassure coverity (CID #
1504052 ) (#5152)
Non-group structural type attributes may always have a namespace
hash table, but coverity can't figure that out.
Alan T. DeKok [Mon, 21 Aug 2023 16:22:39 +0000 (12:22 -0400)]
force flatten unless migration flags are set
this means we can safely update all of the decoders to create
nested attributes
Alan T. DeKok [Mon, 21 Aug 2023 16:16:54 +0000 (12:16 -0400)]
add flatten migration configuration
it turns out "unflatten" is hard, so we need to find a better way
to deal with things
Alan T. DeKok [Mon, 21 Aug 2023 15:18:45 +0000 (11:18 -0400)]
print out more text around mismatch so we can better find it
Alan T. DeKok [Mon, 21 Aug 2023 15:18:27 +0000 (11:18 -0400)]
add unflatten_after_encode for test API