mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
python: Remove ntdb references
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
committed by
Michael Adam
parent
334015ebca
commit
9fbc2e5018
@ -25,7 +25,6 @@ REGISTRY_DB_VERSION = 1
|
||||
import os
|
||||
import struct
|
||||
import tdb
|
||||
import ntdb
|
||||
|
||||
import passdb
|
||||
import param as s3param
|
||||
@ -50,15 +49,12 @@ def fetch_int32(db, key):
|
||||
|
||||
|
||||
class DbDatabase(object):
|
||||
"""Simple Samba 3 TDB/NTDB database reader."""
|
||||
"""Simple Samba 3 TDB database reader."""
|
||||
def __init__(self, file):
|
||||
"""Open a file.
|
||||
|
||||
:param file: Path of the file to open, appending .tdb or .ntdb.
|
||||
"""
|
||||
if os.path.exists(file + ".ntdb"):
|
||||
self.db = ntdb.Ntdb(file + ".ntdb", flags=os.O_RDONLY)
|
||||
else:
|
||||
self.db = tdb.Tdb(file + ".tdb", flags=os.O_RDONLY)
|
||||
self._check_version()
|
||||
|
||||
|
@ -57,7 +57,6 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
|
||||
path = os.path.join(self.tempdir, "secrets.ldb")
|
||||
paths = ProvisionPaths()
|
||||
secrets_tdb_path = os.path.join(self.tempdir, "secrets.tdb")
|
||||
secrets_ntdb_path = os.path.join(self.tempdir, "secrets.ntdb")
|
||||
paths.secrets = path
|
||||
paths.private_dir = os.path.dirname(path)
|
||||
paths.keytab = "no.keytab"
|
||||
@ -71,8 +70,6 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
|
||||
os.unlink(path)
|
||||
if os.path.exists(secrets_tdb_path):
|
||||
os.unlink(secrets_tdb_path)
|
||||
if os.path.exists(secrets_ntdb_path):
|
||||
os.unlink(secrets_ntdb_path)
|
||||
|
||||
class FindNssTests(TestCase):
|
||||
"""Test findnss() function."""
|
||||
|
Reference in New Issue
Block a user