]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agouse fr_type_promote() in condition tokenizer
Alan T. DeKok [Fri, 8 Jan 2021 22:41:17 +0000 (17:41 -0500)] 
use fr_type_promote() in condition tokenizer

and update one test:  we can cast a "string" to "ipaddr"
for comparisons

5 years agoadd fr_type_promote()
Alan T. DeKok [Fri, 8 Jan 2021 21:03:29 +0000 (16:03 -0500)] 
add fr_type_promote()

which returns what data type should be used when we have two
different data types in a comparison.

Note that the output data type _may_ be different from either
of the input data types!

Note also that there may be failures at run-time, if the values
don't fit.

5 years agohoist checks to common code
Alan T. DeKok [Fri, 8 Jan 2021 16:31:43 +0000 (11:31 -0500)] 
hoist checks to common code

5 years agodon't parse "Foo-Bar" as an attribute for tmpl_is_unresolved()
Alan T. DeKok [Fri, 8 Jan 2021 16:22:00 +0000 (11:22 -0500)] 
don't parse "Foo-Bar" as an attribute for tmpl_is_unresolved()

v4 requires "&" prefixes.  So "&Foo-Bar" is tmpl_is_attr_unresolved()

5 years agoclean up checks for regex
Alan T. DeKok [Fri, 8 Jan 2021 15:47:50 +0000 (10:47 -0500)] 
clean up checks for regex

it's never allowed on the RHS.  and casts aren't allowed

5 years agofix name
Alan T. DeKok [Fri, 8 Jan 2021 15:23:17 +0000 (10:23 -0500)] 
fix name

5 years agohave tmpl_cast_set() call fr_type_cast()
Alan T. DeKok [Fri, 8 Jan 2021 14:50:21 +0000 (09:50 -0500)] 
have tmpl_cast_set() call fr_type_cast()

and update tests to match.

5 years agoadd fr_type_cast()
Alan T. DeKok [Fri, 8 Jan 2021 14:49:49 +0000 (09:49 -0500)] 
add fr_type_cast()

which checks if you can cast type src->dst

5 years agomove 'size' to be with unsigned ints
Alan T. DeKok [Fri, 8 Jan 2021 13:52:33 +0000 (08:52 -0500)] 
move 'size' to be with unsigned ints

5 years agoFix rlm_smtp
Arran Cudbard-Bell [Fri, 8 Jan 2021 15:02:36 +0000 (15:02 +0000)] 
Fix rlm_smtp

5 years agoTypo
Arran Cudbard-Bell [Fri, 8 Jan 2021 14:54:22 +0000 (14:54 +0000)] 
Typo

5 years agoMore fixups for the raw api in dhcpclient
Arran Cudbard-Bell [Fri, 8 Jan 2021 14:49:12 +0000 (14:49 +0000)] 
More fixups for the raw api in dhcpclient

5 years agoMove remaining list heads out of fr_radius_packet_t into the request_t
Arran Cudbard-Bell [Fri, 8 Jan 2021 14:10:26 +0000 (14:10 +0000)] 
Move remaining list heads out of fr_radius_packet_t into the request_t

5 years agoUse pair list abstraction macros in more places
Arran Cudbard-Bell [Fri, 8 Jan 2021 14:02:50 +0000 (14:02 +0000)] 
Use pair list abstraction macros in more places

5 years agoRequest can be const when passed to log_rdebug_enabled
Arran Cudbard-Bell [Fri, 8 Jan 2021 14:02:24 +0000 (14:02 +0000)] 
Request can be const when passed to log_rdebug_enabled

5 years agoQuiet clang scan
Arran Cudbard-Bell [Thu, 7 Jan 2021 22:34:35 +0000 (22:34 +0000)] 
Quiet clang scan

5 years agouse FR_TYPE_VALUE
Alan T. DeKok [Thu, 7 Jan 2021 21:45:38 +0000 (16:45 -0500)] 
use FR_TYPE_VALUE

5 years agoMore dhcpclient fixes
Arran Cudbard-Bell [Thu, 7 Jan 2021 20:57:40 +0000 (20:57 +0000)] 
More dhcpclient fixes

