]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agowe don't need !!!!!!!!
Alan T. DeKok [Sun, 27 Aug 2023 18:57:19 +0000 (14:57 -0400)] 
we don't need !!!!!!!!

2 years agolet's set the configuration flag
Alan T. DeKok [Sun, 27 Aug 2023 18:37:12 +0000 (14:37 -0400)] 
let's set the configuration flag

2 years agoalways use new conditions
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.

2 years agoforce new conditions
Alan T. DeKok [Sun, 27 Aug 2023 13:57:13 +0000 (09:57 -0400)] 
force new conditions

2 years agoit helps to check the correct return code
Alan T. DeKok [Sun, 27 Aug 2023 13:32:44 +0000 (09:32 -0400)] 
it helps to check the correct return code

2 years agoRevert "just call value_box_cmp_op()"
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

2 years agotypos
Alan T. DeKok [Sun, 27 Aug 2023 12:45:42 +0000 (08:45 -0400)] 
typos

2 years agopaircmp works with new conditions
Alan T. DeKok [Sun, 27 Aug 2023 12:43:35 +0000 (08:43 -0400)] 
paircmp works with new conditions

2 years agomerge paircmp tests
Alan T. DeKok [Sun, 27 Aug 2023 12:42:08 +0000 (08:42 -0400)] 
merge paircmp tests

2 years agomove paircmp() to rlm_sql
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.

2 years agojust call value_box_cmp_op()
Alan T. DeKok [Sun, 27 Aug 2023 12:04:05 +0000 (08:04 -0400)] 
just call value_box_cmp_op()

2 years agoadded RFC 9445 dictionary
Alan T. DeKok [Sat, 26 Aug 2023 20:20:09 +0000 (16:20 -0400)] 
added RFC 9445 dictionary

2 years agoremove Client-Shortname and replace with %{client:shortname}
Alan T. DeKok [Sat, 26 Aug 2023 20:02:04 +0000 (16:02 -0400)] 
remove Client-Shortname and replace with %{client:shortname}

2 years agoPacket-Type is no longer virtual
Alan T. DeKok [Sat, 26 Aug 2023 19:53:26 +0000 (15:53 -0400)] 
Packet-Type is no longer virtual

2 years agoPacket-Type is a real attribute here, too
Alan T. DeKok [Sat, 26 Aug 2023 19:48:20 +0000 (15:48 -0400)] 
Packet-Type is a real attribute here, too

2 years agowe now always use one function: generic_cmp()
Alan T. DeKok [Sat, 26 Aug 2023 19:44:43 +0000 (15:44 -0400)] 
we now always use one function: generic_cmp()

2 years agoPacket-Type is now always a real attribute
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.

2 years agoremove xlat wrapper for paircmp
Alan T. DeKok [Sat, 26 Aug 2023 19:22:38 +0000 (15:22 -0400)] 
remove xlat wrapper for paircmp

2 years agominro cleanups
Alan T. DeKok [Sat, 26 Aug 2023 19:20:26 +0000 (15:20 -0400)] 
minro cleanups

2 years agoremove "firstonly"
Alan T. DeKok [Sat, 26 Aug 2023 19:17:31 +0000 (15:17 -0400)] 
remove "firstonly"

2 years agoremove "from" parameter
Alan T. DeKok [Sat, 26 Aug 2023 19:14:56 +0000 (15:14 -0400)] 
remove "from" parameter

2 years agoremove instance from paircmp()
Alan T. DeKok [Sat, 26 Aug 2023 19:08:45 +0000 (15:08 -0400)] 
remove instance from paircmp()

2 years agowe no longer need paircmp_unregister_instance()
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

2 years agoclarifications
Alan T. DeKok [Sat, 26 Aug 2023 18:43:43 +0000 (14:43 -0400)] 
clarifications

