]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoSwitch to compile time check for ASAN
Arran Cudbard-Bell [Wed, 6 Nov 2019 17:09:15 +0000 (11:09 -0600)] 
Switch to compile time check for ASAN

6 years agoFix invalid check
Arran Cudbard-Bell [Wed, 6 Nov 2019 16:59:51 +0000 (10:59 -0600)] 
Fix invalid check

6 years agoRemove unused function
Arran Cudbard-Bell [Wed, 6 Nov 2019 16:12:42 +0000 (10:12 -0600)] 
Remove unused function

6 years agoRemove some instances of fr_hash_table_walk
Arran Cudbard-Bell [Wed, 6 Nov 2019 15:50:54 +0000 (09:50 -0600)] 
Remove some instances of fr_hash_table_walk

6 years agounload dl's, too.
Alan T. DeKok [Wed, 6 Nov 2019 15:21:17 +0000 (10:21 -0500)] 
unload dl's, too.

6 years agofree "autofree" context manually
Alan T. DeKok [Wed, 6 Nov 2019 15:16:33 +0000 (10:16 -0500)] 
free "autofree" context manually

there seems to be issues with calling it automatically via
atexit()

6 years agoset gctx to NULL and check it in more places
Alan T. DeKok [Wed, 6 Nov 2019 15:11:48 +0000 (10:11 -0500)] 
set gctx to NULL and check it in more places

6 years agoset gctx to NULL on free
Alan T. DeKok [Wed, 6 Nov 2019 13:44:27 +0000 (08:44 -0500)] 
set gctx to NULL on free

6 years agoRevert "Use _r variant of basename and dirname"
Arran Cudbard-Bell [Wed, 6 Nov 2019 13:11:14 +0000 (07:11 -0600)] 
Revert "Use _r variant of basename and dirname"

This reverts commit 22599fd332eb13f82923f3401a1780370ac12532.

6 years agoUse _r variant of basename and dirname
Arran Cudbard-Bell [Wed, 6 Nov 2019 12:51:35 +0000 (06:51 -0600)] 
Use _r variant of basename and dirname

6 years agodon't use dirname() or basename(). They are NOT safe.
Alan T. DeKok [Wed, 6 Nov 2019 12:44:42 +0000 (07:44 -0500)] 
don't use dirname() or basename().  They are NOT safe.

6 years agoHelpful to print the fullpath of unit test (#3103)
Jorge Pereira [Tue, 5 Nov 2019 23:23:16 +0000 (20:23 -0300)] 
Helpful to print the fullpath of unit test (#3103)

6 years agolog_dir not logdir
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:50:10 +0000 (16:50 -0600)] 
log_dir not logdir

6 years agoMore fixes...
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:49:04 +0000 (16:49 -0600)] 
More fixes...

6 years agoallow decode of zero-length strings
Alan T. DeKok [Tue, 5 Nov 2019 22:34:06 +0000 (17:34 -0500)] 
allow decode of zero-length strings

6 years agoInclude missing header
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:34:49 +0000 (16:34 -0600)] 
Include missing header

6 years agoRemove rad_mkdir, and the _file from the fr_file functions
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:24:58 +0000 (16:24 -0600)] 
Remove rad_mkdir, and the _file from the fr_file functions

6 years agoUse name not argv[0]
Arran Cudbard-Bell [Tue, 5 Nov 2019 22:03:32 +0000 (16:03 -0600)] 
Use name not argv[0]

6 years agouse TESTBIN which has all of the magic necessary for jlibtool
Alan T. DeKok [Tue, 5 Nov 2019 22:03:11 +0000 (17:03 -0500)] 
use TESTBIN which has all of the magic necessary for jlibtool

6 years agoget rid of stupid "error 0"
Alan T. DeKok [Tue, 5 Nov 2019 21:55:29 +0000 (16:55 -0500)] 
get rid of stupid "error 0"

6 years agoWe only get "waking up" messages at DEBUG4
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:55:29 +0000 (14:55 -0600)] 
We only get "waking up" messages at DEBUG4

