]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
9 months agomap RHS should be single-quoted string
Alan T. DeKok [Mon, 27 Jan 2025 21:26:50 +0000 (16:26 -0500)] 
map RHS should be single-quoted string

9 months agodisable expansion in SQL modules for RHS values of check queries
Alan T. DeKok [Mon, 27 Jan 2025 17:46:59 +0000 (12:46 -0500)] 
disable expansion in SQL modules for RHS values of check queries

it turns out to be not particularly useful, and has some corner
cases we're going to avoid for a bit.

As a result, disabled the "attrref" test.

9 months agoremove merge text
nolade [Fri, 24 Jan 2025 18:44:40 +0000 (13:44 -0500)] 
remove merge text

Files Updates to remove merge conflict texts (squashed)

Updated xrefs/hyperlinks and formatting

Index and nav files tweaked to urls resolved. Other hyperlinks fixed & format tweaks.

9 months agoremove accounting from unix module
Alan T. DeKok [Mon, 27 Jan 2025 14:20:13 +0000 (09:20 -0500)] 
remove accounting from unix module

no one has used this for a long time

9 months agoregenerate with inline code
Alan T. DeKok [Mon, 27 Jan 2025 14:15:44 +0000 (09:15 -0500)] 
regenerate with inline code

9 months agoprint inline code for virtual servers
Alan T. DeKok [Mon, 27 Jan 2025 14:14:46 +0000 (09:14 -0500)] 
print inline code for virtual servers

9 months agoremove radutmp, radlast, radwho, and radzap
Alan T. DeKok [Mon, 27 Jan 2025 13:35:11 +0000 (08:35 -0500)] 
remove radutmp, radlast, radwho, and radzap

Many OS's have moved away from using flat-text files for utmp.
Some don't even provide utmp functionality or header files.

I can't remember the last time I ran into someone using radutmp,
even in v3.  And I can't recall ever designing a system with
radutmp.  It's 2025, and people should use sqlite instead.

9 months agobetter catch corner case of "Framed-User"
Alan T. DeKok [Mon, 27 Jan 2025 12:20:31 +0000 (07:20 -0500)] 
better catch corner case of "Framed-User"

Which can end up being parsed as "Framed-User - User".  Because:

* '-' is a terminal character, so unescaping of Framed-User stops
  at it, and returns "Framed"

* "Framed" is a valid enum name, and is a synonym for Framed-User

* the enum "Framed-User" is then returned, with a trailing sbuff
  of "-User"

* the rest is parsed, and the final result is that "Framed-User"
  turns into "Framed-User - User".

9 months agoAvoid noise in log files
Nick Porter [Mon, 27 Jan 2025 09:13:40 +0000 (09:13 +0000)] 
Avoid noise in log files

9 months agocomplain on empty conditions
Alan T. DeKok [Sun, 26 Jan 2025 19:17:12 +0000 (14:17 -0500)] 
complain on empty conditions

update error messages for spelling mistake

batten down the rules for parsing enum names

9 months agoit helps to set enumv in the value box.
Alan T. DeKok [Sun, 26 Jan 2025 21:19:14 +0000 (16:19 -0500)] 
it helps to set enumv in the value box.

so that when the value is printed, it's printed as the name.

This wasn't needed before, because almost all of the tmpls were
unresolved data, and any printing used the tmpl name.

9 months agomore errors when tmpl_require_enum_prefix is set
Alan T. DeKok [Sun, 26 Jan 2025 17:40:52 +0000 (12:40 -0500)] 
more errors when tmpl_require_enum_prefix is set

9 months agoupdates for new parsing
Alan T. DeKok [Sun, 26 Jan 2025 16:38:00 +0000 (11:38 -0500)] 
updates for new parsing

map_afrom_cp() now requires that the RHS of !* and =* are ANY,
as with map_afrom_fields()

update the keyword tests to use quoted strings or ::NAME in more
places, which helps with migration away from &

