]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agodns: Use box initialiser instead of doing it manually
Arran Cudbard-Bell [Sun, 24 May 2020 14:45:32 +0000 (09:45 -0500)] 
dns: Use box initialiser instead of doing it manually

6 years agoconcatenate multiple results from child. Fixes #3466
Alan T. DeKok [Sun, 24 May 2020 13:23:31 +0000 (09:23 -0400)] 
concatenate multiple results from child.  Fixes #3466

6 years agoadd test for things after the expansion
Alan T. DeKok [Sun, 24 May 2020 12:53:16 +0000 (08:53 -0400)] 
add test for things after the expansion

6 years agoinitialize heap_id
Alan T. DeKok [Sun, 24 May 2020 12:12:57 +0000 (08:12 -0400)] 
initialize heap_id

6 years agoallow adding to an empty heap when heap_id==0
Alan T. DeKok [Sun, 24 May 2020 12:11:20 +0000 (08:11 -0400)] 
allow adding to an empty heap when heap_id==0

6 years agoinitialize heap_id, and don't assert on cleanup
Alan T. DeKok [Sat, 23 May 2020 22:25:30 +0000 (18:25 -0400)] 
initialize heap_id, and don't assert on cleanup

if we can't insert the ev into the heap, then _event_timer_free()
shouldn't assert that it is in the heap.  We fix this by just
setting the talloc destructor to NULL.

6 years agouse struct initializers instead of manually setting fields
Alan T. DeKok [Sat, 23 May 2020 22:02:35 +0000 (18:02 -0400)] 
use struct initializers instead of manually setting fields

as this should ensure the other fields are NULL

6 years agotypo
Alan T. DeKok [Sat, 23 May 2020 20:18:55 +0000 (16:18 -0400)] 
typo

6 years agofix build rules
Alan T. DeKok [Sat, 23 May 2020 18:57:29 +0000 (14:57 -0400)] 
fix build rules

OUTPUT is only defined by $(eval $(call TEST_BOOTSTRAP)), so it
can't be used before that function is called.  And it can't be
used if that function isn't called.

Hoist TEST definition to a place where it's available, even if
we're not running the tests.

6 years agotmpl: Fix direct box value assignments (for most cases)
Arran Cudbard-Bell [Sat, 23 May 2020 19:00:35 +0000 (14:00 -0500)] 
tmpl: Fix direct box value assignments (for most cases)

6 years agoconf: Initialise temporary boxes correctly/completely
Arran Cudbard-Bell [Sat, 23 May 2020 18:59:19 +0000 (13:59 -0500)] 
conf: Initialise temporary boxes correctly/completely

6 years agovalue: Ensure talloc buffer types are always explicitly set
Arran Cudbard-Bell [Sat, 23 May 2020 18:54:09 +0000 (13:54 -0500)] 
value: Ensure talloc buffer types are always explicitly set

6 years agoredis: Use boxing macros, and add support for 64bit signed types
Arran Cudbard-Bell [Sat, 23 May 2020 17:16:21 +0000 (12:16 -0500)] 
redis: Use boxing macros, and add support for 64bit signed types

6 years agoldap: Don't modify boxes directly, use assignment functions
Arran Cudbard-Bell [Sat, 23 May 2020 17:12:31 +0000 (12:12 -0500)] 
ldap: Don't modify boxes directly, use assignment functions

6 years agocache-redis: Use value box assignment functions
Arran Cudbard-Bell [Sat, 23 May 2020 17:11:57 +0000 (12:11 -0500)] 
cache-redis: Use value box assignment functions

6 years agocache: Remove unused type assignment
Arran Cudbard-Bell [Sat, 23 May 2020 17:11:32 +0000 (12:11 -0500)] 
cache: Remove unused type assignment

6 years agorlm_redis_ippool: Don't touch boxes directly, use assignment functions
Arran Cudbard-Bell [Sat, 23 May 2020 17:11:20 +0000 (12:11 -0500)] 
rlm_redis_ippool: Don't touch boxes directly, use assignment functions

