Class | LDAP::Conn |
In: |
conn.c
lib/ldap/schema.rb |
Parent: | Data |
Create and manipulate unencrypted LDAP connections.
Return a new LDAP::Conn connection to the server, host, on port port.
Return a new LDAP::Conn connection to the server, host, on port port.
Add an entry with the DN, dn, and the attributes, attrs. attrs should be either an array of LDAP#Mod objects or a hash of attribute/value array pairs.
Add an entry with the DN, dn, and the attributes, attrs. attrs should be either an array of LDAP#Mod objects or a hash of attribute/value array pairs. sctrls is an array of server controls, whilst cctrls is an array of client controls.
Bind an LDAP connection, using the DN, dn, the credential, password, and the bind method, method. If a block is given, self is yielded to the block.
Compare the DN given as dn to see whether it has the attribute attr with a value of val. sctrls is an array of server controls, whilst cctrls is an array of client controls.
Delete the entry with the DN, dn. sctrls is an array of server controls, whilst cctrls is an array of client controls.
Modify an entry with the DN, dn, and the attributes, mods. mods should be either an array of LDAP#Mod objects or a hash of attribute/value array pairs.
Modify an entry with the DN, dn, and the attributes, mods. mods should be either an array of LDAP#Mod objects or a hash of attribute/value array pairs. sctrls is an array of server controls, whilst cctrls is an array of client controls.
Modify the RDN of the entry with DN, dn, giving it the new RDN, new_rdn. If delete_old_rdn is true, the old RDN value will be deleted from the entry.
Print the text string associated with the error code of the last LDAP operation. msg is used to prefix the error.
Fetch the root DSE (DSA-specific Entry) for the connection. DSA stands for Directory System Agent and simply refers to the LDAP server you are using.
attrs, if given, is an array of attributes that should be returned from the server. The default list is subschemaSubentry, namingContexts, monitorContext, altServer, supportedControl, supportedExtension, supportedFeatures, supportedSASLMechanisms and supportedLDAPVersion.
sec and usec can be used to specify a time-out for the search in seconds and microseconds, respectively.
Fetch the schema data for the connection.
If base is given, it gives the base DN for the search. attrs, if given, is an array of attributes that should be returned from the server. The default list is objectClasses, attributeTypes, matchingRules, matchingRuleUse, dITStructureRules, dITContentRules, nameForms and ldapSyntaxes.
sec and usec can be used to specify a time-out for the search in seconds and microseconds, respectively.
Perform a search, with the base DN base_dn, a scope of scope and a search filter of filter.
If attrs is present, it should be an array of the attributes that the search should return. By default, all attributes are returned, which is the same as specifying an empty array or nil. Alternatively, attrs may be a single string, in which case it will be treated as a single element array.
If attrsonly is true, attributes will be returned, but not their values.
If sec and/or usec are given, they define the time-out for the search in seconds and microseconds, respectively.
If s_attr is given, it specifies the attribute on which to sort the entries returned by the server. If s_proc is given, it specifies a Proc object that will be used to sort the entries returned by the server.
Note that not all results may be returned by this method. If a size limit has been set for the number of results to be returned and this limit is exceeded, the results set will be truncated. You can check for this by calling LDAP::Conn#err immediately after this method and comparing the result to LDAP::LDAP_SIZELIMIT_EXCEEDED.
Perform a search, with the base DN base_dn, a scope of scope and a search filter of filter.
If attrs is present, it should be an array of the attributes that the search should return. By default, all attributes are returned, which is the same as specifying an empty array or nil. Alternatively, attrs may be a single string, in which case it will be treated as a single element array.
If attrsonly is true, attributes will be returned, but not their values.
If sec and/or usec are given, they define the time-out for the search in seconds and microseconds, respectively.
If s_attr is given, it specifies the attribute on which to sort the entries returned by the server. If s_proc is given, it specifies a Proc object that will be used to sort the entries returned by the server.
Note that not all results may be returned by this method. If a size limit has been set for the number of results to be returned and this limit is exceeded, the results set will be truncated. You can check for this by calling LDAP::Conn#err immediately after this method and comparing the result to LDAP::LDAP_SIZELIMIT_EXCEEDED.
Perform a search, with the base DN base_dn, a scope of scope and a search filter of filter.
If attrs is present, it should be an array of the attributes that the search should return. By default, all attributes are returned, which is the same as specifying an empty array or nil. Alternatively, attrs may be a single string, in which case it will be treated as a single element array.
If attrsonly is true, attributes will be returned, but not their values.
sctrls is an array of server controls, whilst cctrls is an array of client controls.
If sec and/or usec are given, they define the time-out for the search in seconds and microseconds, respectively.
If s_attr is given, it specifies the attribute on which to sort the entries returned by the server. If s_proc is given, it specifies a Proc object that will be used to sort the entries returned by the server.
Note that not all results may be returned by this method. If a size limit has been set for the number of results to be returned and this limit is exceeded, the results set will be truncated. You can check for this by calling LDAP::Conn#err immediately after this method and comparing the result to LDAP::LDAP_SIZELIMIT_EXCEEDED.
Perform a search, with the base DN base_dn, a scope of scope and a search filter of filter.
If attrs is present, it should be an array of the attributes that the search should return. By default, all attributes are returned, which is the same as specifying an empty array or nil. Alternatively, attrs may be a single string, in which case it will be treated as a single element array.
If attrsonly is true, attributes will be returned, but not their values.
sctrls is an array of server controls, whilst cctrls is an array of client controls.
If sec and/or usec are given, they define the time-out for the search in seconds and microseconds, respectively.
If s_attr is given, it specifies the attribute on which to sort the entries returned by the server. If s_proc is given, it specifies a Proc object that will be used to sort the entries returned by the server.
Note that not all results may be returned by this method. If a size limit has been set for the number of results to be returned and this limit is exceeded, the results set will be truncated. You can check for this by calling LDAP::Conn#err immediately after this method and comparing the result to LDAP::LDAP_SIZELIMIT_EXCEEDED.
Set a session-wide option for this LDAP connection.
For example:
conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
would set the protocol of this connection to LDAPv3.
Bind an LDAP connection, using the DN, dn, and the credential, password. If a block is given, self is yielded to the block.