9 months agoFR_FAULT_LOG() can only take strings
Alan T. DeKok [Sun, 26 Jan 2025 16:07:21 +0000 (11:07 -0500)] 
FR_FAULT_LOG() can only take strings

%pR isn't a valid expansion, and even if it was, it doesn't take
value-boxes

9 months agocleanups of expression and condition parsing
Alan T. DeKok [Sun, 26 Jan 2025 15:38:03 +0000 (10:38 -0500)] 
cleanups of expression and condition parsing

we need quotes around bare words in more places.

Any explicit cast is NOT passed down when parsing the next thing.
Instead, the next thing is parsed as-is, and then the cast is
applied by the current function.  This cleans up a lot of odd cases.

Also add more checks for different tmpl types when casting things

Add '#if 0' out code to complain on unresolved data when parsing.
Changing that will require a bunch of other updates, to add quotes
around bare words.

the tmpl_resolve() function would treat unresolved data as either
enums or strings.  That will be changing to require either '::'
prefix on enums, OR quotes around non-attribute bare words.

So (ippadr)* is now invalid, as "*" can't be parsed by
tmpl_afrom_substr().  Instead, we must use (ipaddr)'*'

9 months agotail_da might not exist for &reply.
Alan T. DeKok [Sun, 26 Jan 2025 14:13:04 +0000 (09:13 -0500)] 
tail_da might not exist for &reply.

9 months agothese functions aren't pure
Alan T. DeKok [Sun, 26 Jan 2025 13:00:54 +0000 (08:00 -0500)] 
these functions aren't pure

9 months agoadd and use -S require_enum_prefix=yes to unit_test_attribute
Alan T. DeKok [Fri, 24 Jan 2025 21:03:20 +0000 (16:03 -0500)] 
add and use -S require_enum_prefix=yes to unit_test_attribute

all of the protocols pass tests without '&'.  The only things
remaining are the condition and xlat tests

9 months agoremove -a
Alan T. DeKok [Fri, 24 Jan 2025 21:02:45 +0000 (16:02 -0500)] 
remove -a

missed in commit d711382

9 months agoremove -a, as we now use xref instead of full path
Alan T. DeKok [Fri, 24 Jan 2025 19:32:44 +0000 (14:32 -0500)] 
remove -a, as we now use xref instead of full path

9 months agomove to xref instead of hard-coded paths
Alan T. DeKok [Fri, 24 Jan 2025 19:29:28 +0000 (14:29 -0500)] 
move to xref instead of hard-coded paths

9 months agomore shut up Coverity
Alan T. DeKok [Fri, 24 Jan 2025 19:27:34 +0000 (14:27 -0500)] 
more shut up Coverity

9 months agorename directories to go along with commit 38571c5e
Alan T. DeKok [Fri, 24 Jan 2025 00:53:31 +0000 (19:53 -0500)] 
rename directories to go along with commit 38571c5e

9 months agowrap macro fields due to operator precedence
Alan T. DeKok [Thu, 23 Jan 2025 19:08:09 +0000 (14:08 -0500)] 
wrap macro fields due to operator precedence

9 months agosuppress casts of string to string
Alan T. DeKok [Thu, 23 Jan 2025 18:02:29 +0000 (13:02 -0500)] 
suppress casts of string to string

9 months agomore cleanups
Alan T. DeKok [Thu, 23 Jan 2025 03:27:01 +0000 (22:27 -0500)] 
more cleanups

9 months agobe a bit more descriptive about what triggered the error
Alan T. DeKok [Thu, 23 Jan 2025 02:28:35 +0000 (21:28 -0500)] 
be a bit more descriptive about what triggered the error

9 months agoadd one more assert for tmpl_require_enum_prefix
Alan T. DeKok [Thu, 23 Jan 2025 02:18:58 +0000 (21:18 -0500)] 
add one more assert for tmpl_require_enum_prefix