6 years agorest: Don't touch intermediary boxes or martialed boxes directly, use the assignment...
Arran Cudbard-Bell [Sat, 23 May 2020 17:09:18 +0000 (12:09 -0500)] 
rest: Don't touch intermediary boxes or martialed boxes directly, use the assignment functions

6 years agovalue: Allow bools to be boxed
Arran Cudbard-Bell [Sat, 23 May 2020 17:04:28 +0000 (12:04 -0500)] 
value: Allow bools to be boxed

6 years agojson: Use VB boxing macros instead of doing assignment manually
Arran Cudbard-Bell [Sat, 23 May 2020 17:03:15 +0000 (12:03 -0500)] 
json: Use VB boxing macros instead of doing assignment manually

6 years agoFix _CONST macro position in dict.h
Arran Cudbard-Bell [Sat, 23 May 2020 17:02:38 +0000 (12:02 -0500)] 
Fix _CONST macro position in dict.h

6 years agomore *cpy to *dup
Arran Cudbard-Bell [Sat, 23 May 2020 16:59:50 +0000 (11:59 -0500)] 
more *cpy to *dup

6 years agoglobal: Correct function names, should be *dup not *cpy as we allocate memory
Arran Cudbard-Bell [Sat, 23 May 2020 16:53:37 +0000 (11:53 -0500)] 
global: Correct function names, should be *dup not *cpy as we allocate memory

6 years agopair: Remove more code by using the value box assignment functions instead of re...
Arran Cudbard-Bell [Sat, 23 May 2020 16:47:03 +0000 (11:47 -0500)] 
pair: Remove more code by using the value box assignment functions instead of re-implementing them

6 years agopair: Make fr_pair_value_snprintf use our interanl fr_vasprintf function via the...
Arran Cudbard-Bell [Sat, 23 May 2020 16:34:37 +0000 (11:34 -0500)] 
pair: Make fr_pair_value_snprintf use our interanl fr_vasprintf function via the value box API

6 years agoprint: Fix the talloc buffer type emittted by fr_vasprintf
Arran Cudbard-Bell [Sat, 23 May 2020 16:33:58 +0000 (11:33 -0500)] 
print: Fix the talloc buffer type emittted by fr_vasprintf

6 years agoFix const issues and initialisation issues in pair_legacy.c
Arran Cudbard-Bell [Sat, 23 May 2020 16:07:47 +0000 (11:07 -0500)] 
Fix const issues and initialisation issues in pair_legacy.c

6 years agoTemporarily revert changes to remove strsteal functions
Arran Cudbard-Bell [Sat, 23 May 2020 15:49:48 +0000 (10:49 -0500)] 
Temporarily revert changes to remove strsteal functions

6 years agoremove fr_value_box_bstrsteal() and fr_value_box_bstrnsteal()
Alan T. DeKok [Sat, 23 May 2020 14:02:29 +0000 (10:02 -0400)] 
remove fr_value_box_bstrsteal() and fr_value_box_bstrnsteal()

they are no longer used, needed, or wanted.

6 years agoswitch to fr_value_box_bstrassign()
Alan T. DeKok [Sat, 23 May 2020 14:00:21 +0000 (10:00 -0400)] 
switch to fr_value_box_bstrassign()

6 years agoswitch to fr_value_box_bstrassign()
Alan T. DeKok [Sat, 23 May 2020 13:31:57 +0000 (09:31 -0400)] 
switch to fr_value_box_bstrassign()

6 years agoswitch to fr_value_box_bstrassign()
Alan T. DeKok [Sat, 23 May 2020 13:30:54 +0000 (09:30 -0400)] 
switch to fr_value_box_bstrassign()

6 years agoallow for text immediately after expansion. Fixes #3466
Alan T. DeKok [Sat, 23 May 2020 12:41:49 +0000 (08:41 -0400)] 
allow for text immediately after expansion.  Fixes #3466

