]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
3 years agodon't need release if we also dump the parent dbuff
Alan T. DeKok [Wed, 20 Apr 2022 21:05:37 +0000 (17:05 -0400)] 
don't need release if we also dump the parent dbuff

3 years agoThese are technically linker flags
Arran Cudbard-Bell [Thu, 21 Apr 2022 13:41:53 +0000 (08:41 -0500)] 
These are technically linker flags

3 years agouse marker instead of entire dbuff
Alan T. DeKok [Wed, 20 Apr 2022 20:30:56 +0000 (16:30 -0400)] 
use marker instead of entire dbuff

3 years agomore cleanups to use macros instead of hard-coded fields
Alan T. DeKok [Wed, 20 Apr 2022 20:22:12 +0000 (16:22 -0400)] 
more cleanups to use macros instead of hard-coded fields

3 years agomove to macros for more things, instead of directly accessing fields
Alan T. DeKok [Wed, 20 Apr 2022 19:36:54 +0000 (15:36 -0400)] 
move to macros for more things, instead of directly accessing fields

in preparation for moving to tlists.

3 years agoclean up and rename
Alan T. DeKok [Wed, 20 Apr 2022 16:09:57 +0000 (12:09 -0400)] 
clean up and rename

3 years agoErrant \
Arran Cudbard-Bell [Wed, 20 Apr 2022 17:12:14 +0000 (12:12 -0500)] 
Errant \

3 years agoAlways print out the config.log
Arran Cudbard-Bell [Wed, 20 Apr 2022 16:58:10 +0000 (11:58 -0500)] 
Always print out the config.log

3 years agomove function args and groups to their own members
Alan T. DeKok [Wed, 20 Apr 2022 15:17:51 +0000 (11:17 -0400)] 
move function args and groups to their own members

in preparation for moving to tlists

3 years agomove XLAT_ALTERNATE children to type-specific fields
Alan T. DeKok [Wed, 20 Apr 2022 14:47:22 +0000 (10:47 -0400)] 
move XLAT_ALTERNATE children to type-specific fields

3 years agocheck lengths, too
Alan T. DeKok [Wed, 20 Apr 2022 12:49:21 +0000 (08:49 -0400)] 
check lengths, too

3 years agoadd verify_tlvs() function
Alan T. DeKok [Tue, 19 Apr 2022 21:58:56 +0000 (17:58 -0400)] 
add verify_tlvs() function

so we don't go crazy creating structures, only to throw them
away when we discover that something bad is going on

3 years agominor cleanups
Alan T. DeKok [Tue, 19 Apr 2022 21:33:31 +0000 (17:33 -0400)] 
minor cleanups

and create raw attributes, instead of just unknown ones for
things we don't understand

3 years agoadd option to print out VPs it's decoded
Alan T. DeKok [Tue, 19 Apr 2022 21:32:30 +0000 (17:32 -0400)] 
add option to print out VPs it's decoded

3 years agominor rearrangements
Alan T. DeKok [Tue, 19 Apr 2022 18:46:23 +0000 (14:46 -0400)] 
minor rearrangements

3 years agoremove unused assignments
Alan T. DeKok [Tue, 19 Apr 2022 18:45:49 +0000 (14:45 -0400)] 
remove unused assignments

3 years agoshut up compiler
Alan T. DeKok [Tue, 19 Apr 2022 18:38:41 +0000 (14:38 -0400)] 
shut up compiler

3 years agoincrease bounds
Alan T. DeKok [Tue, 19 Apr 2022 18:07:59 +0000 (14:07 -0400)] 
increase bounds

3 years agoinitialize slen
Alan T. DeKok [Tue, 19 Apr 2022 17:23:04 +0000 (13:23 -0400)] 
initialize slen

3 years agofix function signature to shut up compiler
Alan T. DeKok [Tue, 19 Apr 2022 16:25:35 +0000 (12:25 -0400)] 
fix function signature to shut up compiler

3 years agodecode all extended attributes at the top level
Alan T. DeKok [Tue, 19 Apr 2022 15:40:44 +0000 (11:40 -0400)] 
decode all extended attributes at the top level

3 years agoremove "concat" flag from Digest-Attributes
Alan T. DeKok [Tue, 19 Apr 2022 15:31:15 +0000 (11:31 -0400)] 
remove "concat" flag from Digest-Attributes