2 years agoAttempt to keep fr_nbo_to_foo() from tainting the pointer (#5156)
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.

2 years agoremove test paircmp, and this paircmp_register_by_name
Alan T. DeKok [Fri, 25 Aug 2023 14:59:18 +0000 (10:59 -0400)] 
remove test paircmp, and this paircmp_register_by_name

2 years agoremove Client-IP-Address, and replace with Packet-Src-IP-Address
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

2 years agoregenerate from updated source
Alan T. DeKok [Fri, 25 Aug 2023 14:50:46 +0000 (10:50 -0400)] 
regenerate from updated source

2 years agotypo
Alan T. DeKok [Fri, 25 Aug 2023 14:50:24 +0000 (10:50 -0400)] 
typo

2 years agomove winbind to %{winbind.group:...}
Alan T. DeKok [Fri, 25 Aug 2023 13:44:28 +0000 (09:44 -0400)] 
move winbind to %{winbind.group:...}

2 years agotry to shut up scanner
Alan T. DeKok [Fri, 25 Aug 2023 11:59:15 +0000 (07:59 -0400)] 
try to shut up scanner

2 years agotypos and word smithing
Alan T. DeKok [Fri, 25 Aug 2023 11:55:39 +0000 (07:55 -0400)] 
typos and word smithing

2 years agobe nice to people
Alan T. DeKok [Fri, 25 Aug 2023 11:55:28 +0000 (07:55 -0400)] 
be nice to people

2 years agocreate proper nested ctx
Alan T. DeKok [Fri, 25 Aug 2023 11:44:28 +0000 (07:44 -0400)] 
create proper nested ctx

2 years agoNo need for an intermediary variable
Nick Porter [Fri, 25 Aug 2023 08:47:35 +0000 (09:47 +0100)] 
No need for an intermediary variable

2 years agoAlways use expanded "if" condition
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.

2 years agoadd missing return
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.

2 years agoit helps to define the group attribute
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

2 years agoconvert Unix-Group to xlat
Alan T. DeKok [Thu, 24 Aug 2023 20:20:35 +0000 (16:20 -0400)] 
convert Unix-Group to xlat

2 years agopass in correct value
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?

2 years agoremove old paircmp, and update docs to match
Alan T. DeKok [Thu, 24 Aug 2023 19:06:34 +0000 (15:06 -0400)] 
remove old paircmp, and update docs to match

2 years agouse real names for counter start / end
Alan T. DeKok [Thu, 24 Aug 2023 18:57:37 +0000 (14:57 -0400)] 
use real names for counter start / end

2 years agoconvert horrific %b and %e to real attributes
Alan T. DeKok [Thu, 24 Aug 2023 18:46:24 +0000 (14:46 -0400)] 
convert horrific %b and %e to real attributes

2 years agotypo
Alan T. DeKok [Thu, 24 Aug 2023 18:33:24 +0000 (14:33 -0400)] 
typo

2 years agoadd and document cache_groups
Alan T. DeKok [Thu, 24 Aug 2023 15:25:55 +0000 (11:25 -0400)] 
add and document cache_groups

2 years agoremove paircmp() callback for SQL-Group
Alan T. DeKok [Thu, 24 Aug 2023 14:35:12 +0000 (10:35 -0400)] 
remove paircmp() callback for SQL-Group

2 years agoFix remaining uninitialized scalar values (CID #1503958, #1504020) (#5150)
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 &ether, 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.

2 years agoChange fr_vlog_perror() behavior in what might be an edge case (#5153)
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.

2 years agoTest LDAP xlat and map using ldapi:// scheme
Nick Porter [Thu, 24 Aug 2023 13:50:56 +0000 (14:50 +0100)] 
Test LDAP xlat and map using ldapi:// scheme

2 years agoUse ldap_url_desc2str to canonify LDAP host URI
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/...

2 years agoAdd LDAP test using ldapi:// scheme
Nick Porter [Thu, 24 Aug 2023 13:22:19 +0000 (14:22 +0100)] 
Add LDAP test using ldapi:// scheme

2 years agoSet LDAP servers start to 0 in tests
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

2 years agoAdd LDAP test using SASL for user auth binds
Nick Porter [Thu, 24 Aug 2023 12:57:48 +0000 (13:57 +0100)] 
Add LDAP test using SASL for user auth binds

2 years agoldap_debug is no longer in module config
Nick Porter [Thu, 24 Aug 2023 10:54:03 +0000 (11:54 +0100)] 
ldap_debug is no longer in module config

2 years agoCorrectly parent value boxes when concatenating
Nick Porter [Thu, 24 Aug 2023 10:53:30 +0000 (11:53 +0100)] 
Correctly parent value boxes when concatenating

2 years agoCorrectly escape LDAP uri in map
Nick Porter [Thu, 24 Aug 2023 10:44:53 +0000 (11:44 +0100)] 
Correctly escape LDAP uri in map

2 years agoTidy up
Nick Porter [Thu, 24 Aug 2023 10:33:46 +0000 (11:33 +0100)] 
Tidy up

2 years agoAdd regex to allow ldapi:// peercred admin binds in tests
Nick Porter [Thu, 24 Aug 2023 10:23:36 +0000 (11:23 +0100)] 
Add regex to allow ldapi:// peercred admin binds in tests

2 years agoAllow Symas LDAP packages for test server and add ldapi:// listener
Nick Porter [Thu, 24 Aug 2023 10:22:45 +0000 (11:22 +0100)] 
Allow Symas LDAP packages for test server and add ldapi:// listener

2 years agoRework LDAP xlat timeout / cancel callbacks
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.

2 years agoUse boolean enum in ldap group membership xlat
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

2 years agoRename fr_dhcv4_raw_packet_recv() as fr_dhcpv4_raw_packet_recv()
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()

2 years agoCorrect tests where xlat outputs boolean
Nick Porter [Wed, 23 Aug 2023 16:26:38 +0000 (17:26 +0100)] 
Correct tests where xlat outputs boolean

2 years agoPay attention to return value of fr_trunk_request_enqueue
Nick Porter [Wed, 23 Aug 2023 15:00:53 +0000 (16:00 +0100)] 
Pay attention to return value of fr_trunk_request_enqueue

2 years agoRe-work failure paths to ensure correct cleanups
Nick Porter [Wed, 23 Aug 2023 15:00:02 +0000 (16:00 +0100)] 
Re-work failure paths to ensure correct cleanups

2 years agotypo
Alan T. DeKok [Wed, 23 Aug 2023 17:43:06 +0000 (13:43 -0400)] 
typo

2 years agowe don't need to rename the SQL-Group attribute
Alan T. DeKok [Wed, 23 Aug 2023 16:56:37 +0000 (12:56 -0400)] 
we don't need to rename the SQL-Group attribute

2 years agothe register function automatically adds our instance name
Alan T. DeKok [Wed, 23 Aug 2023 15:09:08 +0000 (11:09 -0400)] 
the register function automatically adds our instance name

2 years agorespect group_attribute and update it to sql.group
Alan T. DeKok [Wed, 23 Aug 2023 14:23:09 +0000 (10:23 -0400)] 
respect group_attribute and update it to sql.group

2 years agoprint error and fail if registration fails
Alan T. DeKok [Wed, 23 Aug 2023 14:19:24 +0000 (10:19 -0400)] 
print error and fail if registration fails

2 years agoremove logintime module
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

2 years agoadd rule to make adoc file from configuration
Alan T. DeKok [Wed, 23 Aug 2023 14:15:29 +0000 (10:15 -0400)] 
add rule to make adoc file from configuration

2 years agomove SQL-Group ==... to %{sql.group:...}
Alan T. DeKok [Wed, 23 Aug 2023 13:50:57 +0000 (09:50 -0400)] 
move SQL-Group ==... to %{sql.group:...}

2 years agono escaping is done, so we don't need func _or_ uctx
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

2 years agoUse a dummy escape function to satisfy xlat arg validation
Nick Porter [Wed, 23 Aug 2023 09:15:25 +0000 (10:15 +0100)] 
Use a dummy escape function to satisfy xlat arg validation

2 years agoadd %{sql.group:name}
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.

2 years agomove group check to stand-alone function
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}

2 years agowarn on not removing immutable attribute
Alan T. DeKok [Tue, 22 Aug 2023 19:55:01 +0000 (15:55 -0400)] 
warn on not removing immutable attribute

2 years agoFix missing \n (#5155)
Jorge Pereira [Wed, 23 Aug 2023 01:08:11 +0000 (22:08 -0300)] 
Fix missing \n (#5155)

2 years agoMake the configure scripts work better on macOS
Arran Cudbard-Bell [Tue, 22 Aug 2023 21:46:17 +0000 (15:46 -0600)] 
Make the configure scripts work better on macOS

2 years agocleanups as per unit tests
Alan T. DeKok [Tue, 22 Aug 2023 14:39:10 +0000 (10:39 -0400)] 
cleanups as per unit tests

2 years agoforce these flags, too
Alan T. DeKok [Tue, 22 Aug 2023 14:11:59 +0000 (10:11 -0400)] 
force these flags, too

2 years agodon't sort if the list is already flat.
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

2 years agomake sorting a bit better
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

2 years agoalso print out offset if the input is long
Alan T. DeKok [Tue, 22 Aug 2023 12:43:48 +0000 (08:43 -0400)] 
also print out offset if the input is long

2 years agoshow which attribute had the issue
Alan T. DeKok [Tue, 22 Aug 2023 12:43:28 +0000 (08:43 -0400)] 
show which attribute had the issue

2 years agoHave struct encoder return the PAIR_ENCODE_FATAL_ERROR constant
Arran Cudbard-Bell [Tue, 22 Aug 2023 02:03:52 +0000 (20:03 -0600)] 
Have struct encoder return the PAIR_ENCODE_FATAL_ERROR constant

2 years agoldap: Typo
Arran Cudbard-Bell [Mon, 21 Aug 2023 23:40:44 +0000 (17:40 -0600)] 
ldap: Typo

2 years agoxlat: Fix xlat alternations that use functions
Arran Cudbard-Bell [Mon, 21 Aug 2023 22:58:16 +0000 (16:58 -0600)] 
xlat: Fix xlat alternations that use functions

2 years agoldap: Print why URI parsing failed
Arran Cudbard-Bell [Thu, 17 Aug 2023 21:17:13 +0000 (15:17 -0600)] 
ldap: Print why URI parsing failed

2 years agolet's make tests pass
Alan T. DeKok [Mon, 21 Aug 2023 22:19:46 +0000 (18:19 -0400)] 
let's make tests pass

2 years ago+= also means "create if it doesn't exist"
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.

2 years agoupdate for new behavior of :=
Alan T. DeKok [Mon, 21 Aug 2023 21:37:44 +0000 (17:37 -0400)] 
update for new behavior of :=

2 years agohoist checks to be more consistent
Alan T. DeKok [Mon, 21 Aug 2023 21:19:58 +0000 (17:19 -0400)] 
hoist checks to be more consistent

2 years agoupdate behavior of :=
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

2 years agoReassure coverity (CID #1504052) (#5152)
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.

2 years agoforce flatten unless migration flags are set
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

2 years agoadd flatten migration configuration
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

2 years agoprint out more text around mismatch so we can better find it
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

2 years agoadd unflatten_after_encode for test API
Alan T. DeKok [Mon, 21 Aug 2023 15:18:27 +0000 (11:18 -0400)] 
add unflatten_after_encode for test API