Sometimes less code is better

6 years agouse fr_value_box_bstrassign()
Alan T. DeKok [Sat, 23 May 2020 12:30:12 +0000 (08:30 -0400)] 
use fr_value_box_bstrassign()

which can be done with only minimal code rearrangements

6 years agoadd fr_value_box_bstrassign()
Alan T. DeKok [Sat, 23 May 2020 12:28:35 +0000 (08:28 -0400)] 
add fr_value_box_bstrassign()

which avoids talloc_steal().  That function is O(n) in the
number of chunks in the parent's talloc ctx.

6 years agomove GNU make magic && shell scripts to more GNU make magic
Alan T. DeKok [Sat, 23 May 2020 02:04:14 +0000 (22:04 -0400)] 
move GNU make magic && shell scripts to more GNU make magic

the rules to create $(OUTPUT)/%.attrs didn't work.  This failure
is shown by the fact that the make file has 3 different ways
to produce the same files:

* a set of BOOTSTRAP variables
* $(OUTPUT)/%.attrs: %(DIR)/%.attrs rule
* shell script if / cp rules

So we delete all 3 methods, and replace them with a simple 'cp',
along with a $(if) and $(wildcard), to select files A or B.

We would _like_ to do:

$(OUTPUT)/%: $(DIR)/% $(OUTPUT)/%.attrs

except GNU make it too stupid to allow that.

6 years agoremove one more bstrsteal by reordering code
Alan T. DeKok [Fri, 22 May 2020 16:06:46 +0000 (12:06 -0400)] 
remove one more bstrsteal by reordering code

6 years agoremove one more use of talloc_steal()
Alan T. DeKok [Fri, 22 May 2020 15:55:26 +0000 (11:55 -0400)] 
remove one more use of talloc_steal()

along with getting rid of snprintf.

Which ends up being simpler and less code

6 years agoReduce scope of ret closes #3465
Arran Cudbard-Bell [Fri, 22 May 2020 21:22:22 +0000 (16:22 -0500)] 
Reduce scope of ret closes #3465

6 years agoMay as well skip the strlen
Arran Cudbard-Bell [Fri, 22 May 2020 16:57:05 +0000 (11:57 -0500)] 
May as well skip the strlen

6 years agoxlat: Use assignment functions when setting vb values, closes #3464
Arran Cudbard-Bell [Fri, 22 May 2020 16:55:04 +0000 (11:55 -0500)] 
xlat: Use assignment functions when setting vb values, closes #3464

6 years agoevent: More detailed asserts
Arran Cudbard-Bell [Fri, 22 May 2020 16:05:33 +0000 (11:05 -0500)] 
event: More detailed asserts

6 years agoevent: remove redundant assert in _event_timer_free
Arran Cudbard-Bell [Fri, 22 May 2020 15:57:07 +0000 (10:57 -0500)] 
event: remove redundant assert in _event_timer_free

The heap will catch this condition and return an error, along with a bunch of other invalid heap_id issues

6 years agoheap: Remove duplicate/redundant asserts, and quiet clang scan
Arran Cudbard-Bell [Fri, 22 May 2020 15:54:32 +0000 (10:54 -0500)] 
heap: Remove duplicate/redundant asserts, and quiet clang scan

6 years agoif we remove something from the heap, it must be in the heap.
Alan T. DeKok [Fri, 22 May 2020 14:24:05 +0000 (10:24 -0400)] 
if we remove something from the heap, it must be in the heap.

6 years agofix typo
Alan T. DeKok [Fri, 22 May 2020 14:19:46 +0000 (10:19 -0400)] 
fix typo

6 years agoif it's not in the heap, don't extract it
Alan T. DeKok [Fri, 22 May 2020 13:34:33 +0000 (09:34 -0400)] 
if it's not in the heap, don't extract it