all YES to '&' should have been changed to AUTO by the tmpl
tokenizer

9 months agoprint out casts and nested xlats in xlat_debug functions
Alan T. DeKok [Thu, 23 Jan 2025 01:56:56 +0000 (20:56 -0500)] 
print out casts and nested xlats in xlat_debug functions

9 months agofix links on index pages
Alan T. DeKok [Wed, 22 Jan 2025 23:35:20 +0000 (18:35 -0500)] 
fix links on index pages

9 months agoregenerate and fix links
Alan T. DeKok [Wed, 22 Jan 2025 23:33:35 +0000 (18:33 -0500)] 
regenerate and fix links

9 months agochange link to new location
Alan T. DeKok [Wed, 22 Jan 2025 23:24:04 +0000 (18:24 -0500)] 
change link to new location

9 months agofix file links to conf files
nolade [Tue, 21 Jan 2025 21:27:52 +0000 (16:27 -0500)] 
fix file links to conf files

9 months agofix in-page links for modules
nolade [Tue, 21 Jan 2025 20:46:52 +0000 (15:46 -0500)] 
fix in-page links for modules

no kafka.adoc found. Temp remove link if it doesn’t exist

9 months agothis is no longer needed
Alan T. DeKok [Wed, 22 Jan 2025 22:25:27 +0000 (17:25 -0500)] 
this is no longer needed

9 months agofix links in navbar
Alan T. DeKok [Wed, 22 Jan 2025 20:53:35 +0000 (15:53 -0500)] 
fix links in navbar

9 months agoupdate docs and rename
Alan T. DeKok [Wed, 22 Jan 2025 16:50:46 +0000 (11:50 -0500)] 
update docs and rename

after some thought (finally), it makes more sense to drop the
"alias/foo.txt" names, and instead use "v3/dictionary.foo".

It is now clearer that the names are for v3 compatibility.

9 months agoclarify error message
Alan T. DeKok [Wed, 22 Jan 2025 16:43:48 +0000 (11:43 -0500)] 
clarify error message

9 months agoallow adding files to dictionaries
Alan T. DeKok [Wed, 22 Jan 2025 15:30:12 +0000 (10:30 -0500)] 
allow adding files to dictionaries

without specifying the full dictionary path.  It doesn't make a lot
of sense to load "radius/foo" when the function is being asked to
load the file into the RADIUS dictionary

9 months agomove utility function to common location
Alan T. DeKok [Wed, 22 Jan 2025 15:13:11 +0000 (10:13 -0500)] 
move utility function to common location

9 months agoallow bare word attributes in configuration
Alan T. DeKok [Wed, 22 Jan 2025 01:47:47 +0000 (20:47 -0500)] 
allow bare word attributes in configuration

via CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE

9 months agocomplain about v3 processing sections being used in v4
Alan T. DeKok [Tue, 21 Jan 2025 19:23:25 +0000 (14:23 -0500)] 
complain about v3 processing sections being used in v4

9 months agoremove '&' from the module tests.
Alan T. DeKok [Tue, 21 Jan 2025 02:02:04 +0000 (21:02 -0500)] 
remove '&' from the module tests.

now that the call_env stuff is a little cleaner, we always read
call_env things marked up as 'attribute' via the attribute
tokenizer.

9 months agohandle ATTRIBUTE flag better.
Alan T. DeKok [Tue, 21 Jan 2025 01:56:25 +0000 (20:56 -0500)] 
handle ATTRIBUTE flag better.

If the flag is set, then the data _must_ be parsed as an attribute.

In which case we just call the tmpl_afrom_attr_str() function,
instead of calling the generic tmpl_afrom_substr() function.
and then complaining if the parsed tmpl wasn't an attribute.

9 months agoshut up coverity
Alan T. DeKok [Mon, 20 Jan 2025 20:49:19 +0000 (15:49 -0500)] 
shut up coverity

