]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 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

4 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

4 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

4 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

4 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

4 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?

4 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

4 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()

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

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

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

4 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

4 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

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

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

4 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

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

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

4 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

4 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

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

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

4 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

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

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

4 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

4 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

4 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

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

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

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

4 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

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

4 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

4 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

4 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

4 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

4 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

4 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

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

4 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

4 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

4 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

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

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

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

4 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

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

4 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

4 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

4 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

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

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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

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

4 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

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

4 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

4 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

4 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

4 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

4 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

4 years agoCheck for NULL, and free on error. CID #1503946
Alan T. DeKok [Mon, 11 Apr 2022 23:45:50 +0000 (19:45 -0400)] 
Check for NULL, and free on error.  CID #1503946

4 years agocheck for NULL. CID #1503997
Alan T. DeKok [Mon, 11 Apr 2022 23:44:23 +0000 (19:44 -0400)] 
check for NULL.  CID #1503997

4 years agoremove dead code. CID #1469132
Alan T. DeKok [Mon, 11 Apr 2022 23:43:31 +0000 (19:43 -0400)] 
remove dead code.  CID #1469132

4 years agostrcmp() returns large values. CID #1504056
Alan T. DeKok [Mon, 11 Apr 2022 23:42:09 +0000 (19:42 -0400)] 
strcmp() returns large values.  CID #1504056

4 years agoreduce boilerplate code
Alan T. DeKok [Mon, 11 Apr 2022 23:34:25 +0000 (19:34 -0400)] 
reduce boilerplate code

4 years agofix typo in cut&paste. CID #1504002
Alan T. DeKok [Mon, 11 Apr 2022 23:00:21 +0000 (19:00 -0400)] 
fix typo in cut&paste.  CID #1504002

4 years agowe don't care if the call fails. CID #1504005
Alan T. DeKok [Mon, 11 Apr 2022 22:47:04 +0000 (18:47 -0400)] 
we don't care if the call fails.  CID #1504005

if we're going to "error" anyways, no need for an extra "if"

4 years agoremove double unlock. CID #1504063
Alan T. DeKok [Mon, 11 Apr 2022 22:45:50 +0000 (18:45 -0400)] 
remove double unlock.  CID #1504063

4 years agoadd MEM(). CID #1469145
Alan T. DeKok [Mon, 11 Apr 2022 22:45:02 +0000 (18:45 -0400)] 
add MEM().  CID #1469145

4 years agoallocation can fail. CID #1469123
Alan T. DeKok [Mon, 11 Apr 2022 21:32:52 +0000 (17:32 -0400)] 
allocation can fail.  CID #1469123

4 years agouint8 is bit 2..8, not 2..7
Alan T. DeKok [Mon, 11 Apr 2022 18:31:09 +0000 (14:31 -0400)] 
uint8 is bit 2..8, not 2..7

4 years agorearrange to hopefully help the compiler and clarify
Alan T. DeKok [Mon, 11 Apr 2022 13:16:25 +0000 (09:16 -0400)] 
rearrange to hopefully help the compiler and clarify

if it's inline, then separating the code paths for iter NULL (or not)
should help.

4 years agoadd more structs
Alan T. DeKok [Mon, 11 Apr 2022 12:41:04 +0000 (08:41 -0400)] 
add more structs

4 years agowe don't need a separate tlist_head offset field
Alan T. DeKok [Sat, 9 Apr 2022 19:42:17 +0000 (15:42 -0400)] 
we don't need a separate tlist_head offset field

4 years agojust pass fr_tlist_head_t to item/entry functions
Alan T. DeKok [Sat, 9 Apr 2022 19:18:37 +0000 (15:18 -0400)] 
just pass fr_tlist_head_t to item/entry functions

4 years agowe don't need a separate type in fr_tlist_head_t
Alan T. DeKok [Sat, 9 Apr 2022 19:14:17 +0000 (15:14 -0400)] 
we don't need a separate type in fr_tlist_head_t

4 years agoSwitch the compiler used for coverity builds
Arran Cudbard-Bell [Mon, 11 Apr 2022 17:43:14 +0000 (12:43 -0500)] 
Switch the compiler used for coverity builds

4 years agoAdd the coverity button back
Arran Cudbard-Bell [Mon, 11 Apr 2022 18:07:24 +0000 (13:07 -0500)] 
Add the coverity button back

4 years agoFix pcre atexit function
Nick Porter [Mon, 11 Apr 2022 17:01:54 +0000 (18:01 +0100)] 
Fix pcre atexit function

4 years agoMore ndebug fixes
Arran Cudbard-Bell [Mon, 11 Apr 2022 16:41:28 +0000 (11:41 -0500)] 
More ndebug fixes

4 years agoMatch function to prototype
Nick Porter [Mon, 11 Apr 2022 16:40:08 +0000 (17:40 +0100)] 
Match function to prototype

4 years agoDon't print file loacations if this isn't a debug build
Arran Cudbard-Bell [Sun, 10 Apr 2022 20:19:21 +0000 (15:19 -0500)] 
Don't print file loacations if this isn't a debug build

4 years agoAllow atexit handlers to return error codes so we can track when they fail
Arran Cudbard-Bell [Sat, 9 Apr 2022 19:56:10 +0000 (14:56 -0500)] 
Allow atexit handlers to return error codes so we can track when they fail

4 years agoAvoid infinite loop in module_root(), oops...
Arran Cudbard-Bell [Sat, 9 Apr 2022 17:44:46 +0000 (12:44 -0500)] 
Avoid infinite loop in module_root(), oops...

4 years agoCleanup more atexit stuff, and explicitly trigger atexit handlers to avoid ordering...
Arran Cudbard-Bell [Sat, 9 Apr 2022 17:36:20 +0000 (12:36 -0500)] 
Cleanup more atexit stuff, and explicitly trigger atexit handlers to avoid ordering issues with libraries which install their own atexit handlers

4 years agoAdd the prefix of the root module onto the name of thread instance data
Arran Cudbard-Bell [Sat, 9 Apr 2022 05:19:53 +0000 (00:19 -0500)] 
Add the prefix of the root module onto the name of thread instance data

4 years agoUse separate module lists for proto, process and rlm modules
Arran Cudbard-Bell [Sat, 9 Apr 2022 02:22:58 +0000 (21:22 -0500)] 
Use separate module lists for proto, process and rlm modules

4 years agoEnforce that [length], if present, must be at the end of the type field (#4457)
James Jones [Fri, 8 Apr 2022 19:52:08 +0000 (14:52 -0500)] 
Enforce that [length], if present, must be at the end of the type field (#4457)

4 years agoremove cursor code
Alan T. DeKok [Fri, 8 Apr 2022 19:44:55 +0000 (15:44 -0400)] 
remove cursor code

now that it's wholly unused

4 years agoremove use of cursors
Alan T. DeKok [Fri, 8 Apr 2022 19:41:55 +0000 (15:41 -0400)] 
remove use of cursors

4 years agoremove dependency on fr_cursor_t
Alan T. DeKok [Fri, 8 Apr 2022 19:36:47 +0000 (15:36 -0400)] 
remove dependency on fr_cursor_t

we're not going to fix everything right now, but this is easy,
fast, and not wrong.

4 years agodcursor.c is only for testing
Alan T. DeKok [Fri, 8 Apr 2022 17:32:17 +0000 (13:32 -0400)] 
dcursor.c is only for testing