1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s4-samdb: Allow skipping global schema.

This commit is contained in:
Jelmer Vernooij 2010-04-07 12:11:12 +02:00
parent feeedf49cf
commit c76bd65b60
3 changed files with 9 additions and 8 deletions

View File

@ -266,13 +266,13 @@ class Ldb(_Ldb):
:param sid: The new domain sid to use.
"""
glue.samdb_set_domain_sid(self, sid)
dsdb.samdb_set_domain_sid(self, sid)
def domain_sid(self):
"""Read the domain SID used by this LDB.
"""
glue.samdb_get_domain_sid(self)
dsdb.samdb_get_domain_sid(self)
def set_schema_from_ldif(self, pf, df):
glue.dsdb_set_schema_from_ldif(self, pf, df)
@ -291,15 +291,15 @@ class Ldb(_Ldb):
:param invocation_id: GUID of the invocation id.
"""
glue.dsdb_set_ntds_invocation_id(self, invocation_id)
dsdb.dsdb_set_ntds_invocation_id(self, invocation_id)
def get_invocation_id(self):
"Get the invocation_id id"
return glue.samdb_ntds_invocation_id(self)
return dsdb.samdb_ntds_invocation_id(self)
def get_ntds_GUID(self):
"Get the NTDS objectGUID"
return glue.samdb_ntds_objectGUID(self)
return dsdb.samdb_ntds_objectGUID(self)
def server_site_name(self):
"Get the server site name"

View File

@ -74,4 +74,4 @@ class cmd_setpassword(Command):
credentials=creds, lp=lp)
samdb.setpassword(filter, password,
force_password_change_at_next_login_req=must_change_at_next_login)
force_change_at_next_login=must_change_at_next_login)

View File

@ -38,7 +38,7 @@ class SamDB(samba.Ldb):
"""The SAM database."""
def __init__(self, url=None, lp=None, modules_dir=None, session_info=None,
credentials=None, flags=0, options=None):
credentials=None, flags=0, options=None, global_schema=False):
self.lp = lp
if url is None:
url = lp.get("sam database")
@ -47,7 +47,8 @@ class SamDB(samba.Ldb):
session_info=session_info, credentials=credentials, flags=flags,
options=options)
glue.dsdb_set_global_schema(self)
if global_schema:
glue.dsdb_set_global_schema(self)
def connect(self, url=None, flags=0, options=None):
super(SamDB, self).connect(url=self.lp.private_path(url), flags=flags,