1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00

netcmd: Fix opening SamDB database for offline backup

When opening the backed-up SamDB database, open the top-level database
without loading any modules so the backend database files aren't
unnecessarily opened. The domain SID is now fetched from the original
database rather than from the backup.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
This commit is contained in:
Joseph Sutton
2021-03-22 11:06:30 +13:00
committed by Andrew Bartlett
parent bb3dcd403c
commit d7c111514a
3 changed files with 16 additions and 9 deletions

View File

@@ -184,7 +184,7 @@ class NtaclsBackupRestoreTests(SmbdBaseTests):
"""
ntacls.backup_offline(
self.service_root, self.tarfile_path,
self.samdb_conn, self.smb_conf_path)
self.smb_conf_path, self.dom_sid)
self._check_tarfile()
self.smb_helper.delete_tree()