samba-tool: Rework transations/locks to hold a lock during mdb backup
authorAndrew Bartlett <abartlet@samba.org>
Mon, 23 Aug 2021 06:14:16 +0000 (18:14 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Aug 2021 12:29:32 +0000 (12:29 +0000)
commit958931ad379af26dcbc55cfbc49e7886ef8e0550
tree1739bdbf1fc9b92ae94b4c6699b11398c56fcc76
parent423f808ff48e297745f576a52b2118c4b920a3e4
samba-tool: Rework transations/locks to hold a lock during mdb backup

We now also get sidForRestore under that lock, rather than
after the backup.

This avoids using the database again after the backup process

While not entirely clear how/why this matters with LMDB
as seen in Fedora 34, likely due to the same issues
seen with 0.9.26 or later fixed by commmit
bb3dcd403ced922574a89011dd3814c4fe87dd76.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14676

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/netcmd/domain_backup.py