]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agoadd state maching support for auth restart and auth error
Alan T. DeKok [Tue, 14 Feb 2023 12:56:45 +0000 (07:56 -0500)] 
add state maching support for auth restart and auth error

2 years agoclose sockets on unrecoverable errors.
Alan T. DeKok [Tue, 14 Feb 2023 12:52:52 +0000 (07:52 -0500)] 
close sockets on unrecoverable errors.

Apparently "failure to do accounting" is not an unrecoverable
error?

2 years agoremove unused dynamic client code
Alan T. DeKok [Tue, 14 Feb 2023 12:41:10 +0000 (07:41 -0500)] 
remove unused dynamic client code

2 years agoadd and document maximum number of allowed rounds
Alan T. DeKok [Tue, 14 Feb 2023 12:38:00 +0000 (07:38 -0500)] 
add and document maximum number of allowed rounds

for challenge / response

2 years agoenforce valid values for flag field
Alan T. DeKok [Tue, 14 Feb 2023 02:57:41 +0000 (21:57 -0500)] 
enforce valid values for flag field

2 years agoenforce valid sequence numbers
Alan T. DeKok [Tue, 14 Feb 2023 02:48:01 +0000 (21:48 -0500)] 
enforce valid sequence numbers

2 years agomore cleanups and adding multiple variables
Alan T. DeKok [Tue, 14 Feb 2023 02:26:16 +0000 (21:26 -0500)] 
more cleanups and adding multiple variables

which each point to interesting things in the packet.

this change makes it much easier to figure out which pointer
is getting passed to what, and why.

2 years agobe clearer about checking argc for overflows.
Alan T. DeKok [Mon, 13 Feb 2023 20:41:06 +0000 (15:41 -0500)] 
be clearer about checking argc for overflows.

Should fix the fuzzer issues.

2 years agocheck the right field
Alan T. DeKok [Mon, 13 Feb 2023 16:47:39 +0000 (11:47 -0500)] 
check the right field

2 years agoprint the correct names
Alan T. DeKok [Mon, 13 Feb 2023 15:40:00 +0000 (10:40 -0500)] 
print the correct names

2 years ago<=, not <
Alan T. DeKok [Mon, 13 Feb 2023 14:11:05 +0000 (09:11 -0500)] 
<=, not <

2 years agoclean up automatic state machine
Alan T. DeKok [Mon, 13 Feb 2023 13:47:28 +0000 (08:47 -0500)] 
clean up automatic state machine

2 years agomove calls to nonblock() into RADIUS/TACACS
Alan T. DeKok [Mon, 13 Feb 2023 13:30:15 +0000 (08:30 -0500)] 
move calls to nonblock() into RADIUS/TACACS

until such time as we fix radmin

2 years agoRevert "all TCP sockets are non-blocking"
Alan T. DeKok [Mon, 13 Feb 2023 13:29:13 +0000 (08:29 -0500)] 
Revert "all TCP sockets are non-blocking"

This reverts commit 3a6dbf3002085d257832d10367b1174cbcdf213c.

until we find out why this breaks radmin

2 years agodon't set Auth-Type from Authentication-Type
Alan T. DeKok [Mon, 13 Feb 2023 13:28:32 +0000 (08:28 -0500)] 
don't set Auth-Type from Authentication-Type

They're both integers, and their enumeration values are different.
the names are the same, but we can't copy names.

Or maybe we want to do that?

2 years agoprint out User-Password just like for RADIUS
Alan T. DeKok [Mon, 13 Feb 2023 13:19:17 +0000 (08:19 -0500)] 
print out User-Password just like for RADIUS

2 years agocheck size of header
Alan T. DeKok [Mon, 13 Feb 2023 12:40:50 +0000 (07:40 -0500)] 
check size of header

2 years agocopy vp
Alan T. DeKok [Mon, 13 Feb 2023 00:33:27 +0000 (19:33 -0500)] 
copy vp

2 years agotypo
Alan T. DeKok [Sun, 12 Feb 2023 23:58:35 +0000 (18:58 -0500)] 
typo

2 years agotrack and restore User-Name, etc. across multiple rounds
Alan T. DeKok [Sun, 12 Feb 2023 23:30:13 +0000 (18:30 -0500)] 
track and restore User-Name, etc. across multiple rounds

2 years agolinelog: Typo
Arran Cudbard-Bell [Sun, 12 Feb 2023 19:06:12 +0000 (13:06 -0600)] 
linelog: Typo