it's not really "concat" in the same way that EAP-Message is,
as we can't split it in the middle of sub TLVs.

3 years agostart of rewrite to be more like the other protocols
Alan T. DeKok [Tue, 19 Apr 2022 15:29:05 +0000 (11:29 -0400)] 
start of rewrite to be more like the other protocols

3 years agoadd fr_pair_dns_labels_from_network()
Alan T. DeKok [Tue, 19 Apr 2022 01:09:01 +0000 (21:09 -0400)] 
add fr_pair_dns_labels_from_network()

and make various protocols call it.

3 years agofix test.
Alan T. DeKok [Mon, 18 Apr 2022 21:24:25 +0000 (17:24 -0400)] 
fix test.

When we encode something, the decoded version should NOT be "raw"
unless something has gone seriously wrong.

3 years agomove decode_tlvs to common API
Alan T. DeKok [Mon, 18 Apr 2022 15:46:11 +0000 (11:46 -0400)] 
move decode_tlvs to common API

with a flag to see if we decode the TLVs as nested (or not)

3 years agoadd notes for DNS validation
Alan T. DeKok [Mon, 18 Apr 2022 15:45:53 +0000 (11:45 -0400)] 
add notes for DNS validation

3 years agomove to using fr_pair_raw_from_network()
Alan T. DeKok [Sun, 17 Apr 2022 23:24:08 +0000 (19:24 -0400)] 
move to using fr_pair_raw_from_network()

Insted of multiple local functions

3 years agomake fr_pair_raw_from_network() closer to other decode functions
Alan T. DeKok [Sun, 17 Apr 2022 23:16:45 +0000 (19:16 -0400)] 
make fr_pair_raw_from_network() closer to other decode functions

3 years agomove / rename "pair raw from network"
Alan T. DeKok [Sun, 17 Apr 2022 19:19:58 +0000 (15:19 -0400)] 
move / rename "pair raw from network"

so that it's in a better place, with a better name

3 years agobreak out some more test cases for clarity
Alan T. DeKok [Sun, 17 Apr 2022 19:11:38 +0000 (15:11 -0400)] 
break out some more test cases for clarity

3 years agomove decode_array() to generic fr_pair_array_from_network()
Alan T. DeKok [Sun, 17 Apr 2022 18:37:37 +0000 (14:37 -0400)] 
move decode_array() to generic fr_pair_array_from_network()

3 years agoalign fr_value_box_network_length() with to/from-network code
Alan T. DeKok [Sun, 17 Apr 2022 16:39:45 +0000 (12:39 -0400)] 
align fr_value_box_network_length() with to/from-network code

3 years agoalign encode_array() with other protocols
Alan T. DeKok [Sun, 17 Apr 2022 16:34:54 +0000 (12:34 -0400)] 
align encode_array() with other protocols

and remove yet another protocol-specific "get attr length" function

3 years agoclarify documention in to/from network functions
Alan T. DeKok [Sun, 17 Apr 2022 14:30:47 +0000 (10:30 -0400)] 
clarify documention in to/from network functions

3 years agoremove attr_sizes table and usage
Alan T. DeKok [Sun, 17 Apr 2022 14:08:58 +0000 (10:08 -0400)] 
remove attr_sizes table and usage

only the type-specific decoders need to care

3 years agoremove dead code. CID #1469168
Alan T. DeKok [Sun, 17 Apr 2022 13:45:12 +0000 (09:45 -0400)] 
remove dead code.  CID #1469168

3 years agotry to shut up coverity
Alan T. DeKok [Sun, 17 Apr 2022 05:59:46 +0000 (01:59 -0400)] 
try to shut up coverity

which thinks that fr_token_t can be between 0..63, instead of
0..48?

3 years agoremove fr_radius_attr_len() and related checks
Alan T. DeKok [Sun, 17 Apr 2022 05:50:50 +0000 (01:50 -0400)] 
remove fr_radius_attr_len() and related checks

we can just either (a) rely on the input dbuff to see when the
data is too long to encode, or (b) just check vp->vp_length

3 years agojust call fr_value_box_to_network()
Alan T. DeKok [Sun, 17 Apr 2022 05:36:54 +0000 (01:36 -0400)] 
just call fr_value_box_to_network()