6 years agodon't extract things which aren't in the heap
Alan T. DeKok [Fri, 22 May 2020 13:33:47 +0000 (09:33 -0400)] 
don't extract things which aren't in the heap

6 years agothe timer is frame-local
Alan T. DeKok [Thu, 21 May 2020 20:41:28 +0000 (16:41 -0400)] 
the timer is frame-local

when the frame goes away, so should the timer.

6 years agotests are good
Alan T. DeKok [Thu, 21 May 2020 19:00:16 +0000 (15:00 -0400)] 
tests are good

6 years agomake functions take explicit TALLOC_CTX
Alan T. DeKok [Thu, 21 May 2020 18:55:40 +0000 (14:55 -0400)] 
make functions take explicit TALLOC_CTX

which avoids talloc_parent()

6 years agoxlat: Make %{pack:} work on boxes not attribute references
Arran Cudbard-Bell [Thu, 21 May 2020 14:47:38 +0000 (09:47 -0500)] 
xlat: Make %{pack:} work on boxes not attribute references

6 years agolog: There are many types of error
Arran Cudbard-Bell [Thu, 21 May 2020 14:19:21 +0000 (09:19 -0500)] 
log: There are many types of error

6 years agoheap: Shutup pedantic compiler
Arran Cudbard-Bell [Thu, 21 May 2020 14:02:58 +0000 (09:02 -0500)] 
heap: Shutup pedantic compiler

6 years agoallow attributes of type "struct" with flag "internal"
Alan T. DeKok [Thu, 21 May 2020 12:23:30 +0000 (08:23 -0400)] 
allow attributes of type "struct" with flag "internal"

These attributes don't do anything right now, so they can't
be problematic.

The hope is to allow structs for pack / unpack xlats

6 years agodocument %{pack:...}
Alan T. DeKok [Thu, 21 May 2020 12:14:24 +0000 (08:14 -0400)] 
document %{pack:...}

6 years agoheap: Cleanup get/set code
Arran Cudbard-Bell [Thu, 21 May 2020 00:45:33 +0000 (19:45 -0500)] 
heap: Cleanup get/set code

6 years agoglobal: Fixup incorrect uses of fr_strerror
Arran Cudbard-Bell [Wed, 20 May 2020 22:17:15 +0000 (17:17 -0500)] 
global: Fixup incorrect uses of fr_strerror

6 years agotalloc: Extend link_ctx functionality so that we can run custom destructors
Arran Cudbard-Bell [Wed, 20 May 2020 20:56:27 +0000 (15:56 -0500)] 
talloc: Extend link_ctx functionality so that we can run custom destructors

6 years agore-add test.radclient
Alan T. DeKok [Wed, 20 May 2020 23:04:15 +0000 (19:04 -0400)] 
re-add test.radclient

6 years agoensure that the heap_id is always -1 before insert
Alan T. DeKok [Wed, 20 May 2020 23:03:33 +0000 (19:03 -0400)] 
ensure that the heap_id is always -1 before insert

6 years agomore "shut up clang analyzer"
Alan T. DeKok [Wed, 20 May 2020 20:45:03 +0000 (16:45 -0400)] 
more "shut up clang analyzer"

6 years agoremove debugging messages
Alan T. DeKok [Wed, 20 May 2020 20:39:08 +0000 (16:39 -0400)] 
remove debugging messages

6 years agoradclient tests fail for unknown reasons.
Alan T. DeKok [Wed, 20 May 2020 20:37:23 +0000 (16:37 -0400)] 
radclient tests fail for unknown reasons.

disabling so that we can get travis back to a working state.

if a number of things fail in travis, they should be disabled until
such time as they're fixed.  Otherwise new code may introduce new
travis failures, which won't be seen until the other issues are
fixed.

6 years agoremove debugging line
Alan T. DeKok [Wed, 20 May 2020 20:34:32 +0000 (16:34 -0400)] 
remove debugging line

