]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 years agotests.bin: Add queue atomic test
Jorge Pereira [Tue, 5 Mar 2019 21:48:26 +0000 (18:48 -0300)] 
tests.bin: Add queue atomic test

7 years agotests.bin: Add tests for all binaries
Jorge Pereira [Tue, 5 Mar 2019 21:37:27 +0000 (18:37 -0300)] 
tests.bin: Add tests for all binaries

7 years agoFix the '-h' return to be success
Jorge Pereira [Tue, 5 Mar 2019 21:36:50 +0000 (18:36 -0300)] 
Fix the '-h' return to be success

7 years agoRevert "more CC_HINT(nonnull)"
Alan T. DeKok [Tue, 5 Mar 2019 21:18:02 +0000 (16:18 -0500)] 
Revert "more CC_HINT(nonnull)"

This reverts commit 4fa52e12c96dc43865a7b5f13aca6f13f81c2f19.

<sigh> Stupid compilers don't notice that variables aren't NULL.
This change will have to be done in many small commits

7 years agoMerge pull request #2554 from jpereira/v4/fix-ring_buffer
Alan DeKok [Tue, 5 Mar 2019 21:17:35 +0000 (16:17 -0500)] 
Merge pull request #2554 from jpereira/v4/fix-ring_buffer

ring_buffer_test: Fix fr_cond_assert() call

7 years agoring_buffer_test: Fix fr_cond_assert() call 2554/head
Jorge Pereira [Tue, 5 Mar 2019 21:14:42 +0000 (18:14 -0300)] 
ring_buffer_test: Fix fr_cond_assert() call

7 years agoparent node properly, and add a free callback
Alan T. DeKok [Tue, 5 Mar 2019 21:05:28 +0000 (16:05 -0500)] 
parent node properly, and add a free callback

7 years agoMerge pull request #2553 from jpereira/v4/fix-rbmonkey
Alan DeKok [Tue, 5 Mar 2019 21:03:04 +0000 (16:03 -0500)] 
Merge pull request #2553 from jpereira/v4/fix-rbmonkey

rbmonkey: Fix rbtree_create() call

7 years agorbmonkey: Fix rbtree_create() call 2553/head
Jorge Pereira [Tue, 5 Mar 2019 20:58:44 +0000 (17:58 -0300)] 
rbmonkey: Fix rbtree_create() call

7 years agouse a more consistent error message
Alan T. DeKok [Tue, 5 Mar 2019 20:18:01 +0000 (15:18 -0500)] 
use a more consistent error message

7 years agoradiusd needs a whole lot more things
Alan T. DeKok [Tue, 5 Mar 2019 20:16:48 +0000 (15:16 -0500)] 
radiusd needs a whole lot more things

so it's better to test it later, after the various module
tests, etc.

7 years agoshort names are better
Alan T. DeKok [Tue, 5 Mar 2019 20:16:22 +0000 (15:16 -0500)] 
short names are better

7 years agoMerge pull request #2552 from jpereira/v4/tests.bin
Alan DeKok [Tue, 5 Mar 2019 20:15:25 +0000 (15:15 -0500)] 
Merge pull request #2552 from jpereira/v4/tests.bin

New 'tests.bin' unit test

7 years agoFix missing 'h' for getopt() 2552/head
Jorge Pereira [Tue, 5 Mar 2019 20:06:01 +0000 (17:06 -0300)] 
Fix missing 'h' for getopt()

7 years agoAdd new 'tests.bin' unit test
Jorge Pereira [Tue, 5 Mar 2019 20:07:34 +0000 (17:07 -0300)] 
Add new 'tests.bin' unit test

7 years agoReturn 'EXIT_SUCCESS' during '-h'
Jorge Pereira [Tue, 5 Mar 2019 20:06:47 +0000 (17:06 -0300)] 
Return 'EXIT_SUCCESS' during '-h'

7 years agomore CC_HINT(nonnull)
Alan T. DeKok [Tue, 5 Mar 2019 20:12:14 +0000 (15:12 -0500)] 
more CC_HINT(nonnull)

7 years agoMerge pull request #2551 from jpereira/v4/bin-radict
Alan DeKok [Tue, 5 Mar 2019 19:57:59 +0000 (14:57 -0500)] 
Merge pull request #2551 from jpereira/v4/bin-radict

radict: Return 0 during -h

7 years agoradict: Return 0 during -h 2551/head
Jorge Pereira [Tue, 5 Mar 2019 19:36:51 +0000 (16:36 -0300)] 
radict: Return 0 during -h