2 years agolinelog: We no longer require format or ref as we can call the module via an xlat
Arran Cudbard-Bell [Sun, 12 Feb 2023 18:06:58 +0000 (12:06 -0600)] 
linelog:  We no longer require format or ref as we can call the module via an xlat

2 years agolinelog: Fix type mismatch
Arran Cudbard-Bell [Sun, 12 Feb 2023 17:37:53 +0000 (11:37 -0600)] 
linelog: Fix type mismatch

2 years agoMake sure session-state VPs are created properly
Arran Cudbard-Bell [Sun, 12 Feb 2023 06:28:04 +0000 (00:28 -0600)] 
Make sure session-state VPs are created properly

2 years agocheck more corner cases for setting reply->code
Alan T. DeKok [Sun, 12 Feb 2023 16:17:58 +0000 (11:17 -0500)] 
check more corner cases for setting reply->code

and accounting sections *must* return "ok" in order to send replies

hoist more common logic into reply_code() function, too

2 years agomove definition for consistencty
Alan T. DeKok [Sun, 12 Feb 2023 15:59:07 +0000 (10:59 -0500)] 
move definition for consistencty

and "no accounting reply" is "failure", not "success"

2 years agocheck argv[] before doing any decoding of packets.
Alan T. DeKok [Sun, 12 Feb 2023 15:15:32 +0000 (10:15 -0500)] 
check argv[] before doing any decoding of packets.

2 years agodo quick first pass on checking packer header and lengths
Alan T. DeKok [Sun, 12 Feb 2023 15:08:32 +0000 (10:08 -0500)] 
do quick first pass on checking packer header and lengths

2 years agotests depend on the tacacs protocol library, too
Alan T. DeKok [Sun, 12 Feb 2023 14:49:44 +0000 (09:49 -0500)] 
tests depend on the tacacs protocol library, too

2 years agotacacs: Respect status attributes set in auth and acct sections too
Arran Cudbard-Bell [Sun, 12 Feb 2023 05:49:37 +0000 (23:49 -0600)] 
tacacs: Respect status attributes set in auth and acct sections too

2 years agotacacs: Remove duplicate code
Arran Cudbard-Bell [Sun, 12 Feb 2023 05:26:17 +0000 (23:26 -0600)] 
tacacs: Remove duplicate code

Make it clearer that the reply code is always set from the result of reply code

Emit enough debug info to try and figure out why the tacacs state machine always just sends Authentication-Pass when Get-Pass is returned.

Correct bad condition around request->reply

2 years agoNo hyphen in GetData, GetUser, GetPass
Arran Cudbard-Bell [Sun, 12 Feb 2023 04:24:59 +0000 (22:24 -0600)] 
No hyphen in GetData, GetUser, GetPass

2 years agolinelog: Add a linelog xlat
Arran Cudbard-Bell [Sun, 12 Feb 2023 02:25:32 +0000 (20:25 -0600)] 
linelog: Add a linelog xlat

2 years agoRemove stale symlinks
Arran Cudbard-Bell [Sat, 11 Feb 2023 19:08:06 +0000 (13:08 -0600)] 
Remove stale symlinks

2 years agoRFC8907 calls it the maximum privilege level 'Max'
Arran Cudbard-Bell [Sat, 11 Feb 2023 23:25:34 +0000 (17:25 -0600)] 
RFC8907 calls it the maximum privilege level 'Max'

2 years agoallow admin to set Foo-Status in reply
Alan T. DeKok [Sat, 11 Feb 2023 22:09:59 +0000 (17:09 -0500)] 
allow admin to set Foo-Status in reply

and have it "do the right thing"

2 years agoadd name for authorization-error
Alan T. DeKok [Sat, 11 Feb 2023 21:47:42 +0000 (16:47 -0500)] 
add name for authorization-error

2 years agoRemove -Reply- here, too
Alan T. DeKok [Sat, 11 Feb 2023 21:10:48 +0000 (16:10 -0500)] 
Remove -Reply- here, too

2 years agoencode and decode passwords automatically
Alan T. DeKok [Sat, 11 Feb 2023 16:27:48 +0000 (11:27 -0500)] 
encode and decode passwords automatically

2 years agoupdate for changed parser behavior
Alan T. DeKok [Sat, 11 Feb 2023 16:28:52 +0000 (11:28 -0500)] 
update for changed parser behavior

2 years agomore of the same
Alan T. DeKok [Sat, 11 Feb 2023 16:05:36 +0000 (11:05 -0500)] 
more of the same