6 years agoadd %{pack:&Attr-foo &Attr-bar} as a parallel to %{unpack:...}
Alan T. DeKok [Wed, 20 May 2020 20:33:09 +0000 (16:33 -0400)] 
add %{pack:&Attr-foo &Attr-bar} as a parallel to %{unpack:...}

6 years agotypo
Alan T. DeKok [Wed, 20 May 2020 20:09:26 +0000 (16:09 -0400)] 
typo

6 years agosuppress things which are known to not work under travis
Alan T. DeKok [Wed, 20 May 2020 19:34:09 +0000 (15:34 -0400)] 
suppress things which are known to not work under travis

6 years agorequest cap_net_raw on Linux
Alan T. DeKok [Wed, 20 May 2020 18:51:24 +0000 (14:51 -0400)] 
request cap_net_raw on Linux

6 years agoprint out strerror from thread instantiate
Alan T. DeKok [Wed, 20 May 2020 18:13:27 +0000 (14:13 -0400)] 
print out strerror from thread instantiate

so that we don't need to do it in each module

6 years agoasserts to keep clang scan happy
Alan T. DeKok [Wed, 20 May 2020 17:04:10 +0000 (13:04 -0400)] 
asserts to keep clang scan happy

6 years agorlm_rest should depend on libfreeradius-curl
Arran Cudbard-Bell [Wed, 20 May 2020 16:40:35 +0000 (11:40 -0500)] 
rlm_rest should depend on libfreeradius-curl

6 years agotests for ICMP
Alan T. DeKok [Wed, 20 May 2020 16:19:16 +0000 (12:19 -0400)] 
tests for ICMP

6 years agoallow unit_test_module to use the parent event list
Alan T. DeKok [Wed, 20 May 2020 16:25:06 +0000 (12:25 -0400)] 
allow unit_test_module to use the parent event list

so that it can run modules which yield

6 years agotry to run tests in alphabetical order, instead of random order
Alan T. DeKok [Wed, 20 May 2020 16:20:01 +0000 (12:20 -0400)] 
try to run tests in alphabetical order, instead of random order

6 years agos/create/alloc/
Arran Cudbard-Bell [Wed, 20 May 2020 16:04:34 +0000 (11:04 -0500)] 
s/create/alloc/

6 years agoalso check that node 0 isn't already in the heap
Alan T. DeKok [Wed, 20 May 2020 15:29:49 +0000 (11:29 -0400)] 
also check that node 0 isn't already in the heap

6 years agoremove redundant code
Alan T. DeKok [Wed, 20 May 2020 15:28:08 +0000 (11:28 -0400)] 
remove redundant code

6 years agomore sanity checking
Alan T. DeKok [Wed, 20 May 2020 15:21:21 +0000 (11:21 -0400)] 
more sanity checking

on extract, we set heap_id = -1

on insert, we check that heap_id == -1 or 0

0 is still technically wrong, but we allow it as a special case
for nodes allocated via talloc_zero().  And changing the heap code
to start at offset 1 instead of 0, will require many changes.

The current code is a good compromise

6 years agoUnused
Arran Cudbard-Bell [Wed, 20 May 2020 14:46:48 +0000 (09:46 -0500)] 
Unused

6 years agothere's no reason to have `test` depend on the binaries
Alan T. DeKok [Tue, 19 May 2020 23:21:44 +0000 (19:21 -0400)] 
there's no reason to have `test` depend on the binaries

each individual test should have its own dependency on the
binaries that it needs.

6 years agodict: More detail in lineage assert
Arran Cudbard-Bell [Tue, 19 May 2020 23:51:42 +0000 (18:51 -0500)] 
dict: More detail in lineage assert

6 years agoUndo some assertion changes in proto_radius_udp.c
Arran Cudbard-Bell [Tue, 19 May 2020 23:24:28 +0000 (18:24 -0500)] 
Undo some assertion changes in proto_radius_udp.c

