Class: LDAP::Conn

Inherits:
Object
  • Object
show all
Defined in:
lib/activeldap/schema2.rb

Overview

Schema2

Instance Method Summary collapse

Instance Method Details

#schema2(base = nil, attrs = nil, sec = 0, usec = 0) ⇒ Object



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/activeldap/schema2.rb', line 199

def schema2(base = nil, attrs = nil, sec = 0, usec = 0)
  attrs ||= [
    'objectClasses',
    'attributeTypes',
    'matchingRules',
    'matchingRuleUse',
    'dITStructureRules',
    'dITContentRules',
    'nameForms',
    'ldapSyntaxes',
  ]
  base ||= root_dse(['subschemaSubentry'], sec, usec)[0]['subschemaSubentry'][0]
  base ||= 'cn=schema'
  ent = search2(base, LDAP_SCOPE_BASE, '(objectClass=subschema)',
                attrs, false, sec, usec)
  return Schema2.new(ent[0])
end