2 years agoremove redundancy
Alan T. DeKok [Sat, 11 Feb 2023 15:38:12 +0000 (10:38 -0500)] 
remove redundancy

I really wish compilers would give consistent error messages,
and not have wildly different behaviors locally and in CI

2 years agocomment out checks until we have fully nested VPs
Alan T. DeKok [Sat, 11 Feb 2023 14:54:12 +0000 (09:54 -0500)] 
comment out checks until we have fully nested VPs

2 years agofix "can contain" for structs && key fields
Alan T. DeKok [Sat, 11 Feb 2023 14:01:12 +0000 (09:01 -0500)] 
fix "can contain" for structs && key fields

2 years agomake TACACS+ PAP CHAP. and (maybe) MS-CHAP work
Alan T. DeKok [Sat, 11 Feb 2023 13:42:05 +0000 (08:42 -0500)] 
make TACACS+ PAP CHAP. and (maybe) MS-CHAP work

now that the namespaces are parsed correctly for subrequests,
we can make more things work automagically

2 years agoTACACS+ is TCP, and we don't do dedup checking
Alan T. DeKok [Sat, 11 Feb 2023 00:29:05 +0000 (19:29 -0500)] 
TACACS+ is TCP, and we don't do dedup checking

2 years agoif there's no Auth-Type, use TACACS.Packet.Authen-Type
Alan T. DeKok [Fri, 10 Feb 2023 23:55:04 +0000 (18:55 -0500)] 
if there's no Auth-Type, use TACACS.Packet.Authen-Type

2 years agoset inst->server_cs from parent, not from finding any server
Alan T. DeKok [Fri, 10 Feb 2023 23:54:44 +0000 (18:54 -0500)] 
set inst->server_cs from parent, not from finding any server

2 years agono need to use "-Reply-" in all of the reply names
Alan T. DeKok [Fri, 10 Feb 2023 23:47:12 +0000 (18:47 -0500)] 
no need to use "-Reply-" in all of the reply names

2 years agoallow parsing of namespace
Alan T. DeKok [Fri, 10 Feb 2023 22:32:54 +0000 (17:32 -0500)] 
allow parsing of namespace

2 years agoadd function to check for "da can contain other da"
Alan T. DeKok [Fri, 10 Feb 2023 20:34:00 +0000 (15:34 -0500)] 
add function to check for "da can contain other da"

really for fr_pair_t validation, but it's still useful to have a
sanity check function in the dictionary code.

2 years agojson: Fix typo... Don't mis-cast integers
Arran Cudbard-Bell [Sat, 11 Feb 2023 03:00:15 +0000 (21:00 -0600)] 
json: Fix typo... Don't mis-cast integers

2 years agorest: Always emit data
Arran Cudbard-Bell [Sat, 11 Feb 2023 02:13:33 +0000 (20:13 -0600)] 
rest: Always emit data

2 years agoDon't crash when the first component is a HTTP method
Arran Cudbard-Bell [Sat, 11 Feb 2023 02:13:19 +0000 (20:13 -0600)] 
Don't crash when the first component is a HTTP method

2 years agojust set "*leftover" always
Alan T. DeKok [Fri, 10 Feb 2023 13:07:08 +0000 (08:07 -0500)] 
just set "*leftover" always

no need to check for conditions, because the previous check
for "smaller than one packet" takes care of what we need.

2 years agoset leftover to 0 when we have a full packet
Alan T. DeKok [Fri, 10 Feb 2023 11:23:26 +0000 (06:23 -0500)] 
set leftover to 0 when we have a full packet

2 years agodon't change tmpl_rules_t parent
Alan T. DeKok [Thu, 9 Feb 2023 22:14:35 +0000 (17:14 -0500)] 
don't change tmpl_rules_t parent

that's used for changing dictionaries, and nothing else tracks
or uses it.

2 years agouse "namespace" instead of "parent".
Alan T. DeKok [Thu, 9 Feb 2023 21:30:21 +0000 (16:30 -0500)] 
use "namespace" instead of "parent".

There are too many things called "parent" already

2 years agotacacs: Clear leftover when we decode a complete packet and no data is left in the...
Arran Cudbard-Bell [Fri, 10 Feb 2023 03:17:10 +0000 (21:17 -0600)] 
tacacs: Clear leftover when we decode a complete packet and no data is left in the buffer

This caused a spurious read, which lead to the socket being destroyed and no data being returned to the TACACS client when the initial request was fragmented