7 years agoFix return codes
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:30:32 +0000 (19:30 +0800)] 
Fix return codes

7 years agoFix references to eap.conf
Arran Cudbard-Bell [Tue, 5 Mar 2019 11:01:23 +0000 (19:01 +0800)] 
Fix references to eap.conf

7 years agoDon't do work if the triggers aren't enabled
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:50:22 +0000 (18:50 +0800)] 
Don't do work if the triggers aren't enabled

7 years agoInitialise triggers in unit_test_module
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:56 +0000 (18:49 +0800)] 
Initialise triggers in unit_test_module

7 years agoFixup redis tests
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:49:35 +0000 (18:49 +0800)] 
Fixup redis tests

7 years agoSplit the initial spawning phase out of the pool init phase
Arran Cudbard-Bell [Tue, 5 Mar 2019 10:06:59 +0000 (18:06 +0800)] 
Split the initial spawning phase out of the pool init phase

The pool now has additional configuration functions that might need to be called before it starts spawning connections

7 years agoTypo
Arran Cudbard-Bell [Tue, 5 Mar 2019 06:34:22 +0000 (14:34 +0800)] 
Typo

7 years agoIgnore calls to all trigger functions unless trigger_exec_init has been called
Arran Cudbard-Bell [Tue, 5 Mar 2019 05:54:44 +0000 (13:54 +0800)] 
Ignore calls to all trigger functions unless trigger_exec_init has been called

7 years agostubs for testing binary utilities.
Alan T. DeKok [Tue, 5 Mar 2019 02:17:33 +0000 (21:17 -0500)] 
stubs for testing binary utilities.

7 years agomake it work.
Alan T. DeKok [Tue, 5 Mar 2019 02:15:51 +0000 (21:15 -0500)] 
make it work.

we can't use dict_read() to read the protocol dictionaries.
dict_read() loads the file into an existing dictionary, and we
don't want that.

Also don't recurse on directories, because the dictionaries
aren't (yet) smart enough to autoload protocols in subdirectories

7 years agoload using the new dictionary layout
Alan T. DeKok [Tue, 5 Mar 2019 00:59:09 +0000 (19:59 -0500)] 
load using the new dictionary layout

7 years agoMerge pull request #2548 from jpereira/v4/fix-dict-conflict
Alan DeKok [Tue, 5 Mar 2019 00:33:41 +0000 (19:33 -0500)] 
Merge pull request #2548 from jpereira/v4/fix-dict-conflict

Fix the dictionary conflict

7 years agoFix the dictionary conflict 2548/head
Jorge Pereira [Mon, 4 Mar 2019 23:55:44 +0000 (20:55 -0300)] 
Fix the dictionary conflict

7 years agomanually pull over changes from v3
Alan T. DeKok [Mon, 4 Mar 2019 21:46:37 +0000 (16:46 -0500)] 
manually pull over changes from v3

7 years agoMerge pull request #2545 from jpereira/v4/fix-dict
Alan DeKok [Mon, 4 Mar 2019 21:24:04 +0000 (16:24 -0500)] 
Merge pull request #2545 from jpereira/v4/fix-dict

V4/fix dict

7 years agoFix fr_dict_internal_afrom_file() reference 2545/head
Jorge Pereira [Mon, 4 Mar 2019 21:22:38 +0000 (18:22 -0300)] 
Fix fr_dict_internal_afrom_file() reference

7 years agoFix ldap/sync dict calls
Jorge Pereira [Mon, 4 Mar 2019 21:22:17 +0000 (18:22 -0300)] 
Fix ldap/sync dict calls

7 years agoFix radmin dict calls
Jorge Pereira [Mon, 4 Mar 2019 21:21:52 +0000 (18:21 -0300)] 
Fix radmin dict calls

7 years agoload the dictionaries, which are needed to load the config
Alan T. DeKok [Mon, 4 Mar 2019 21:17:37 +0000 (16:17 -0500)] 
load the dictionaries, which are needed to load the config

Add '-D' command-line option to set the dictionary directory.

Don't load the config when passed '-f'.  That's bad form.  Load it
after all configuration options have been parsed.

Add "read dictionary" code.

Move trigger init until after "read dictionary" code

7 years agoMerge pull request #2544 from jpereira/v4/fix-radswho
Alan DeKok [Mon, 4 Mar 2019 21:20:14 +0000 (16:20 -0500)] 
Merge pull request #2544 from jpereira/v4/fix-radswho

Fix radswho dict calls

7 years agoFix radswho dict calls 2544/head
Jorge Pereira [Mon, 4 Mar 2019 21:14:04 +0000 (18:14 -0300)] 
Fix radswho dict calls