6 years agoPrint what we failed to open
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:45:30 +0000 (14:45 -0600)] 
Print what we failed to open

6 years agoAnother typo...
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:36:44 +0000 (14:36 -0600)] 
Another typo...

6 years agoTypo
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:28:16 +0000 (14:28 -0600)] 
Typo

6 years agoPrint what we failed to allocate
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:24:31 +0000 (14:24 -0600)] 
Print what we failed to allocate

6 years agoAdd new top level dict_gctx, fix a bunch of const issues, make dictionaries read...
Arran Cudbard-Bell [Tue, 5 Nov 2019 20:17:25 +0000 (14:17 -0600)] 
Add new top level dict_gctx, fix a bunch of const issues, make dictionaries read only at runtime

6 years agos/coerce/unconst/
Arran Cudbard-Bell [Tue, 5 Nov 2019 18:11:48 +0000 (12:11 -0600)] 
s/coerce/unconst/

6 years agoRename 'alias' to 'name' in the dictionary code
Arran Cudbard-Bell [Tue, 5 Nov 2019 17:59:09 +0000 (11:59 -0600)] 
Rename 'alias' to 'name' in the dictionary code

6 years agoadd and use fr_dict_coerce()
Alan T. DeKok [Tue, 5 Nov 2019 16:57:55 +0000 (11:57 -0500)] 
add and use fr_dict_coerce()

to allow adding attributes to dicts at run time

6 years agoRevert "make more dict functions take const"
Alan T. DeKok [Tue, 5 Nov 2019 16:41:41 +0000 (11:41 -0500)] 
Revert "make more dict functions take const"

This reverts commit 8f063890eb37823f362c22843d2a9db87ebe907f.

6 years agoRevert "this now takes const, too"
Alan T. DeKok [Tue, 5 Nov 2019 16:41:31 +0000 (11:41 -0500)] 
Revert "this now takes const, too"

This reverts commit a26cfed31d81d59e50a5b2df886a8e8daef2f19e.

6 years agomake dict autoload functions take `fr_dict_t const*`
Alan T. DeKok [Tue, 5 Nov 2019 14:37:57 +0000 (09:37 -0500)] 
make dict autoload functions take `fr_dict_t const*`

which changes everything, but trivially.

This is in preparation for adding `fr_dict_t const*` to the
`fr_application_t` struct, so that each proto_foo can point to
the dictionaries that it needs.

6 years agoRemove all the rediculously complex logging code from rlm_unbound
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:42:53 +0000 (10:42 -0600)] 
Remove all the rediculously complex logging code from rlm_unbound

6 years agoFix const issue
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:40:03 +0000 (10:40 -0600)] 
Fix const issue

6 years agoExplicitly free more things
Arran Cudbard-Bell [Tue, 5 Nov 2019 16:10:57 +0000 (10:10 -0600)] 
Explicitly free more things

6 years agodon't use mktemp. We already have the "build" directory
Alan T. DeKok [Tue, 5 Nov 2019 14:34:53 +0000 (09:34 -0500)] 
don't use mktemp.  We already have the "build" directory

6 years agothis now takes const, too
Alan T. DeKok [Tue, 5 Nov 2019 14:25:56 +0000 (09:25 -0500)] 
this now takes const, too

6 years agomake more dict functions take const
Alan T. DeKok [Tue, 5 Nov 2019 14:25:19 +0000 (09:25 -0500)] 
make more dict functions take const

the caller isn't supposed to modify them, but the dict code
can.

6 years agoPacket-Type is in the DHCPv4 dict, not in the RADIUS dict
Alan T. DeKok [Tue, 5 Nov 2019 14:07:08 +0000 (09:07 -0500)] 
Packet-Type is in the DHCPv4 dict, not in the RADIUS dict

6 years agoFix const issue
Arran Cudbard-Bell [Tue, 5 Nov 2019 14:27:54 +0000 (08:27 -0600)] 
Fix const issue

6 years agodon't allow "next" to alias "ref"
Alan T. DeKok [Tue, 5 Nov 2019 02:18:38 +0000 (21:18 -0500)] 
don't allow "next" to alias "ref"