2 years agotacacs: Comments for mortals
Arran Cudbard-Bell [Fri, 10 Feb 2023 03:16:17 +0000 (21:16 -0600)] 
tacacs: Comments for mortals

2 years agotacacs: Print the error
Arran Cudbard-Bell [Thu, 9 Feb 2023 22:41:03 +0000 (16:41 -0600)] 
tacacs: Print the error

2 years agoall TCP sockets are non-blocking
Alan T. DeKok [Thu, 9 Feb 2023 21:10:04 +0000 (16:10 -0500)] 
all TCP sockets are non-blocking

2 years agoremove last two arguments from tmpl_request_ref_list_from_substr()
Alan T. DeKok [Thu, 9 Feb 2023 20:34:38 +0000 (15:34 -0500)] 
remove last two arguments from tmpl_request_ref_list_from_substr()

the only two public users are the "update" code, and unit_test_attribute

we need to change the internal API to fix some other issues,
so rather than changing the public API, we just clean it up

2 years agojson_object_afrom_pair_list only operates on leaf values
Nick Porter [Wed, 8 Feb 2023 15:05:59 +0000 (15:05 +0000)] 
json_object_afrom_pair_list only operates on leaf values

2 years agoReplace != with !( == ) in json tests
Nick Porter [Wed, 8 Feb 2023 15:06:51 +0000 (15:06 +0000)] 
Replace != with !( == ) in json tests

2 years agoDon't allow filters on list attr refs
Nick Porter [Tue, 7 Feb 2023 14:22:42 +0000 (14:22 +0000)] 
Don't allow filters on list attr refs

By definition there will only ever be one instance of each list, so
filters are meaningless.

2 years agoConvert input_list and output_list to tmpl_t
Nick Porter [Wed, 8 Feb 2023 13:42:08 +0000 (13:42 +0000)] 
Convert input_list and output_list to tmpl_t

2 years agoRemove unused tmpl_pair_list_name()
Nick Porter [Wed, 8 Feb 2023 13:45:05 +0000 (13:45 +0000)] 
Remove unused tmpl_pair_list_name()

2 years agoRemove meaninless test
Nick Porter [Fri, 3 Feb 2023 15:48:11 +0000 (15:48 +0000)] 
Remove meaninless test

Having tested the value of various attributes in the reply list, it
can't be empty

2 years agoCorrect docs and examples for %(pairs:) and %(concat:)
Nick Porter [Fri, 3 Feb 2023 15:50:06 +0000 (15:50 +0000)] 
Correct docs and examples for %(pairs:) and %(concat:)

2 years agoTidy and expand pairs keyword test
Nick Porter [Fri, 3 Feb 2023 15:50:49 +0000 (15:50 +0000)] 
Tidy and expand pairs keyword test

2 years agoRemove final instance of tmpl_pair_list_t
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:41:40 +0000 (12:41 -0600)] 
Remove final instance of tmpl_pair_list_t

2 years agoSet missing list_def
Nick Porter [Thu, 2 Feb 2023 17:35:13 +0000 (17:35 +0000)] 
Set missing list_def

2 years agoPass a ctx to cache_verify
Nick Porter [Thu, 2 Feb 2023 20:50:25 +0000 (20:50 +0000)] 
Pass a ctx to cache_verify

Ensures that unlang_fixup_update() does not replace NUM_UNSPEC with
NUM_ALL

2 years agoAdd tmpl_attr_head_is_list()
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:40:09 +0000 (12:40 -0600)] 
Add tmpl_attr_head_is_list()

2 years agoRemove tmpl_s.data.attribute.list
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:38:15 +0000 (12:38 -0600)] 
Remove tmpl_s.data.attribute.list

The list is now identified by the first attr ref

2 years agos/PAIR_LIST_<list>/request_attr_<list>/
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:39:28 +0000 (12:39 -0600)] 
s/PAIR_LIST_<list>/request_attr_<list>/

and remove PAIR_LIST_<list> macros

2 years agoCopy filter_type when copying tmpl attr refs
Nick Porter [Thu, 26 Jan 2023 17:44:18 +0000 (17:44 +0000)] 
Copy filter_type when copying tmpl attr refs

2 years agoUpdate tmpl_attr_afrom_list() to work with list_as_attr
Nick Porter [Thu, 26 Jan 2023 17:50:16 +0000 (17:50 +0000)] 
Update tmpl_attr_afrom_list() to work with list_as_attr

2 years agoRemove list_as_attr from tmpl_rules_t
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:41:06 +0000 (12:41 -0600)] 
Remove list_as_attr from tmpl_rules_t