9 months agoupdate call_env flags, and remove '&' from the test
Alan T. DeKok [Mon, 20 Jan 2025 20:33:27 +0000 (15:33 -0500)] 
update call_env flags, and remove '&' from the test

9 months agoremove '&' from the start of the line
Alan T. DeKok [Mon, 20 Jan 2025 17:59:36 +0000 (12:59 -0500)] 
remove '&' from the start of the line

earlier commits didn't do that.

 perl -p -i -e 's/^&//' $(git grep -l '^&' src/tests/modules)

9 months agoLess cryptic error message
Nick Porter [Mon, 20 Jan 2025 13:40:47 +0000 (13:40 +0000)] 
Less cryptic error message

9 months agoadd '&' until such time as we clean up the call_env stuff
Alan T. DeKok [Sun, 19 Jan 2025 12:14:25 +0000 (07:14 -0500)] 
add '&' until such time as we clean up the call_env stuff

we likely want to add CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE to the
various configuration item entries.  But we'll look at that a
bit later

9 months agoThe configuration item is psk_hexphrase. #5469
Alan T. DeKok [Sun, 19 Jan 2025 12:12:33 +0000 (07:12 -0500)] 
The configuration item is psk_hexphrase.  #5469

9 months agomove lavel to avoid asserts
Alan T. DeKok [Sun, 19 Jan 2025 12:07:13 +0000 (07:07 -0500)] 
move lavel to avoid asserts

because the asserts might not be correct when not using '&'

9 months agoremove '&' from module tests
Alan T. DeKok [Sun, 19 Jan 2025 12:03:09 +0000 (07:03 -0500)] 
remove '&' from module tests

and mandate tmpl_require_enum=yes for them.

9 months agomore debugging, and parse RHS as attribute for new code
Alan T. DeKok [Sun, 19 Jan 2025 11:24:31 +0000 (06:24 -0500)] 
more debugging, and parse RHS as attribute for new code

debugging lets us see exactly which stage of parsing failed.

when tmpl_require_enum_prefix=yes, AND we can't parse the RHS
as an enum, or other data type, then try to parse it as an
attribute.

This means that if the RHS string is unquoted, and is accidentally
the same as an attribute name, then it will get parsed as an
attribute reference.

It's not clear what the best solution is here.  In order to
differentiate the two types of data, either have to:

a) forbid bare words except for attribute names
   which means requiring that all strings including passwords
   are quoted.  This seems unfriendly.

b) allow '&' on the RHS, in order to separate it from bare word
   strings.  But then if a password begins with '&', it will be
   treated as an attribute reference

c) change the operator to one which explicitly signals that the
   RHS is an attribute.  Perhaps by tacking on '&' after the
   operator?  Which seems fugly.

9 months agoprint out the data which can't be parsed
Alan T. DeKok [Sun, 19 Jan 2025 11:24:07 +0000 (06:24 -0500)] 
print out the data which can't be parsed

so the poor user knows what went wrong

9 months agomore fixes and assertion checks for tmpl_require_enum_prefix=false
Alan T. DeKok [Fri, 17 Jan 2025 23:15:39 +0000 (18:15 -0500)] 
more fixes and assertion checks for tmpl_require_enum_prefix=false

9 months agoadd :: for enums
Alan T. DeKok [Sun, 19 Jan 2025 01:47:31 +0000 (20:47 -0500)] 
add :: for enums

9 months agowe need '&' here
Alan T. DeKok [Sat, 18 Jan 2025 23:17:40 +0000 (18:17 -0500)] 
we need '&' here

because we have not yet updated the xlat function argument parser
to treat bare words as being attribute references

9 months agouse :: for enum names
Alan T. DeKok [Sat, 18 Jan 2025 23:03:49 +0000 (18:03 -0500)] 
use :: for enum names

9 months agoWithout &, bare words are more often attribute references.
Alan T. DeKok [Sat, 18 Jan 2025 21:40:44 +0000 (16:40 -0500)] 
Without &, bare words are more often attribute references.