so that group-type attributes can happily coexist with other ones

6 years agofree ctx on error
Alan T. DeKok [Tue, 5 Nov 2019 01:51:10 +0000 (20:51 -0500)] 
free ctx on error

6 years agoAdd support for test dictionaries in unit_test_attribute
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:38:29 +0000 (19:38 -0600)] 
Add support for test dictionaries in unit_test_attribute

6 years agoSkip internal attributes. Non-protocol attributes must also be marked as internal
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:37:29 +0000 (19:37 -0600)] 
Skip internal attributes.  Non-protocol attributes must also be marked as internal

6 years agoAllow dictionary root dir to be manipulated at runtime
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:36:25 +0000 (19:36 -0600)] 
Allow dictionary root dir to be manipulated at runtime

This is to allow us to load test dictionaries

6 years agoAdd space to error message
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:35:58 +0000 (19:35 -0600)] 
Add space to error message

6 years agoMove file manipulation functions into their own source file
Arran Cudbard-Bell [Tue, 5 Nov 2019 01:35:46 +0000 (19:35 -0600)] 
Move file manipulation functions into their own source file

6 years agoallow first member of STRUCT to be variable length
Alan T. DeKok [Tue, 5 Nov 2019 00:59:44 +0000 (19:59 -0500)] 
allow first member of STRUCT to be variable length

it's stupid, but it's what we need for keyed structures

6 years agodepend on the binary, too
Alan T. DeKok [Tue, 5 Nov 2019 00:26:57 +0000 (19:26 -0500)] 
depend on the binary, too

6 years agouse the new test framework
Alan T. DeKok [Mon, 4 Nov 2019 23:59:54 +0000 (18:59 -0500)] 
use the new test framework

and print out the goddamned error messages

6 years agomove RADIUS stubtype stuff to libfreeradius-radius
Alan T. DeKok [Mon, 4 Nov 2019 22:14:28 +0000 (17:14 -0500)] 
move RADIUS stubtype stuff to libfreeradius-radius

6 years agomove dlopen() to load by protocol
Alan T. DeKok [Mon, 4 Nov 2019 22:11:31 +0000 (17:11 -0500)] 
move dlopen() to load by protocol

6 years agomove lowercase to caller
Alan T. DeKok [Mon, 4 Nov 2019 22:01:00 +0000 (17:01 -0500)] 
move lowercase to caller

6 years agostart of autoload and validation for dictionaries.
Alan T. DeKok [Mon, 4 Nov 2019 21:07:56 +0000 (16:07 -0500)] 
start of autoload and validation for dictionaries.

if we load protocol FOO, we now look for libfreeradius-FOO
which *should* already be loaded.  i.e. when the application links
to libfreeradius-radius and calls fr_radius_init(), that function
loads the RADIUS dictionaries.  Which now link back to the library.

The dictionary code then looks for a symbol called

libfreeradius_FOO_dict_protocol

and saves a pointer to that structure in the dictionary.  We can
now have protocol-specific validation functions.

6 years agolowercase library names, and mash '-' to '_'
Alan T. DeKok [Mon, 4 Nov 2019 21:06:30 +0000 (16:06 -0500)] 
lowercase library names, and mash '-' to '_'

6 years agouse talloc_const_free
Alan T. DeKok [Mon, 4 Nov 2019 16:10:31 +0000 (11:10 -0500)] 
use talloc_const_free

6 years agoallow "eap-*" for now.
Alan T. DeKok [Mon, 4 Nov 2019 15:27:20 +0000 (10:27 -0500)] 
allow "eap-*" for now.

it's fugly, but means that we have good errors most of the time.