5 years agotypo
Alan T. DeKok [Thu, 7 Jan 2021 21:05:12 +0000 (16:05 -0500)] 
typo

5 years agoremove PACKAGE_* definitions from config.h.in
Alan T. DeKok [Thu, 7 Jan 2021 20:50:42 +0000 (15:50 -0500)] 
remove PACKAGE_* definitions from config.h.in

likely added by running "autoconf" locally, instead of doing
"make reconfig" at the top level.

We don't use PACKAGE_* definitions for anything, and they
should only be defined at the top level. i.e. the package is
"freeradius-server", and not "whatever module this happens to be"

5 years agoremove c->cast from everything
Alan T. DeKok [Thu, 7 Jan 2021 20:41:36 +0000 (15:41 -0500)] 
remove c->cast from everything

5 years agowe never allowed casts for existence checks
Alan T. DeKok [Thu, 7 Jan 2021 20:28:03 +0000 (15:28 -0500)] 
we never allowed casts for existence checks

5 years agoremove c->cast from switch statements
Alan T. DeKok [Thu, 7 Jan 2021 20:26:07 +0000 (15:26 -0500)] 
remove c->cast from switch statements

5 years agoremove c->cast from pass2_fixup_cond_map()
Alan T. DeKok [Thu, 7 Jan 2021 20:02:52 +0000 (15:02 -0500)] 
remove c->cast from pass2_fixup_cond_map()

5 years agoremove all references to c->cast from conditional evaluations
Alan T. DeKok [Thu, 7 Jan 2021 18:18:51 +0000 (13:18 -0500)] 
remove all references to c->cast from conditional evaluations

which means that we only rely on the LHS tmpl casting

5 years agoensure that c->data.map->lhs->cast matches c->cast
Alan T. DeKok [Thu, 7 Jan 2021 18:10:08 +0000 (13:10 -0500)] 
ensure that c->data.map->lhs->cast matches c->cast

5 years agomove more normalisation to cond_normalise()
Alan T. DeKok [Thu, 7 Jan 2021 17:49:06 +0000 (12:49 -0500)] 
move more normalisation to cond_normalise()

5 years agoupdate error messages
Alan T. DeKok [Thu, 7 Jan 2021 17:18:37 +0000 (12:18 -0500)] 
update error messages

5 years agocheck tmpl types for casting
Alan T. DeKok [Thu, 7 Jan 2021 15:28:26 +0000 (10:28 -0500)] 
check tmpl types for casting

there's no reason to cast a regex to anything.  casts only apply
to data types (data, attr, exec, xlat)

and update tests to match

5 years agoSeparate requests from packets in dhcpclient
Arran Cudbard-Bell [Thu, 7 Jan 2021 20:48:26 +0000 (20:48 +0000)] 
Separate requests from packets in dhcpclient

5 years agorequest|reply_pairs already used
Arran Cudbard-Bell [Thu, 7 Jan 2021 20:46:45 +0000 (20:46 +0000)] 
request|reply_pairs already used

5 years agoRemove dependency on packet->vps for radsnmp
Arran Cudbard-Bell [Thu, 7 Jan 2021 19:04:09 +0000 (19:04 +0000)] 
Remove dependency on packet->vps for radsnmp

5 years agoFixup radsniff to use packet lists distinct from packets
Arran Cudbard-Bell [Thu, 7 Jan 2021 18:51:28 +0000 (18:51 +0000)] 
Fixup radsniff to use packet lists distinct from packets

5 years agoFix packet verify to take a separate list pointer
Arran Cudbard-Bell [Wed, 6 Jan 2021 17:54:01 +0000 (17:54 +0000)] 
Fix packet verify to take a separate list pointer

5 years ago...and some more
Arran Cudbard-Bell [Wed, 6 Jan 2021 17:51:36 +0000 (17:51 +0000)] 
...and some more