3 years agoremove unused code
Alan T. DeKok [Sun, 17 Apr 2022 05:28:54 +0000 (01:28 -0400)] 
remove unused code

3 years agono longer need these
Alan T. DeKok [Sun, 17 Apr 2022 05:27:36 +0000 (01:27 -0400)] 
no longer need these

3 years agomove string/octet length encoding/decode to value.c
Alan T. DeKok [Sun, 17 Apr 2022 05:22:10 +0000 (01:22 -0400)] 
move string/octet length encoding/decode to value.c

The code already enforced some lengths (e.g. fixed-length fields,
with either truncation or zero-fill).

Since the dictionaries now support da_is_length_field() and
flags.array, we might as well support that in the functions
fr_value_box_to_network() and fr_value_box_from_network()

doing this allows a whole set of additional optimizations in the
rest of the code.  encode/decode array becomes a simple loop around
encode_value(), which means it's protocol agnostic.  And the
dhcpv4/dhcpv6 option_len functions aren't needed, and can just
go away.

3 years agoSplit macros out of acinclude
Arran Cudbard-Bell [Tue, 19 Apr 2022 13:36:04 +0000 (08:36 -0500)] 
Split macros out of acinclude

Use COMPILE_IFELSE in more places to speed up configure

3 years agoSplit out network byte order functions
Arran Cudbard-Bell [Tue, 19 Apr 2022 00:49:20 +0000 (19:49 -0500)] 
Split out network byte order functions

3 years agoWS
Arran Cudbard-Bell [Mon, 18 Apr 2022 23:11:21 +0000 (18:11 -0500)] 
WS

3 years agoCache pointer earlier
Arran Cudbard-Bell [Mon, 18 Apr 2022 23:10:19 +0000 (18:10 -0500)] 
Cache pointer earlier

3 years agoDo module mutex init later once we've loaded the library
Arran Cudbard-Bell [Mon, 18 Apr 2022 23:06:03 +0000 (18:06 -0500)] 
Do module mutex init later once we've loaded the library

3 years agoMore radsniff errors
Arran Cudbard-Bell [Mon, 18 Apr 2022 23:05:15 +0000 (18:05 -0500)] 
More radsniff errors

3 years agoTypo
Arran Cudbard-Bell [Mon, 18 Apr 2022 22:59:44 +0000 (17:59 -0500)] 
Typo

3 years agoLeave module_thread_inst_list around if thread instantiation fails
Arran Cudbard-Bell [Mon, 18 Apr 2022 22:36:26 +0000 (17:36 -0500)] 
Leave module_thread_inst_list around if thread instantiation fails

3 years agoInitialise the module mutex during alloc
Arran Cudbard-Bell [Mon, 18 Apr 2022 22:23:45 +0000 (17:23 -0500)] 
Initialise the module mutex during alloc

3 years agoTypo
Arran Cudbard-Bell [Mon, 18 Apr 2022 22:27:07 +0000 (17:27 -0500)] 
Typo

3 years agoRemove vendor prefix
Arran Cudbard-Bell [Mon, 18 Apr 2022 22:26:52 +0000 (17:26 -0500)] 
Remove vendor prefix

3 years agoMake prefix format consistent for _FR_LOG_PREFIX_MARKER
Nick Porter [Mon, 18 Apr 2022 11:08:10 +0000 (12:08 +0100)] 
Make prefix format consistent for _FR_LOG_PREFIX_MARKER

3 years agonotes for the future
Alan T. DeKok [Sat, 16 Apr 2022 00:03:13 +0000 (20:03 -0400)] 
notes for the future

3 years agoport from v3
Alan T. DeKok [Fri, 15 Apr 2022 23:46:52 +0000 (19:46 -0400)] 
port from v3

3 years agowe now have a "real" 245.26.FreeRADIUS, so use 256 for tests
Alan T. DeKok [Fri, 15 Apr 2022 23:42:54 +0000 (19:42 -0400)] 
we now have a "real" 245.26.FreeRADIUS, so use 256 for tests

3 years agorequest can't be NULL. CID #1504033
Alan T. DeKok [Thu, 14 Apr 2022 20:51:16 +0000 (16:51 -0400)] 
request can't be NULL.  CID #1504033

3 years agoCheck xlat_registered didn't return NULL before dereferencing. CID #1504055
Nick Porter [Fri, 15 Apr 2022 13:38:12 +0000 (14:38 +0100)] 
Check xlat_registered didn't return NULL before dereferencing. CID #1504055

