mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
samdb: Fix formatting, move get_oid_from_attid from Ldb to SamDB.
This commit is contained in:
@ -280,9 +280,6 @@ class Ldb(_Ldb):
|
||||
def set_schema_from_ldif(self, pf, df):
|
||||
dsdb.dsdb_set_schema_from_ldif(self, pf, df)
|
||||
|
||||
def get_oid_from_attid(self, attid):
|
||||
return dsdb.dsdb_get_oid_from_attid(self, attid)
|
||||
|
||||
def set_schema_from_ldb(self, ldb):
|
||||
dsdb.dsdb_set_schema_from_ldb(self, ldb)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Unix SMB/CIFS implementation.
|
||||
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2008
|
||||
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010
|
||||
# Copyright (C) Matthias Dieter Wallnoefer 2009
|
||||
#
|
||||
# Based on the original in EJS:
|
||||
@ -26,8 +26,6 @@
|
||||
import dsdb
|
||||
import samba
|
||||
import ldb
|
||||
from samba.idmap import IDmapDB
|
||||
import pwd
|
||||
import time
|
||||
import base64
|
||||
|
||||
@ -452,6 +450,9 @@ accountExpires: %u
|
||||
"""
|
||||
dsdb.dsdb_set_ntds_invocation_id(self, invocation_id)
|
||||
|
||||
def get_oid_from_attid(self, attid):
|
||||
return dsdb.dsdb_get_oid_from_attid(self, attid)
|
||||
|
||||
def get_invocation_id(self):
|
||||
"Get the invocation_id id"
|
||||
return dsdb.samdb_ntds_invocation_id(self)
|
||||
|
@ -38,5 +38,5 @@ class DsdbTests(TestCase):
|
||||
session = system_session()
|
||||
test_ldb = SamDB(os.path.join(self._baseprovpath(), "private", "sam.ldb"),
|
||||
session_info=session, credentials=creds,lp=lp)
|
||||
oid = test_ldb.dsdb_get_oid_from_attid(591614)
|
||||
oid = test_ldb.get_oid_from_attid(591614)
|
||||
self.assertEquals(oid, "1.2.840.113556.1.4.1790")
|
||||
|
Reference in New Issue
Block a user