7 years agoFix some cosmetic issues in rlm_redis_ippool_tool
Arran Cudbard-Bell [Mon, 4 Mar 2019 17:42:01 +0000 (01:42 +0800)] 
Fix some cosmetic issues in rlm_redis_ippool_tool

7 years agoPrint correct name, and use correct check
Alan T. DeKok [Mon, 4 Mar 2019 14:29:19 +0000 (09:29 -0500)] 
Print correct name, and use correct check

7 years agoMore tests for literals
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:47:22 +0000 (15:47 +0800)] 
More tests for literals

Fix abort on '\' fmt string.

7 years agoMore xlat tests
Arran Cudbard-Bell [Mon, 4 Mar 2019 07:36:52 +0000 (15:36 +0800)] 
More xlat tests

7 years agomove procedure to new file
Alan T. DeKok [Thu, 28 Feb 2019 16:16:37 +0000 (11:16 -0500)] 
move procedure to new file

It's better to have a different file than to ask the admin
to un-comment lots of code.

7 years agoAdd a stored procedure for PostgreSQL rlm_sqlippool.
Nathan Ward [Thu, 28 Feb 2019 02:47:27 +0000 (15:47 +1300)] 
Add a stored procedure for PostgreSQL rlm_sqlippool.

This matches the functionality of the existing example query which returns the users previous IP, if possible, however it runs approx 400x faster.

7 years agowe don't need this any more
Alan T. DeKok [Sat, 2 Mar 2019 18:28:15 +0000 (13:28 -0500)] 
we don't need this any more

7 years agouse parent vendor, not magic vendor
Alan T. DeKok [Sat, 2 Mar 2019 18:27:49 +0000 (13:27 -0500)] 
use parent vendor, not magic vendor

7 years ago"array" types are allowed in multiple places.
Alan T. DeKok [Sat, 2 Mar 2019 18:23:58 +0000 (13:23 -0500)] 
"array" types are allowed in multiple places.

@todo - update the dictionaries with where they are allowed.

7 years agotypos
Alan T. DeKok [Sat, 2 Mar 2019 18:15:03 +0000 (13:15 -0500)] 
typos

7 years agoExit earlier in xlat_tokenize_alternation if the alternate is empty
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:15:35 +0000 (17:15 +0800)] 
Exit earlier in xlat_tokenize_alternation if the alternate is empty

7 years agoRemove const hack in xlat_tokenize_alternation
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:12:08 +0000 (17:12 +0800)] 
Remove const hack in xlat_tokenize_alternation

7 years agoMore precise error messages
Arran Cudbard-Bell [Sun, 3 Mar 2019 09:06:21 +0000 (17:06 +0800)] 
More precise error messages

7 years agoHandle escape sequences in xlat test input/output data
Arran Cudbard-Bell [Sat, 2 Mar 2019 15:29:43 +0000 (23:29 +0800)] 
Handle escape sequences in xlat test input/output data

...and add a few more tests.

Previously \t was treated as two characters (\ + t) which is not what we wanted.

7 years agoremove debug entry
Alan T. DeKok [Fri, 1 Mar 2019 19:29:19 +0000 (14:29 -0500)] 
remove debug entry

7 years agoNot a ptr
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:34:50 +0000 (00:34 +0800)] 
Not a ptr

7 years agoUse isdigit instead of isnumber
Arran Cudbard-Bell [Fri, 1 Mar 2019 16:20:07 +0000 (00:20 +0800)] 
Use isdigit instead of isnumber

7 years agoBetter empty expression check
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:22:14 +0000 (20:22 +0800)] 
Better empty expression check

7 years agoShould replace the existing error
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:16:36 +0000 (20:16 +0800)] 
Should replace the existing error

7 years agoFix another comment
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:12:20 +0000 (20:12 +0800)] 
Fix another comment

7 years agoStray comment
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:10:14 +0000 (20:10 +0800)] 
Stray comment

7 years agoSplit out regex, func, attribute parsers from xlat_tokenize_expansion
Arran Cudbard-Bell [Fri, 1 Mar 2019 12:06:28 +0000 (20:06 +0800)] 
Split out regex, func, attribute parsers from xlat_tokenize_expansion

The logic is almost identical but deals with a few corner cases better

7 years agoGet exact parse errors passed back from tmpl_afrom_attr_str
Arran Cudbard-Bell [Fri, 1 Mar 2019 09:13:41 +0000 (17:13 +0800)] 
Get exact parse errors passed back from tmpl_afrom_attr_str

