ldb-samba: critical bugfix on original recursive search implementation
authorAdrian Cochrane <adrianc@catalyst.net.nz>
Fri, 8 Jan 2016 02:15:07 +0000 (15:15 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Jan 2016 03:42:21 +0000 (04:42 +0100)
commita52bcaaf2062e5e48695032e25b68aeff33ea301
tree21da337f94214d16d9e5d9a40d700bd59a68c38d
parent177ac584c9bc444b951596f0ca740c04182c9db8
ldb-samba: critical bugfix on original recursive search implementation

In the original patch (listed previously), when the search recurses it
will inevitably reallocate the visited list to a new array in memory.
When this happens the original patch didn't update it's reference to the
array.

This patch adds an extra level of indirection on the visited list in
order to fix this bug.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb-samba/ldb_matching_rules.c