6 years agoAdd tests for DHCPv6 / rfc8415 (#3100)
Jorge Pereira [Mon, 4 Nov 2019 19:49:06 +0000 (16:49 -0300)] 
Add tests for DHCPv6 / rfc8415 (#3100)

* Add tests for DHCPv6 / rfc8415

* Because fd85:d2bb:92c:GARBAGE DATA HERE:74ae:2871:f56c:8d94 shouldn't match

* Fix file location

6 years agoRevert "All protocols have to have a dictionary." - Until Alan pushes another hack
Arran Cudbard-Bell [Mon, 4 Nov 2019 19:30:36 +0000 (13:30 -0600)] 
Revert "All protocols have to have a dictionary." - Until Alan pushes another hack

This reverts commit 5f90fef77a7f91a3853cb279b3809f5676bb9ba4.

# Conflicts:
# share/dictionary/control/dictionary

6 years agoClean up unit tests more
Arran Cudbard-Bell [Mon, 4 Nov 2019 17:14:06 +0000 (11:14 -0600)] 
Clean up unit tests more

6 years agoOnly one more bad use of vp_strvalue to go...
Arran Cudbard-Bell [Mon, 4 Nov 2019 14:23:27 +0000 (08:23 -0600)] 
Only one more bad use of vp_strvalue to go...

6 years agoalways end the dictionary with a CR / LF
Alan T. DeKok [Mon, 4 Nov 2019 13:56:09 +0000 (08:56 -0500)] 
always end the dictionary with a CR / LF

6 years agoTake a pass through and add MEM() where it should be used, and remove it from the...
Arran Cudbard-Bell [Mon, 4 Nov 2019 13:53:32 +0000 (07:53 -0600)] 
Take a pass through and add MEM() where it should be used, and remove it from the protocol encoder/decoders and utilities

It may be useful to set a size limit on the context we pass to the decoders to prevent an attacker exploiting a logic bug.  In this case we want the decoder to handle the memory allocation failure gracefully.

6 years agoAll protocols have to have a dictionary.
Alan T. DeKok [Mon, 4 Nov 2019 13:42:46 +0000 (08:42 -0500)] 
All protocols have to have a dictionary.

So we add an empty dictionary for the "control" space.

We can later add attributes for packets which are sent to workers.

6 years agoCID 1455235
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:41:59 +0000 (13:41 -0600)] 
CID 1455235

6 years agoCID 1455236
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:41:02 +0000 (13:41 -0600)] 
CID 1455236

6 years agoCID 1455238
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:37:36 +0000 (13:37 -0600)] 
CID 1455238

6 years agoCID 1455239
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:36:36 +0000 (13:36 -0600)] 
CID 1455239

6 years agoTypo
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:34:54 +0000 (13:34 -0600)] 
Typo

6 years agoCID 1455245
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:34:10 +0000 (13:34 -0600)] 
CID 1455245

6 years agoCID 1455246
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:28:56 +0000 (13:28 -0600)] 
CID 1455246

6 years agoCID 1455229
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:24:59 +0000 (13:24 -0600)] 
CID 1455229

6 years agoCID 1455232
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:23:27 +0000 (13:23 -0600)] 
CID 1455232

6 years agoCID 1455237
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:21:30 +0000 (13:21 -0600)] 
CID 1455237

6 years agoCID 1455241
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:15:04 +0000 (13:15 -0600)] 
CID 1455241

6 years agoCID 1455243
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:14:20 +0000 (13:14 -0600)] 
CID 1455243

6 years agoCID 1455249
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:12:57 +0000 (13:12 -0600)] 
CID 1455249

6 years agoCID 1455250
Arran Cudbard-Bell [Sun, 3 Nov 2019 19:12:02 +0000 (13:12 -0600)] 
CID 1455250

6 years agouse consistent names
Alan T. DeKok [Sun, 3 Nov 2019 15:17:17 +0000 (10:17 -0500)] 
use consistent names

6 years agominor cleanups
Alan T. DeKok [Sun, 3 Nov 2019 15:01:29 +0000 (10:01 -0500)] 
minor cleanups

6 years agoadd hardware types
Alan T. DeKok [Sun, 3 Nov 2019 15:01:15 +0000 (10:01 -0500)] 
add hardware types

6 years agouse DIR for local directory
Alan T. DeKok [Sun, 3 Nov 2019 14:43:54 +0000 (09:43 -0500)] 
use DIR for local directory