7 years agoAllow syserror to be explicitly freed
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:47 +0000 (13:50 +0800)] 
Allow syserror to be explicitly freed

7 years agoMake the tests work without an internet connection/DNS cache
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:50:27 +0000 (13:50 +0800)] 
Make the tests work without an internet connection/DNS cache

7 years agoUsing the standard fr_strerror functions produces identical errors to passing around...
Arran Cudbard-Bell [Fri, 1 Mar 2019 05:14:51 +0000 (13:14 +0800)] 
Using the standard fr_strerror functions produces identical errors to passing around a static char **error pointer

Error can now be stacked too, which generally gives the user much better context.

7 years agoIn the vast majority of cases we no longer need to modify the input string
Arran Cudbard-Bell [Fri, 1 Mar 2019 02:41:49 +0000 (10:41 +0800)] 
In the vast majority of cases we no longer need to modify the input string

7 years agoas posted to the list
Alan T. DeKok [Thu, 28 Feb 2019 12:39:33 +0000 (07:39 -0500)] 
as posted to the list

7 years agoFix DHCPv6 bool test
Arran Cudbard-Bell [Thu, 28 Feb 2019 10:22:02 +0000 (18:22 +0800)] 
Fix DHCPv6 bool test

Like EAP-SIM, DHCPv6 represents bools by presence (if true), or absence (if false), of the option.

7 years agoChange length to operate on incoming boxes instead of using an attribute ref
Arran Cudbard-Bell [Thu, 28 Feb 2019 10:15:38 +0000 (18:15 +0800)] 
Change length to operate on incoming boxes instead of using an attribute ref

The general rule is that refs are only used where information from the VALUE_PAIR is required

7 years agocomment out illegal dictionaries
Alan T. DeKok [Wed, 27 Feb 2019 22:14:51 +0000 (17:14 -0500)] 
comment out illegal dictionaries

these vendors haven't shipped product for a decade.  People
wanting terrible attributes can deal with it themselves

7 years agobutchery to make the tests pass.
Alan T. DeKok [Wed, 27 Feb 2019 21:21:28 +0000 (16:21 -0500)] 
butchery to make the tests pass.

Fix the unit-test dictionary so that it doesn't barf.

Fix all.mk so that it doesn't depend on a file that doesn't exist

Move most of the "Unit-*" tests to radius_unit.txt

remove dict.txt and command.txt from running during the tests.

For dict.txt, the framework doesn't provide for dictionary
definitions within a BEGIN-PROTOCOL framework.

For command.txt, the command parser no longer allows ":" in command
names, and there's no point in tracking it down right now.

7 years agoload the radius dictionary, too
Alan T. DeKok [Wed, 27 Feb 2019 21:02:12 +0000 (16:02 -0500)] 
load the radius dictionary, too

7 years agodon't depend on a file which doesn't exist
Alan T. DeKok [Wed, 27 Feb 2019 20:47:40 +0000 (15:47 -0500)] 
don't depend on a file which doesn't exist

t means that the unit tests haven't been running for months.

7 years agosome fixes to make it slightly better
Alan T. DeKok [Wed, 27 Feb 2019 20:19:01 +0000 (15:19 -0500)] 
some fixes to make it slightly better

7 years agoactually showing encoded data would be useful
Alan T. DeKok [Wed, 27 Feb 2019 19:50:55 +0000 (14:50 -0500)] 
actually showing encoded data would be useful

7 years agoMerge pull request #2535 from jpereira/v4/fix5
Alan DeKok [Wed, 27 Feb 2019 16:08:53 +0000 (11:08 -0500)] 
Merge pull request #2535 from jpereira/v4/fix5

rlm_isc_dhcp: Fix initialization

7 years agorlm_isc_dhcp: Fix initialization 2535/head
Jorge Pereira [Wed, 27 Feb 2019 16:07:27 +0000 (13:07 -0300)] 
rlm_isc_dhcp: Fix initialization

7 years agotypo
Alan T. DeKok [Wed, 27 Feb 2019 16:01:23 +0000 (11:01 -0500)] 
typo

7 years agoparse `server-identifier IPADDR`
Alan T. DeKok [Wed, 27 Feb 2019 15:58:10 +0000 (10:58 -0500)] 
parse `server-identifier IPADDR`

and do some minor cleanups

7 years agoone more fr_skip_spaces
Alan T. DeKok [Wed, 27 Feb 2019 13:43:18 +0000 (08:43 -0500)] 
one more fr_skip_spaces