3 years agoAvoid null dereference. CID #1504060
Nick Porter [Fri, 15 Apr 2022 11:31:44 +0000 (12:31 +0100)] 
Avoid null dereference. CID #1504060

3 years agoAdd adva dictionary
Nick Porter [Fri, 15 Apr 2022 11:01:09 +0000 (12:01 +0100)] 
Add adva dictionary

3 years agoadd MEM(). CID #1503919
Alan T. DeKok [Thu, 14 Apr 2022 19:16:42 +0000 (15:16 -0400)] 
add MEM().  CID #1503919

3 years agoshut up Coverity. CID #1469139
Alan T. DeKok [Thu, 14 Apr 2022 19:05:47 +0000 (15:05 -0400)] 
shut up Coverity.  CID #1469139

3 years agomore sanitization. CID #1469146
Alan T. DeKok [Thu, 14 Apr 2022 19:01:55 +0000 (15:01 -0400)] 
more sanitization.  CID #1469146

3 years agomove to struct initializer. CID #1504050
Alan T. DeKok [Thu, 14 Apr 2022 18:48:21 +0000 (14:48 -0400)] 
move to struct initializer.  CID #1504050

3 years agorequest can't be NULL. CID #1503955
Alan T. DeKok [Thu, 14 Apr 2022 15:22:25 +0000 (11:22 -0400)] 
request can't be NULL.  CID #1503955

3 years ago*out may be NULL. CID #1503963
Alan T. DeKok [Thu, 14 Apr 2022 15:04:39 +0000 (11:04 -0400)] 
*out may be NULL.  CID #1503963

3 years agoremove dead code. CID #1503987
Alan T. DeKok [Thu, 14 Apr 2022 14:59:41 +0000 (10:59 -0400)] 
remove dead code.  CID #1503987

3 years agoshut up compiler. CID #1504010
Alan T. DeKok [Thu, 14 Apr 2022 14:50:11 +0000 (10:50 -0400)] 
shut up compiler.  CID #1504010

3 years agoremove dead code. CID #1504027
Alan T. DeKok [Thu, 14 Apr 2022 14:46:42 +0000 (10:46 -0400)] 
remove dead code.  CID #1504027

3 years agotypo
Alan T. DeKok [Thu, 14 Apr 2022 12:05:19 +0000 (08:05 -0400)] 
typo

3 years agocall init instead of clear. CID #1504023
Alan T. DeKok [Wed, 13 Apr 2022 22:06:17 +0000 (18:06 -0400)] 
call init instead of clear. CID #1504023

3 years agoCheck vb has been allocated. CID #1503940
Nick Porter [Thu, 14 Apr 2022 08:23:37 +0000 (09:23 +0100)] 
Check vb has been allocated. CID #1503940

3 years agoremove dead code. CID #1504073
Alan T. DeKok [Wed, 13 Apr 2022 20:21:29 +0000 (16:21 -0400)] 
remove dead code.  CID #1504073

