mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4-dsdb: Add secrets_tdb_sync - an ldb module to keep secrets.tdb in sync
secrets_tdb_sync is a new ldb module designed to sync secrets.ldb entries with the secrets.tdb file. While not ideal to keep two copies of this data, this routine will assist in allowing the samba-tool domain join code to operate correctly in most cases where winbindd and smbd are used. Andrew Bartlett
This commit is contained in:
@ -55,6 +55,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
|
||||
|
||||
def test_setup_secretsdb(self):
|
||||
path = os.path.join(self.tempdir, "secrets.ldb")
|
||||
secrets_tdb_path = os.path.join(self.tempdir, "secrets.tdb")
|
||||
paths = ProvisionPaths()
|
||||
paths.secrets = path
|
||||
paths.private_dir = os.path.dirname(path)
|
||||
@ -67,6 +68,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
|
||||
finally:
|
||||
del ldb
|
||||
os.unlink(path)
|
||||
os.unlink(secrets_tdb_path)
|
||||
|
||||
|
||||
class FindNssTests(TestCase):
|
||||
|
@ -126,7 +126,7 @@ class UpdateSecretsTests(samba.tests.TestCaseInTempDir):
|
||||
self.assertEquals(newmodules.msgs, refmodules.msgs)
|
||||
|
||||
def tearDown(self):
|
||||
for name in ["ref.ldb", "secrets.ldb"]:
|
||||
for name in ["ref.ldb", "secrets.ldb", "secrets.tdb"]:
|
||||
path = os.path.join(self.tempdir, name)
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
|
@ -172,7 +172,7 @@ class UpgradeProvisionWithLdbTestCase(TestCaseInTempDir):
|
||||
self.assertTrue(re.match(".*upgrade to.*", str(oem2)))
|
||||
|
||||
def tearDown(self):
|
||||
for name in ["ref.ldb", "secrets.ldb", "sam.ldb"]:
|
||||
for name in ["ref.ldb", "secrets.ldb", "secrets.tdb", "sam.ldb"]:
|
||||
path = os.path.join(self.tempdir, name)
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
|
Reference in New Issue
Block a user