7 years agoDoxygen
Arran Cudbard-Bell [Wed, 27 Feb 2019 12:23:07 +0000 (20:23 +0800)] 
Doxygen

7 years agoDrop h and H from randstr, people should use %{hex:%{randstr:b}} instead
Arran Cudbard-Bell [Wed, 27 Feb 2019 11:53:24 +0000 (19:53 +0800)] 
Drop h and H from randstr, people should use %{hex:%{randstr:b}} instead

- They were only there because the xlat evaluation code wasn't binary safe.  Now it is, there's no reason to keep them.
- Make generating large amounts of random binary data more efficient
- Increase repetition limit to 1024 and warn if we override what the user specified

7 years agoUnconst errstr
Arran Cudbard-Bell [Wed, 27 Feb 2019 11:44:08 +0000 (19:44 +0800)] 
Unconst errstr

7 years agoDon't leak errstr
Arran Cudbard-Bell [Wed, 27 Feb 2019 07:17:07 +0000 (15:17 +0800)] 
Don't leak errstr

7 years agoAllow fmt arguments in RDMARKER and REMARKER
Arran Cudbard-Bell [Wed, 27 Feb 2019 07:14:40 +0000 (15:14 +0800)] 
Allow fmt arguments in RDMARKER and REMARKER

7 years agoFix function documentation
Arran Cudbard-Bell [Wed, 27 Feb 2019 06:45:49 +0000 (14:45 +0800)] 
Fix function documentation

7 years agoDon't print anything if we're outside a module
Arran Cudbard-Bell [Wed, 27 Feb 2019 06:43:33 +0000 (14:43 +0800)] 
Don't print anything if we're outside a module

7 years agoMove skip spaces macro
Arran Cudbard-Bell [Wed, 27 Feb 2019 06:40:18 +0000 (14:40 +0800)] 
Move skip spaces macro

7 years agoUse fr_skip_spaces macro
Arran Cudbard-Bell [Wed, 27 Feb 2019 06:38:08 +0000 (14:38 +0800)] 
Use fr_skip_spaces macro

7 years agoAdd fr_value_box_list_len_min
Arran Cudbard-Bell [Wed, 27 Feb 2019 06:37:43 +0000 (14:37 +0800)] 
Add fr_value_box_list_len_min

7 years agoPrint concat error
Arran Cudbard-Bell [Wed, 27 Feb 2019 05:28:40 +0000 (13:28 +0800)] 
Print concat error

7 years agoMerge pull request #2530 from jpereira/v4/util1
Arran Cudbard-Bell [Wed, 27 Feb 2019 05:28:18 +0000 (13:28 +0800)] 
Merge pull request #2530 from jpereira/v4/util1

Add fr_skip_spaces() helper to strip whitespace

7 years agoMerge pull request #2531 from jpereira/v4/value-length
Arran Cudbard-Bell [Wed, 27 Feb 2019 05:27:55 +0000 (13:27 +0800)] 
Merge pull request #2531 from jpereira/v4/value-length

Add fr_value_box_list_length() function

7 years agoVarious xlat cleanups
Arran Cudbard-Bell [Wed, 27 Feb 2019 03:18:41 +0000 (11:18 +0800)] 
Various xlat cleanups

7 years agoAdd fr_value_box_list_length() function 2531/head
Jorge Pereira [Wed, 27 Feb 2019 03:04:24 +0000 (00:04 -0300)] 
Add fr_value_box_list_length() function

7 years agoAdd fr_skip_spaces() helper to strip whitespace 2530/head
Jorge Pereira [Wed, 27 Feb 2019 01:43:15 +0000 (22:43 -0300)] 
Add fr_skip_spaces() helper to strip whitespace

7 years agoMerge pull request #2529 from jpereira/v4/xlat-async-tag
Arran Cudbard-Bell [Wed, 27 Feb 2019 01:08:28 +0000 (09:08 +0800)] 
Merge pull request #2529 from jpereira/v4/xlat-async-tag

xlat: move '%{tag: ...}' to async

7 years agoMerge branch 'master' into v4/xlat-async-tag 2529/head
Arran Cudbard-Bell [Wed, 27 Feb 2019 01:08:21 +0000 (09:08 +0800)] 
Merge branch 'master' into v4/xlat-async-tag

7 years agoMerge pull request #2528 from jpereira/v4/xlat-async-length
Arran Cudbard-Bell [Wed, 27 Feb 2019 01:07:21 +0000 (09:07 +0800)] 
Merge pull request #2528 from jpereira/v4/xlat-async-length

xlat: move '%{length: ...} to async