Only do special DN tracking for normal DNs in OpenLDAP backend.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 9 Jan 2009 01:06:18 +0000 (12:06 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 9 Jan 2009 01:08:11 +0000 (12:08 +1100)
This means trying (again, harder), not to do this for DN+Binary and
DN+String attributes.

Andrew Bartlett

source4/scripting/python/samba/provision.py

index ff957b647d08efdb048bf7ca86d985d15d9571e1..6becc78dc729061fe8ed6aaa74a59ae6cde1c210 100644 (file)
@@ -1255,12 +1255,12 @@ def provision_backend(setup_dir=None, message=None,
 
     elif ldap_backend_type == "openldap":
         attrs = ["linkID", "lDAPDisplayName"]
-        res = schemadb.search(expression="(&(linkID=*)(!(linkID:1.2.840.113556.1.4.803:=1))(objectclass=attributeSchema)(omSyntax=127))", base=names.schemadn, scope=SCOPE_SUBTREE, attrs=attrs)
+        res = schemadb.search(expression="(&(linkID=*)(!(linkID:1.2.840.113556.1.4.803:=1))(objectclass=attributeSchema)(attributeSyntax=2.5.5.1))", base=names.schemadn, scope=SCOPE_SUBTREE, attrs=attrs)
 
         memberof_config = "# Generated from schema in %s\n" % schemadb_path
         refint_attributes = ""
         for i in range (0, len(res)):
-            expression = "(&(objectclass=attributeSchema)(linkID=%d)(omSyntax=127))" % (int(res[i]["linkID"][0])+1)
+            expression = "(&(objectclass=attributeSchema)(linkID=%d)(attributeSyntax=2.5.5.1))" % (int(res[i]["linkID"][0])+1)
             target = schemadb.searchone(basedn=names.schemadn, 
                                         expression=expression, 
                                         attribute="lDAPDisplayName",