From: <mi...@st...> - 2004-02-16 09:47:50
|
paul k wrote: > Hi all, > how do I query the servers subschema entry for supported objectclasses? See Demo/schema.py. > Searching like: > > conn.search_s('cn=subschema',ldap.SCOPE_SUBTREE, '(objectclass=*)') > returns ldap.NO_SUCH_OBJECT. The sub schema sub entry is not always located in cn=subschema. You have to query the operational attribute subschemaSubentry for the DN holding the sub schema sub entry. That's what ldap.LDAPObject.search_subschemasubentry_s() is for. Note that each part of the DIT can have its own separate sub schema sub entry! You have to query subschemaSubentry at each and every DN you're working with. Therefore you have to implement some kind of caching of sub schema instances to make it efficient. I know the whole schema stuff is completely undocumented. But have a look at Demo/schema.py. That should make things more clear. Ciao, Michael. |