dsdb/partition: Ensure metadata.tdb is opened early in partition_reload_if_required()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 16 May 2019 02:35:00 +0000 (14:35 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 20 May 2019 04:01:10 +0000 (04:01 +0000)
commit7567f29211f7da35a785bd8c8cee999b0b24a078
tree58c2827b907d777fac89a22a661b2fb841b94dda
parent46677b8e1effe4a1eab4ac69fb0213bf72c7cf42
dsdb/partition: Ensure metadata.tdb is opened early in partition_reload_if_required()

This allows metadata.tdb to be locked in the correct place in
in the lock order, as partition_reload_if_required() implicitly
calls partition_lock_read().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/partition_init.c
source4/dsdb/samdb/ldb_modules/partition_metadata.c