5 years agoMake _fr_dbuff_init() and FR_DBUFF_TMP() set the buff field (#3837)
James Jones [Thu, 7 Jan 2021 01:26:21 +0000 (19:26 -0600)] 
Make _fr_dbuff_init() and FR_DBUFF_TMP() set the buff field (#3837)

5 years ago...and some more
Arran Cudbard-Bell [Wed, 6 Jan 2021 17:49:00 +0000 (17:49 +0000)] 
...and some more

5 years agoClean up uses of request->state
Arran Cudbard-Bell [Wed, 6 Jan 2021 17:47:38 +0000 (17:47 +0000)] 
Clean up uses of request->state

5 years agoPass list headers (separate from packets) into radius encoding/decoding functions
Arran Cudbard-Bell [Wed, 6 Jan 2021 17:42:48 +0000 (17:42 +0000)] 
Pass list headers (separate from packets) into radius encoding/decoding functions

This is with a view of removing packet->vps, and moving it to request_t, after which we can maybe merge all the list heads under a single root.

5 years agoBetter names for some tmpl functions
Arran Cudbard-Bell [Wed, 6 Jan 2021 16:56:29 +0000 (16:56 +0000)] 
Better names for some tmpl functions

5 years agoFix fr_packet_log to take a separate list
Arran Cudbard-Bell [Wed, 6 Jan 2021 16:54:05 +0000 (16:54 +0000)] 
Fix fr_packet_log to take a separate list

5 years agoadd HW-Ext-Specific RADIUS attribute for bounce port using CoA (#3833)
Nicolas Quiniou-Briand [Wed, 6 Jan 2021 11:18:03 +0000 (12:18 +0100)] 
add HW-Ext-Specific RADIUS attribute for bounce port using CoA (#3833)

5 years agocatch more edge conditions in cond_eval()
Alan T. DeKok [Tue, 5 Jan 2021 19:42:40 +0000 (14:42 -0500)] 
catch more edge conditions in cond_eval()

and fixup parenting after normalization

5 years agoAdd code that honors the "max" field in fr_sbuff_uctx_file_t (#3786)
James Jones [Tue, 5 Jan 2021 19:00:21 +0000 (13:00 -0600)] 
Add code that honors the "max" field in fr_sbuff_uctx_file_t (#3786)

Note: buffering in the FILE may cause it to read more bytes
than the sbuff will be allowed to access.

5 years agoSimplify internal_encode(). (#3830)
James Jones [Tue, 5 Jan 2021 17:42:18 +0000 (11:42 -0600)] 
Simplify internal_encode(). (#3830)

With a child dbuff to encode data into,
1. We needn't repeat ourselves with FR_DBUFF_RESERVE().
2. The length of the data when it's encoded is just the
   used portion of the child dbuff.

We also switched to fr_dbuff_in_memcpy() to get the data length
into the dbuff; it gets rid of the clutter of FR_DBUFF_TMP().

5 years agoPropagate shifted from parent to child (#3828)
James Jones [Tue, 5 Jan 2021 17:15:44 +0000 (11:15 -0600)] 
Propagate shifted from parent to child (#3828)

5 years agoAdd fr_value_box_from_network_dbuff() (#3738)
James Jones [Tue, 5 Jan 2021 17:01:17 +0000 (11:01 -0600)] 
Add fr_value_box_from_network_dbuff() (#3738)

With this change, fr_value_box_from_network() is made a wrapper
around fr_value_box_from_network_dbuff()

5 years agomake cond_eval() iterative
Alan T. DeKok [Tue, 5 Jan 2021 16:33:09 +0000 (11:33 -0500)] 
make cond_eval() iterative

and set c->parent correctly in cond_normalise()

5 years agoAdd FR_DBUFF_COPY() analogous to FR_SBUFF_COPY() (#3834)
James Jones [Tue, 5 Jan 2021 16:15:12 +0000 (10:15 -0600)] 
Add FR_DBUFF_COPY() analogous to FR_SBUFF_COPY() (#3834)

5 years ago"next" is no longer valid
Alan T. DeKok [Tue, 5 Jan 2021 15:57:07 +0000 (10:57 -0500)] 
"next" is no longer valid

5 years agoadd more optimizations for
Alan T. DeKok [Tue, 5 Jan 2021 15:06:13 +0000 (10:06 -0500)] 
add more optimizations for

FOO || true

in addition to pre-existing

true || FOO

5 years agofix up talloc parentage
Alan T. DeKok [Tue, 5 Jan 2021 14:27:04 +0000 (09:27 -0500)] 
fix up talloc parentage

children are talloc parented from the parent.
next siblings are talloc parented from the older sibling.

The result is that we can free c->next (if necessary), and
ensure that all of the child *and* next siblings are free'd

5 years agoadd parent to fr_cond_t
Alan T. DeKok [Tue, 5 Jan 2021 13:53:43 +0000 (08:53 -0500)] 
add parent to fr_cond_t

5 years agoremove CONF_ITEM from fr_cond_t.
Alan T. DeKok [Tue, 5 Jan 2021 13:42:28 +0000 (08:42 -0500)] 
remove CONF_ITEM from fr_cond_t.

it's not needed by anyone

5 years agopass CONF_SECTION instead of getting it from fr_cond_t
Alan T. DeKok [Tue, 5 Jan 2021 13:38:11 +0000 (08:38 -0500)] 
pass CONF_SECTION instead of getting it from fr_cond_t

5 years agoFix legacy tmpl function names
Arran Cudbard-Bell [Tue, 5 Jan 2021 00:31:13 +0000 (00:31 +0000)] 
Fix legacy tmpl function names

5 years agoTMPL_TYPE_UNRESOLVED should never occur
Alan T. DeKok [Sun, 3 Jan 2021 14:24:43 +0000 (09:24 -0500)] 
TMPL_TYPE_UNRESOLVED should never occur

5 years agosimplify cond_eval_tmpl()
Alan T. DeKok [Sun, 3 Jan 2021 14:17:49 +0000 (09:17 -0500)] 
simplify cond_eval_tmpl()

5 years agoremove unused parameter
Alan T. DeKok [Sat, 2 Jan 2021 20:36:10 +0000 (15:36 -0500)] 
remove unused parameter

5 years agorename COND_TYPE_EXISTS to COND_TYPE_TMPL
Alan T. DeKok [Sat, 2 Jan 2021 19:56:10 +0000 (14:56 -0500)] 
rename COND_TYPE_EXISTS to COND_TYPE_TMPL

which is rather a lot more correct

5 years agomore cleanups
Alan T. DeKok [Sat, 2 Jan 2021 19:54:11 +0000 (14:54 -0500)] 
more cleanups

5 years agoclean up optimizations for COND_TYPE_CHILD
Alan T. DeKok [Sat, 2 Jan 2021 19:41:08 +0000 (14:41 -0500)] 
clean up optimizations for COND_TYPE_CHILD

5 years agoparent all of the conditions from the ctx
Alan T. DeKok [Sat, 2 Jan 2021 19:29:07 +0000 (14:29 -0500)] 
parent all of the conditions from the ctx

instead of from the parent fr_cond_t.  This change means that
we no longer need to call talloc_steal(), which is slow.

5 years agoadd AND / OR to pass2_cond_callback()
Alan T. DeKok [Sat, 2 Jan 2021 19:22:33 +0000 (14:22 -0500)] 
add AND / OR to pass2_cond_callback()

5 years agodon't re-use variable name
Alan T. DeKok [Sat, 2 Jan 2021 17:35:15 +0000 (12:35 -0500)] 
don't re-use variable name

5 years agomake && and || into conditional types
Alan T. DeKok [Sat, 2 Jan 2021 16:43:31 +0000 (11:43 -0500)] 
make && and || into conditional types

so that the fr_cond_t has less magic in it

5 years agomake format string match parameters
Alan T. DeKok [Sat, 2 Jan 2021 16:27:08 +0000 (11:27 -0500)] 
make format string match parameters

5 years agoHappy new year
Arran Cudbard-Bell [Fri, 1 Jan 2021 18:29:00 +0000 (18:29 +0000)] 
Happy new year

5 years agoAdd the ability to disallow filters in the tmpl_tokenizer
Arran Cudbard-Bell [Fri, 1 Jan 2021 18:26:32 +0000 (18:26 +0000)] 
Add the ability to disallow filters in the tmpl_tokenizer

5 years agoFix debug output for network/worker instantiation
Arran Cudbard-Bell [Thu, 31 Dec 2020 14:44:54 +0000 (14:44 +0000)] 
Fix debug output for network/worker instantiation

5 years agoRemove bad asserts
Arran Cudbard-Bell [Thu, 31 Dec 2020 12:45:01 +0000 (12:45 +0000)] 
Remove bad asserts

5 years agoMinor tweaks to eapol_test-build.sh; Disable shellcheck SC2223 (#3826)
Terry Burton [Thu, 31 Dec 2020 09:39:45 +0000 (09:39 +0000)] 
Minor tweaks to eapol_test-build.sh; Disable shellcheck SC2223 (#3826)

Fixes for issues SC2086 and SC2236 from Super Linter output...

In scripts/ci/eapol_test-build.sh line 41:
: ${BUILD_CONF_DIR:="$(dirname $0)/eapol_test"}
  ^-- SC2223: This default assignment may cause DoS due to globbing. Quote it.
                               ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/ci/eapol_test-build.sh line 51:
    if [ ! -z "${WHICH_EAPOL_TEST}" ]; then
         ^-- SC2236: Use -n instead of ! -z.

Disable SC2223: "This default assignment may cause DoS due to globbing. Quote
it" since this is easy to trigger and rarely a concern.

5 years agorlm_redis_ippool_tool: Link provided OpenSSL (#3827)
Terry Burton [Thu, 31 Dec 2020 09:38:42 +0000 (09:38 +0000)] 
rlm_redis_ippool_tool: Link provided OpenSSL (#3827)

5 years agoFreeBSD build fixes and basic CI build with eapol_test checks (#3825)
Terry Burton [Wed, 30 Dec 2020 20:34:52 +0000 (20:34 +0000)] 
FreeBSD build fixes and basic CI build with eapol_test checks (#3825)

* FreeBSD build fixes

* Fix eapol_test build options

Enable CONFIG_EAP_SIM on FreeBSD.
"n" means yes!

* Remove bashisms from eapol_test-build

* CI: FreeBSD build

5 years agoPass &vp to radius_pairmove() rather than vp in add_vp_tuple() (#3821)
James Jones [Wed, 30 Dec 2020 15:06:28 +0000 (09:06 -0600)] 
Pass &vp to radius_pairmove() rather than vp in add_vp_tuple() (#3821)

This doesn't include code testing rlm_mruby, but it is consistent
with the prototype of radius_pairmove() and with other uses of
the function (e.g. in mod_vptuple() in rlm_python/rlm_python.c).

5 years agoautoconf fixes for --with/--without options (#3820)
Terry Burton [Sun, 27 Dec 2020 14:03:38 +0000 (14:03 +0000)] 
autoconf fixes for --with/--without options (#3820)

* configure.ac fixes for --with/--without of core modules

Rewrite the module name for the --with/--without test so that it matches the
mangling performed by autoconf.

Declare AC_ARG_WITH for the module name to avoid spurious warnings about
invalid --with/--without options.

* configure.ac fixes for --with/--without of rlms

Declare AC_ARG_WITH for the module name to avoid spurious warnings about
invalid --with/--without options.

5 years agoCI package tests: Workaround to permit builds with Fedora Rawhide (#3818)
Terry Burton [Sun, 27 Dec 2020 14:02:48 +0000 (14:02 +0000)] 
CI package tests: Workaround to permit builds with Fedora Rawhide (#3818)

5 years agoclean up and fix build rules
Alan T. DeKok [Fri, 25 Dec 2020 16:42:40 +0000 (11:42 -0500)] 
clean up and fix build rules

5 years agoremove double //
Alan T. DeKok [Fri, 25 Dec 2020 16:35:14 +0000 (11:35 -0500)] 
remove double //

because GNU make is too stupid to know what's a filename and
what's a string

5 years agoPROGRAM_INSTALL is jlibtool, so we need that, too
Alan T. DeKok [Fri, 25 Dec 2020 16:23:12 +0000 (11:23 -0500)] 
PROGRAM_INSTALL is jlibtool, so we need that, too

5 years agoadd missing ${Q}
Alan T. DeKok [Fri, 25 Dec 2020 16:17:29 +0000 (11:17 -0500)] 
add missing ${Q}

5 years agoupdate and fix rules for installing "man" pages
Alan T. DeKok [Fri, 25 Dec 2020 15:13:49 +0000 (10:13 -0500)] 
update and fix rules for installing "man" pages

5 years agodon't use $(R)/, it already ends in /
Alan T. DeKok [Fri, 25 Dec 2020 15:13:29 +0000 (10:13 -0500)] 
don't use $(R)/, it already ends in /

5 years agoupdate to be correct
Alan T. DeKok [Fri, 25 Dec 2020 15:12:28 +0000 (10:12 -0500)] 
update to be correct

5 years agothis is done automatically by the framework
Alan T. DeKok [Fri, 25 Dec 2020 14:53:45 +0000 (09:53 -0500)] 
this is done automatically by the framework

5 years agoensure that R has a trailing /
Alan T. DeKok [Fri, 25 Dec 2020 14:52:01 +0000 (09:52 -0500)] 
ensure that R has a trailing /

5 years agoremove unused argument. Fixes #3817
Alan T. DeKok [Thu, 24 Dec 2020 12:38:59 +0000 (07:38 -0500)] 
remove unused argument.  Fixes #3817

5 years agominor simplification
Alan T. DeKok [Tue, 22 Dec 2020 15:45:54 +0000 (10:45 -0500)] 
minor simplification

5 years agoDon't use fr_sbuff_in_bstrcpy_buffer log messages may not be talloced
Arran Cudbard-Bell [Thu, 24 Dec 2020 02:27:14 +0000 (18:27 -0800)] 
Don't use fr_sbuff_in_bstrcpy_buffer log messages may not be talloced

5 years agorename strerror to error in log_request_error
Arran Cudbard-Bell [Thu, 24 Dec 2020 02:26:19 +0000 (18:26 -0800)] 
rename strerror to error in log_request_error

5 years agoPass --embed only if python3-config supports it
Arran Cudbard-Bell [Wed, 23 Dec 2020 22:22:22 +0000 (14:22 -0800)] 
Pass --embed only if python3-config supports it

5 years agoPass embed to python3 configure otherwise we don't get the '-l' arg for python back
Arran Cudbard-Bell [Wed, 23 Dec 2020 22:07:16 +0000 (14:07 -0800)] 
Pass embed to python3 configure otherwise we don't get the '-l' arg for python back

5 years agoAllow insertion of new dlist items at a specific position
Arran Cudbard-Bell [Mon, 21 Dec 2020 17:40:26 +0000 (11:40 -0600)] 
Allow insertion of new dlist items at a specific position

5 years agorlm_mschap: Fix wrong cast (#3815)
Jorge Pereira [Tue, 22 Dec 2020 05:31:29 +0000 (02:31 -0300)] 
rlm_mschap: Fix wrong cast (#3815)

5 years agolet's actually include the relevant make file
Alan T. DeKok [Mon, 21 Dec 2020 22:20:09 +0000 (17:20 -0500)] 
let's actually include the relevant make file

and don't print out the commands we're using

5 years agomove "man" pages to antora
Alan T. DeKok [Mon, 21 Dec 2020 22:15:08 +0000 (17:15 -0500)] 
move "man" pages to antora

and add rules to build / install the "man" pages

5 years agofix references now that "unlang" has moved
Alan T. DeKok [Mon, 21 Dec 2020 19:19:02 +0000 (14:19 -0500)] 
fix references now that "unlang" has moved

5 years agoability to pass args to antora
Matthew Newton [Mon, 21 Dec 2020 18:45:49 +0000 (18:45 +0000)] 
ability to pass args to antora

5 years agodescribe the outline
Alan T. DeKok [Mon, 21 Dec 2020 14:07:06 +0000 (09:07 -0500)] 
describe the outline

5 years agoadd unlang/ to xref prefixes
Alan T. DeKok [Mon, 21 Dec 2020 14:05:36 +0000 (09:05 -0500)] 
add unlang/ to xref prefixes

now that we've moved the pages