199: def schema2(base = nil, attrs = nil, sec = 0, usec = 0)
200: attrs ||= [
201: 'objectClasses',
202: 'attributeTypes',
203: 'matchingRules',
204: 'matchingRuleUse',
205: 'dITStructureRules',
206: 'dITContentRules',
207: 'nameForms',
208: 'ldapSyntaxes',
209: ]
210: base ||= root_dse(['subschemaSubentry'], sec, usec)[0]['subschemaSubentry'][0]
211: base ||= 'cn=schema'
212: ent = search2(base, LDAP_SCOPE_BASE, '(objectClass=subschema)',
213: attrs, false, sec, usec)
214: return Schema2.new(ent[0])
215: end