Add a flag to the call_env API which says that this thing might
be an attribute reference, but only if it's a bare word.  And it's
not _required_ to be an attribute reference.

Update rlm_linelog to use the new flag.

Now that we can't key off of '&' to say "bare word is an attribute",
we must instead use a slightly more complex method.

9 months agoset rhs_rules->enumv to LHS attribute for map parsing
Alan T. DeKok [Sat, 18 Jan 2025 23:05:54 +0000 (18:05 -0500)] 
set rhs_rules->enumv to LHS attribute for map parsing

9 months agoupdate test and docs in preparation for removing '&'
Alan T. DeKok [Sat, 18 Jan 2025 20:45:25 +0000 (15:45 -0500)] 
update test and docs in preparation for removing '&'

9 months agoUse :: for enum name
Alan T. DeKok [Sat, 18 Jan 2025 19:11:14 +0000 (14:11 -0500)] 
Use :: for enum name

9 months agorequire hard-coded RHS for legacy =* and !* operators.
Alan T. DeKok [Sat, 18 Jan 2025 17:18:37 +0000 (12:18 -0500)] 
require hard-coded RHS for legacy =* and !* operators.

The recommendation for decades has been to use =*ANY or !*ANY.
We now make it official.

Without that check, the "no &" code will expect the RHS to be
an attribute reference, and will fail.

Update the documentation to match.

9 months agowe don't need "module" here
Alan T. DeKok [Sat, 18 Jan 2025 16:53:48 +0000 (11:53 -0500)] 
we don't need "module" here

9 months agoswap back to default "no" for tmpl_require_enum_prefix
Alan T. DeKok [Sat, 18 Jan 2025 16:34:58 +0000 (11:34 -0500)] 
swap back to default "no" for tmpl_require_enum_prefix

and update the command-line parser to set the global variable

9 months agomight as well include the Juniper dictionary
Alan T. DeKok [Fri, 17 Jan 2025 16:08:09 +0000 (11:08 -0500)] 
might as well include the Juniper dictionary

9 months agoUse / require '@' in subrequest, when changing namespaces
Alan T. DeKok [Fri, 17 Jan 2025 15:57:10 +0000 (10:57 -0500)] 
Use / require '@' in subrequest, when changing namespaces

9 months agoRemove '&'
Alan T. DeKok [Fri, 17 Jan 2025 14:32:31 +0000 (09:32 -0500)] 
Remove '&'

perl -p -i -e 's/([^&])&([a-zA-Z0-9])/$1$2/g' $(git grep -l '&' src/tests/keywords | egrep -v '\.mk')

with an edit for radiusd.conf

9 months agorequire_enum_prefix=yes is now the default
Alan T. DeKok [Thu, 16 Jan 2025 21:12:51 +0000 (16:12 -0500)] 
require_enum_prefix=yes is now the default

so we don't need it in the configurations.

9 months agoswap to "require_enum_prefix = yes" by default.
Alan T. DeKok [Thu, 16 Jan 2025 20:45:35 +0000 (15:45 -0500)] 
swap to "require_enum_prefix = yes" by default.

Hopefully some tests will pass.  :)

9 months agosignal handlers are async. CID #1638648
Alan T. DeKok [Thu, 16 Jan 2025 16:43:04 +0000 (11:43 -0500)] 
signal handlers are async. CID #1638648

9 months agoquiet coverity
Alan T. DeKok [Thu, 16 Jan 2025 16:28:55 +0000 (11:28 -0500)] 
quiet coverity

stop using multiple intermediate variables, and just switch to
using p / end, as with almost everything else.

9 months agoRADIUS can only have 64K packets max. Shuts up Coverity
Alan T. DeKok [Wed, 15 Jan 2025 18:58:26 +0000 (13:58 -0500)] 
RADIUS can only have 64K packets max.  Shuts up Coverity