3 years agoMake POSIXification in exec_pair_to_env() notice lower case first char (#4458)
James Jones [Wed, 13 Apr 2022 20:46:25 +0000 (15:46 -0500)] 
Make POSIXification in exec_pair_to_env() notice lower case first char (#4458)

The loop as written always incremented p after the test to deal with
leading digits, so it wouldn't notice a leading lower case letter.

3 years agofix up encode_tunnel_password()
Alan T. DeKok [Wed, 13 Apr 2022 16:56:30 +0000 (12:56 -0400)] 
fix up encode_tunnel_password()

be a lot more rigorous around bounds checks, and aggressively
bounds check everything.

The tests change because we're using different amounts of output
of the random numbers.  But the encode/decode cycle yields the
same results, so that's OK.

3 years agoinitialize handle
Alan T. DeKok [Wed, 13 Apr 2022 16:34:04 +0000 (12:34 -0400)] 
initialize handle

3 years agobound "len". CID #1503923
Alan T. DeKok [Wed, 13 Apr 2022 15:52:24 +0000 (11:52 -0400)] 
bound "len".  CID #1503923

after rounding up, and adding room for the headers

3 years agosign / unsign issues
Alan T. DeKok [Wed, 13 Apr 2022 14:58:20 +0000 (10:58 -0400)] 
sign / unsign issues

because the compiler is too stupid to notice that we check for
(ssize_t) foo < 0, and disallow it.

3 years agopacket_len should be signed
Alan T. DeKok [Wed, 13 Apr 2022 14:10:53 +0000 (10:10 -0400)] 
packet_len should be signed

3 years agoclose FD on error. CID #1504032
Alan T. DeKok [Wed, 13 Apr 2022 13:46:33 +0000 (09:46 -0400)] 
close FD on error.  CID #1504032

3 years agoCheck vb has been allocated. CID #1469173
Nick Porter [Wed, 13 Apr 2022 13:44:11 +0000 (14:44 +0100)] 
Check vb has been allocated. CID #1469173

3 years agoCorrect operator. CID 1469166
Nick Porter [Wed, 13 Apr 2022 13:37:04 +0000 (14:37 +0100)] 
Correct operator. CID 1469166

3 years agouse CMP() CID #1503972
Alan T. DeKok [Wed, 13 Apr 2022 12:55:00 +0000 (08:55 -0400)] 
use CMP()  CID #1503972

3 years agono need for intermediate variable. CID #1504026
Alan T. DeKok [Wed, 13 Apr 2022 12:33:22 +0000 (08:33 -0400)] 
no need for intermediate variable.  CID #1504026

3 years agotry to quiet Coverity. CID #1469156
Alan T. DeKok [Tue, 12 Apr 2022 18:48:23 +0000 (14:48 -0400)] 
try to quiet Coverity.  CID #1469156

3 years agofr_tacacs_length() can return negative. CID #1469155
Alan T. DeKok [Tue, 12 Apr 2022 18:43:16 +0000 (14:43 -0400)] 
fr_tacacs_length() can return negative.  CID #1469155

3 years agofree handle on error. CID #1469135
Alan T. DeKok [Tue, 12 Apr 2022 18:38:33 +0000 (14:38 -0400)] 
free handle on error.  CID #1469135

3 years agoremove dead code. CID #1469125
Alan T. DeKok [Tue, 12 Apr 2022 18:35:56 +0000 (14:35 -0400)] 
remove dead code.  CID #1469125

3 years agoCorrect check for count of Februaries - tm_mon is 0 to 11
Nick Porter [Wed, 13 Apr 2022 11:18:33 +0000 (12:18 +0100)] 
Correct check for count of Februaries - tm_mon is 0 to 11

3 years agoCorrect check for invalid tm_mon. CID #1503944
Nick Porter [Wed, 13 Apr 2022 11:17:46 +0000 (12:17 +0100)] 
Correct check for invalid tm_mon. CID #1503944

3 years agoAvoid array overrun. CID #1504011
Nick Porter [Wed, 13 Apr 2022 11:01:59 +0000 (12:01 +0100)] 
Avoid array overrun. CID #1504011

3 years agocheck counter before accessing array. CID #1504030
Nick Porter [Tue, 12 Apr 2022 15:31:01 +0000 (16:31 +0100)] 
check counter before accessing array. CID #1504030

3 years agoInitialise variable. CID 1504065
Nick Porter [Tue, 12 Apr 2022 15:03:37 +0000 (16:03 +0100)] 
Initialise variable. CID 1504065

3 years agowe choose to shut up gcc instead of coverity
Alan T. DeKok [Tue, 12 Apr 2022 01:42:09 +0000 (21:42 -0400)] 
we choose to shut up gcc instead of coverity

3 years agodon't use variable out of scope. CID #1503994
Alan T. DeKok [Mon, 11 Apr 2022 23:56:39 +0000 (19:56 -0400)] 
don't use variable out of scope.  CID #1503994

3 years agoset inlen, too. CID #1469118
Alan T. DeKok [Mon, 11 Apr 2022 23:54:20 +0000 (19:54 -0400)] 
set inlen, too.  CID #1469118

3 years agoremove dead code. CID #1504044
Alan T. DeKok [Mon, 11 Apr 2022 23:50:21 +0000 (19:50 -0400)] 
remove dead code.  CID #1504044

3 years agoreturn error if appropriate. CID #1504006
Alan T. DeKok [Mon, 11 Apr 2022 23:47:58 +0000 (19:47 -0400)] 
return error if appropriate.  CID #1504006