we don't need TEST_FILES_DIR, because the boilermake framework
already sets DIR.

But we also need to re-set DIR as a rule-specific variable when
running the test.  Because eval of makefile and running of rule
are done at two different times

6 years agoRemove duplicate
Arran Cudbard-Bell [Sat, 2 Nov 2019 19:04:38 +0000 (13:04 -0600)] 
Remove duplicate

6 years agoDisable v6 test
Arran Cudbard-Bell [Sat, 2 Nov 2019 19:03:55 +0000 (13:03 -0600)] 
Disable v6 test

6 years agoUse fr_mkdir where possible
Arran Cudbard-Bell [Sat, 2 Nov 2019 19:01:52 +0000 (13:01 -0600)] 
Use fr_mkdir where possible

6 years agoRecursively search for test files to run through unit_test_attribute
Arran Cudbard-Bell [Sat, 2 Nov 2019 16:27:00 +0000 (10:27 -0600)] 
Recursively search for test files to run through unit_test_attribute

6 years agoreturn that we decoded this option, and only this option
Alan T. DeKok [Sat, 2 Nov 2019 01:40:16 +0000 (21:40 -0400)] 
return that we decoded this option, and only this option

6 years agomanually decode IPv6 prefix.
Alan T. DeKok [Sat, 2 Nov 2019 01:30:47 +0000 (21:30 -0400)] 
manually decode IPv6 prefix.

not ipv4 prefix yet tho

6 years agosmash previous value
Alan T. DeKok [Fri, 1 Nov 2019 19:24:11 +0000 (15:24 -0400)] 
smash previous value

6 years agohelps to fix the count when changing tests
Alan T. DeKok [Fri, 1 Nov 2019 18:50:37 +0000 (14:50 -0400)] 
helps to fix the count when changing tests

6 years agoset the correct type size at the dict root, too
Alan T. DeKok [Fri, 1 Nov 2019 18:48:30 +0000 (14:48 -0400)] 
set the correct type size at the dict root, too

6 years agoerror out of we can't find an appropriate parent
Alan T. DeKok [Fri, 1 Nov 2019 14:47:54 +0000 (10:47 -0400)] 
error out of we can't find an appropriate parent

6 years agoSplit out only the DHCPv6 tests which are specific to a given vendor
Arran Cudbard-Bell [Fri, 1 Nov 2019 18:05:29 +0000 (12:05 -0600)] 
Split out only the DHCPv6 tests which are specific to a given vendor

6 years agoNot used yet...
Arran Cudbard-Bell [Fri, 1 Nov 2019 14:29:35 +0000 (08:29 -0600)] 
Not used yet...

6 years agoDon't print messages if the FD is the same as the one already set
Arran Cudbard-Bell [Fri, 1 Nov 2019 14:24:32 +0000 (08:24 -0600)] 
Don't print messages if the FD is the same as the one already set

6 years agoUnused vars
Arran Cudbard-Bell [Fri, 1 Nov 2019 14:20:06 +0000 (08:20 -0600)] 
Unused vars

6 years agoRework the unbound I/O code to... work
Arran Cudbard-Bell [Fri, 1 Nov 2019 13:54:01 +0000 (07:54 -0600)] 
Rework the unbound I/O code to... work

Despite mailing lists posts, calling ub_process is absolutely the wrong thing to do.  The user callback gets notified without it.

6 years agoAdd unbound logging glue code
Arran Cudbard-Bell [Fri, 1 Nov 2019 13:53:00 +0000 (07:53 -0600)] 
Add unbound logging glue code

This _has_ been tested and appears to work fine.

6 years agoFix up some names in rlm_rest async I/O code
Arran Cudbard-Bell [Fri, 1 Nov 2019 13:52:08 +0000 (07:52 -0600)] 
Fix up some names in rlm_rest async I/O code

6 years agoIgnore "install" directory in the base of the repo
Arran Cudbard-Bell [Fri, 1 Nov 2019 13:49:40 +0000 (07:49 -0600)] 
Ignore "install" directory in the base of the repo