6 years agostop radsniff tests running until they work...
Arran Cudbard-Bell [Tue, 19 May 2020 23:18:59 +0000 (18:18 -0500)] 
stop radsniff tests running until they work...

6 years agoshutup clang scan
Arran Cudbard-Bell [Tue, 19 May 2020 23:12:56 +0000 (18:12 -0500)] 
shutup clang scan

6 years agoallow apt https installs in jenkins travis dockerfile
Matthew Newton [Tue, 19 May 2020 23:06:47 +0000 (00:06 +0100)] 
allow apt https installs in jenkins travis dockerfile

6 years agomake the jenkins travis dockerfile readable
Matthew Newton [Tue, 19 May 2020 23:06:06 +0000 (00:06 +0100)] 
make the jenkins travis dockerfile readable

6 years agoremove more unused variables
Alan T. DeKok [Tue, 19 May 2020 23:00:26 +0000 (19:00 -0400)] 
remove more unused variables

6 years agocleanups and fixes
Alan T. DeKok [Tue, 19 May 2020 22:54:56 +0000 (18:54 -0400)] 
cleanups and fixes

- just use "counter" to loop packets
- don't create per-request data / ident.  These should be
  per-thread.  Checking them per thread allows us to avoid
  rbtree lookups when the packets aren't for us
- clean up other debugging

tested for IPv4 and IPv6

6 years agotmpl: Fix tmpl_attr_resolve_unparsed so it doesn't trash num or tag
Arran Cudbard-Bell [Tue, 19 May 2020 22:47:45 +0000 (17:47 -0500)] 
tmpl: Fix tmpl_attr_resolve_unparsed so it doesn't trash num or tag

...and works for nested attributes correctly.

6 years agoremove unused variable
Jorge Pereira [Tue, 19 May 2020 22:31:26 +0000 (19:31 -0300)] 
remove unused variable

6 years agoevent: Fix assert msg
Arran Cudbard-Bell [Tue, 19 May 2020 22:20:41 +0000 (17:20 -0500)] 
event: Fix assert msg

6 years agorlm_icmp: Fix icmp6 support
Jorge Pereira [Tue, 19 May 2020 01:18:16 +0000 (22:18 -0300)] 
rlm_icmp: Fix icmp6 support

The documentation says that sockets() created with IPPROTO_ICMPV6 will receive packets
without the IPv6 header nor IPv6 extension headers.

In this case, we don't have a way to extract the source address. That is the reason for
we are using the ICMP requests 'ident' field instead of the IP address.

6 years agorlm_icmp: Print the icmp-reply payload
Jorge Pereira [Mon, 18 May 2020 21:46:53 +0000 (18:46 -0300)] 
rlm_icmp: Print the icmp-reply payload

6 years agorlm_icmp: Just keep 'ping6'
Jorge Pereira [Mon, 18 May 2020 20:14:50 +0000 (17:14 -0300)] 
rlm_icmp: Just keep 'ping6'

6 years agocond: Print operands correctly
Arran Cudbard-Bell [Tue, 19 May 2020 21:53:39 +0000 (16:53 -0500)] 
cond: Print operands correctly

6 years agoremove unused variable
Alan T. DeKok [Tue, 19 May 2020 21:02:39 +0000 (17:02 -0400)] 
remove unused variable

6 years agosranddev() is FreeBSD only
Arran Cudbard-Bell [Tue, 19 May 2020 20:16:26 +0000 (15:16 -0500)] 
sranddev() is FreeBSD only

6 years agoremove redundant function
Arran Cudbard-Bell [Tue, 19 May 2020 18:30:28 +0000 (13:30 -0500)] 
remove redundant function

6 years agoheap: Convert heap tests to acutest tests
Arran Cudbard-Bell [Tue, 19 May 2020 14:10:37 +0000 (09:10 -0500)] 
heap: Convert heap tests to acutest tests