9 months agocorrect type size check.
Alan T. DeKok [Wed, 15 Jan 2025 16:13:12 +0000 (11:13 -0500)] 
correct type size check.

not everything is RADIUS

9 months agofix up header now that we use BEGIN PROTOCOL
Alan T. DeKok [Wed, 15 Jan 2025 16:02:38 +0000 (11:02 -0500)] 
fix up header now that we use BEGIN PROTOCOL

9 months agomove modification code to locked region. CID #1638648
Alan T. DeKok [Wed, 15 Jan 2025 15:49:52 +0000 (10:49 -0500)] 
move modification code to locked region.  CID #1638648

9 months agoalive_clients may be cleaned up out of order
Alan T. DeKok [Wed, 15 Jan 2025 14:54:36 +0000 (09:54 -0500)] 
alive_clients may be cleaned up out of order

Though arguably this shouldn't happen.  For now, just fix the
crash on exit.  We don't need to debug the issue if we're moving
to the new BIO code.

9 months agoTypo
James Jones [Thu, 14 Mar 2024 16:10:28 +0000 (11:10 -0500)] 
Typo

9 months agomove raddb to reference
Alan T. DeKok [Tue, 14 Jan 2025 21:30:52 +0000 (16:30 -0500)] 
move raddb to reference

it's not it's own thing, it's part of the reference for the
server.

move the files

git mv doc/antora/modules/raddb/pages doc/antora/modules/references/pages/raddb

fix up the cross refs

perl -p -i -e 's,xref:raddb:,xref:reference:raddb/,' $(git grep -l xref:raddb .)

fix up doc/all.mk with change thingies

move raddb/nav.adoc into references/nav.adoc, with one more level of nesting

9 months agowe can't set da->type until later, or else things complain
Alan T. DeKok [Mon, 13 Jan 2025 21:21:52 +0000 (16:21 -0500)] 
we can't set da->type until later, or else things complain

9 months agomight as well set da->dict, too
Alan T. DeKok [Mon, 13 Jan 2025 20:50:39 +0000 (15:50 -0500)] 
might as well set da->dict, too

9 months agopass da_p to type_parse()
Alan T. DeKok [Mon, 13 Jan 2025 20:49:58 +0000 (15:49 -0500)] 
pass da_p to type_parse()

so that it can update or add extensions.

9 months agopass da_p
Alan T. DeKok [Mon, 13 Jan 2025 20:49:13 +0000 (15:49 -0500)] 
pass da_p

9 months agofix: Updated reference to attr.type_parse to use the dict of the decode context,...
ethan-thompson [Mon, 13 Jan 2025 19:02:58 +0000 (14:02 -0500)] 
fix: Updated reference to attr.type_parse to use the dict of the decode context, since the da dict is not set until shortly after this call is made.

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
9 months agoremove unused code
Alan T. DeKok [Mon, 13 Jan 2025 14:57:37 +0000 (09:57 -0500)] 
remove unused code

should not have been commited with fix 713622c9eaa72

9 months agominor updates README.md & install_deps.sh - added link , reworded some lines
nolade [Thu, 9 Jan 2025 22:07:48 +0000 (17:07 -0500)] 
minor updates README.md & install_deps.sh - added link , reworded some lines

Added details to steps, add hyperlinks, updated layout with headers (TOC)

Remove zip instructions

9 months agoInclude timeout duration in debug message
Nick Porter [Mon, 13 Jan 2025 10:15:52 +0000 (10:15 +0000)] 
Include timeout duration in debug message

9 months agoCopy shortname after dynamic client is defined
Nick Porter [Mon, 13 Jan 2025 10:13:56 +0000 (10:13 +0000)] 
Copy shortname after dynamic client is defined

