diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-18 02:21:14 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:51:31 +0100 |
commit | 63f53094efa29b76eb4136cddf19d9c5d325fc5f (patch) | |
tree | 2e7ca7c80aaccfcfaed427682854c16bef3ed33c /source4/scripting/python/samba/samdb.py | |
parent | cad1e11959a3468875500fffac0ce562bc785249 (diff) | |
download | samba-63f53094efa29b76eb4136cddf19d9c5d325fc5f.tar.gz samba-63f53094efa29b76eb4136cddf19d9c5d325fc5f.tar.xz samba-63f53094efa29b76eb4136cddf19d9c5d325fc5f.zip |
r26520: More Python updates.
(This used to be commit a8b1fe15ac853082961132ede061fe1556ae29f7)
Diffstat (limited to 'source4/scripting/python/samba/samdb.py')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 73426121a64..ce06efa3de4 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -22,8 +22,14 @@ import samba import misc +import ldb class SamDB(samba.Ldb): + def __init__(self, *args, **kwargs): + super(SamDB, self).__init__(*args, **kwargs) + misc.dsdb_set_global_schema(self) + misc.ldb_register_samba_handlers(self) + def add_foreign(self, domaindn, sid, desc): """Add a foreign security principle.""" add = """ @@ -39,7 +45,7 @@ description: %s def setup_name_mapping(self, domaindn, sid, unixname): """Setup a mapping between a sam name and a unix name.""" - res = self.search(Dn(ldb, domaindn), SCOPE_SUBTREE, + res = self.search(ldb.Dn(self, domaindn), ldb.SCOPE_SUBTREE, "objectSid=%s" % sid, ["dn"]) assert len(res) == 1, "Failed to find record for objectSid %s" % sid |