summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-11 14:28:19 +1000
committerAndrew Tridgell <tridge@samba.org>2011-07-11 07:43:18 +0200
commit330c00a14d0d903b5f1accf5a17c226ca3413dc4 (patch)
tree9e5c00ceed3cfb23576fa64db3cdd561411a7fb4 /source4/scripting/python
parent02562a0ca988b5b1e0796a445aabc96dddb408d2 (diff)
downloadsamba-330c00a14d0d903b5f1accf5a17c226ca3413dc4.tar.gz
samba-330c00a14d0d903b5f1accf5a17c226ca3413dc4.tar.bz2
samba-330c00a14d0d903b5f1accf5a17c226ca3413dc4.zip
dbcheck: use get_lDAPDisplayName_by_attid()
this is better than doing a schema search inside the dbcheck code Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/dbchecker.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/scripting/python/samba/dbchecker.py b/source4/scripting/python/samba/dbchecker.py
index 402b3b6714..f914bbb9e9 100644
--- a/source4/scripting/python/samba/dbchecker.py
+++ b/source4/scripting/python/samba/dbchecker.py
@@ -333,20 +333,12 @@ class dbcheck(object):
'''Read metadata properties and list attributes in it'''
list_att = []
- d = {}
- if self.dict_oid_name == None:
- res = self.samdb.search(expression = '(lDAPDisplayName=*)',
- controls=["search_options:1:2"],
- attrs=["attributeID","lDAPDisplayName"])
- for m in res:
- d[str(m.get("attributeID"))] = str(m.get("lDAPDisplayName"))
- self.dict_oid_name = d
-
- repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob,str(val))
+
+ repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, str(val))
obj = repl.ctr
for o in repl.ctr.array:
- att = self.dict_oid_name[self.samdb.get_oid_from_attid(o.attid)]
+ att = self.samdb_schema.get_lDAPDisplayName_by_attid(o.attid)
list_att.append(att.lower())
return list_att