9 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar
github-actions[bot] [Mon, 13 Jan 2025 09:34:58 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar

9 months agoinitialize vals. CID #1638739
Alan T. DeKok [Sun, 12 Jan 2025 22:46:22 +0000 (17:46 -0500)] 
initialize vals.  CID #1638739

9 months agogive ret the appropriate type (CID #1604602) (#5429)
James Jones [Sun, 12 Jan 2025 20:52:03 +0000 (14:52 -0600)] 
give ret the appropriate type (CID #1604602) (#5429)

Declaring ret as ssize_t, the value fr_aka_sim_encode() returns,
avoids the overflow_const error.

9 months agoHandle edge case in fr_rand_init() and, we suspect, oveflow (CID #1604611) (#5434)
James Jones [Sun, 12 Jan 2025 20:51:22 +0000 (14:51 -0600)] 
Handle edge case in fr_rand_init() and, we suspect, oveflow  (CID #1604611) (#5434)

To handle the rare case of not filling fr_rand_pool.randrsl in a single read,
adjust the location passed to read() to skip what was read in a previous
interation. This is done in a way consistent with the handling of this case
in 3.x, which should also deal with the overflow_sink complaint from Coverity.

9 months agoAnnotate return_overflow in mod_write() (CID #1604620) (#5437)
James Jones [Sun, 12 Jan 2025 20:49:36 +0000 (14:49 -0600)] 
Annotate return_overflow in mod_write() (CID #1604620) (#5437)

This is arguably another example of trying to return a value not
representable in the function return type. It's highly unlikely that
anyone will pass a buffer of more than SSIZE_MAX bytes, but Coverity
apparently doesn't consider that.

CIDs #1604605 and #1604616 explicitly do return error values not
representable as int, but a ridiculously large buffer allocation will
fail long before anyone calls mod_write(), so we annotate.

9 months agoAnnotate return_overflow in fr_writev() (CID #1604625) (#5438)
James Jones [Sun, 12 Jan 2025 20:49:14 +0000 (14:49 -0600)] 
Annotate return_overflow in fr_writev() (CID #1604625) (#5438)

In theory, iovcnt and the amounts written could total to more than
SSIZE_MAX, and when Coverity is looking at fr_writev() rather than
its callers it can't tell. We therefore annotate.

9 months agoMove coverity-only check ahead of first use (CID #1635782) (#5474)
James Jones [Sun, 12 Jan 2025 20:48:53 +0000 (14:48 -0600)] 
Move coverity-only check ahead of first use (CID #1635782) (#5474)

The check that dctx->dict is non-NULL has to appear before
the first dereference of dctx->dict.

9 months agoSwitch Coverity-only code to assert (CID #1619299) (#5441)
James Jones [Sun, 12 Jan 2025 20:48:01 +0000 (14:48 -0600)] 
Switch Coverity-only code to assert (CID #1619299) (#5441)

fr_nbo_from_uint64v() does not have an error return--it doesn't
need one. The buffers are big enough, the "| 0x80" means it will
always use as least one byte, so fr_high_bit_pos() won't return 0
even if num == 0. So adding a bogus error return check for Coverity
actually misleads Coverity about any call to fr_nbo_from_uint64v(),
making it the probable cause of the CID.

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
9 months agoquiet a number of coverity issues
Alan T. DeKok [Sun, 12 Jan 2025 14:50:27 +0000 (09:50 -0500)] 
quiet a number of coverity issues

9 months agocopy is_set fields, too
Alan T. DeKok [Sun, 12 Jan 2025 14:25:29 +0000 (09:25 -0500)] 
copy is_set fields, too

9 months agoshut up coverity. CID #1604620
Alan T. DeKok [Sat, 11 Jan 2025 15:11:38 +0000 (10:11 -0500)] 
shut up coverity.  CID #1604620

9 months agotweak code to satisfy coverity #1633838
Alan T. DeKok [Sat, 11 Jan 2025 15:04:01 +0000 (10:04 -0500)] 
tweak code to satisfy coverity #1633838