2 years agoList tmpls should not be NUM_ALL
Nick Porter [Thu, 26 Jan 2023 17:15:29 +0000 (17:15 +0000)] 
List tmpls should not be NUM_ALL

There is only ever one instance of each list pair.

2 years agoAdd skip_list option to pair_append_by_tmpl_parent
Nick Porter [Fri, 27 Jan 2023 08:54:45 +0000 (08:54 +0000)] 
Add skip_list option to pair_append_by_tmpl_parent

With all attr tmpls having a list as the first ar, need to be able to
skip that when building into temporary lists rather than into
request->pair_root

2 years agoRemove code paths for list_as_attr != true
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:40:35 +0000 (12:40 -0600)] 
Remove code paths for list_as_attr != true

2 years agoRemove unused tmpl_get_list()
Nick Porter [Thu, 26 Jan 2023 17:42:18 +0000 (17:42 +0000)] 
Remove unused tmpl_get_list()

2 years agoRemove TMPL_TYPE_LIST
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:35:45 +0000 (12:35 -0600)] 
Remove TMPL_TYPE_LIST

2 years agoRemove un-needed uses of tmpl_is_list()
Nick Porter [Thu, 26 Jan 2023 11:56:22 +0000 (11:56 +0000)] 
Remove un-needed uses of tmpl_is_list()

2 years agoLogic corrections
Nick Porter [Thu, 26 Jan 2023 11:57:31 +0000 (11:57 +0000)] 
Logic corrections

2 years agoCorrect references to "all children of a list" in tests
Nick Porter [Thu, 26 Jan 2023 08:14:36 +0000 (08:14 +0000)] 
Correct references to "all children of a list" in tests

2 years agoChange &list !* ANY to &list.[*] != ANY in update tests
Nick Porter [Tue, 24 Jan 2023 11:26:44 +0000 (11:26 +0000)] 
Change &list !* ANY to &list.[*] != ANY in update tests

2 years agoDefine new tmpl_is_list()
Arran Cudbard-Bell [Thu, 9 Feb 2023 18:37:27 +0000 (12:37 -0600)] 
Define new tmpl_is_list()

Using the attr ref rather than TMPL_TYPE_LIST

2 years agoOnly check for cast if lhs is a leaf da
Nick Porter [Wed, 25 Jan 2023 19:29:16 +0000 (19:29 +0000)] 
Only check for cast if lhs is a leaf da

2 years agoAdd support for list_as_attr to cache map building
Nick Porter [Wed, 25 Jan 2023 19:30:29 +0000 (19:30 +0000)] 
Add support for list_as_attr to cache map building

2 years agoMinor changes in test output with list_as_attr = true
Nick Porter [Wed, 18 Jan 2023 14:15:15 +0000 (14:15 +0000)] 
Minor changes in test output with list_as_attr = true

2 years agoupdate-list-error works with update to edit code
Nick Porter [Tue, 24 Jan 2023 11:27:43 +0000 (11:27 +0000)] 
update-list-error works with update to edit code

2 years agoEnsure list ar is updated by tmpl_attr_set_list()
Nick Porter [Tue, 24 Jan 2023 16:29:19 +0000 (16:29 +0000)] 
Ensure list ar is updated by tmpl_attr_set_list()

2 years agoSet attr ref parents when copying tmpl_attr
Nick Porter [Wed, 25 Jan 2023 13:29:07 +0000 (13:29 +0000)] 
Set attr ref parents when copying tmpl_attr

2 years agoAllow for list_as_attr when maps are list to list
Nick Porter [Wed, 25 Jan 2023 19:28:22 +0000 (19:28 +0000)] 
Allow for list_as_attr when maps are list to list

2 years agoAllow &list.[*] for selected tmpl parsing
Nick Porter [Mon, 23 Jan 2023 15:43:43 +0000 (15:43 +0000)] 
Allow &list.[*] for selected tmpl parsing

2 years agoAdd tmpl_attr_tail_da_is_leaf() and tmpl_attr_tail_da_is_structural()
Arran Cudbard-Bell [Thu, 9 Feb 2023 17:01:08 +0000 (11:01 -0600)] 
Add tmpl_attr_tail_da_is_leaf() and tmpl_attr_tail_da_is_structural()

2 years agoUpdate map_to_list_mod() list to list detection
Nick Porter [Fri, 27 Jan 2023 11:05:47 +0000 (11:05 +0000)] 
Update map_to_list_mod() list to list detection

Will handle any structural to structural copy