file
entry.h
Typedefs
-
using LDAPAttribute_t = struct LDAPAttribute_
s -
using ld_entry_t = struct ld_
entry_ s
Functions
-
auto add(struct ldap_
connection_ ctx_ t* connection, const char* dn, LDAPMod** attrs) -> enum OperationReturnCode - add This function wraps ldap_add_ext function associating it with connection.
-
auto add_on_read(int rc,
LDAPMessage* message,
ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - add_on_write This callback called on complition of ldap add operation.
-
auto search(struct ldap_
connection_ ctx_ t* connection, const char* base_dn, int scope, const char* filter, char** attrs, bool attrsonly, search_ callback_ fn search_callback, void* user_data) -> enum OperationReturnCode - search Function wraps ldap search operation associating it with connection.
-
auto search_on_read(int rc,
LDAPMessage* message,
struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - search_on_read This callback called upon complition of ldap search operation.
-
auto modify(struct ldap_
connection_ ctx_ t* connection, const char* dn, LDAPMod** attrs) -> enum OperationReturnCode - modify This function wraps ldap_modify_ext.
-
auto modify_on_read(int rc,
LDAPMessage* message,
ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - modify_on_read This callback called upon complition of ldap modify operation.
-
auto ld_delete(struct ldap_
connection_ ctx_ t* connection, const char* dn) -> enum OperationReturnCode - ld_delete Function wraps ldap_delete_ext.
-
auto delete_on_read(int rc,
LDAPMessage* message,
ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - delete_on_read This callback determines result of delete operation.
-
auto ld_rename(struct ldap_
connection_ ctx_ t* connection, const char* olddn, const char* newdn, const char* new_parent, bool delete_original) -> enum OperationReturnCode - ld_rename Wraps ldap_rename function.
-
auto rename_on_read(int rc,
LDAPMessage* message,
ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - rename_on_read This callback determines result of rename operation.
-
auto whoami(struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - whoami This operation only supported on OpenLDAP and determines who current user is.
-
auto whoami_on_read(int rc,
LDAPMessage* message,
struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - whoami_on_read This callback determines result of whoami operation.
-
auto ld_entry_new(TALLOC_CTX* ctx,
const char* dn) -> ld_
entry_ t* - ld_entry_new Creates new ld_entry_t;
-
auto ld_entry_get_dn(ld_
entry_ t* entry) -> const char* - ld_entry_get_dn Get entry's dn;
-
auto ld_entry_add_attribute(ld_
entry_ t* entry, const LDAPAttribute_ t* attr) -> enum OperationReturnCode - ld_entry_add_attribute Adds attribute to entry.
-
auto ld_entry_get_attribute(ld_
entry_ t* entry, const char* name_or_oid) -> LDAPAttribute_ t* - ld_entry_get_attribute Gets attribute from entry.
-
auto ld_entry_get_attributes(ld_
entry_ t* entry) -> LDAPAttribute_ t** - ld_entry_get_attributes Get all attributes.
Function documentation
enum OperationReturnCode add(struct ldap_ connection_ ctx_ t* connection,
const char* dn,
LDAPMod** attrs)
add This function wraps ldap_add_ext function associating it with connection.
Parameters | |
---|---|
connection in | Connection to work with. |
dn in | The name of the entry to add. If NULL, a zero length DN is sent to the server. |
attrs in | The entry's attributes, specified using the LDAPMod structure defined for ldap_modify(). The mod_type and mod_vals fields MUST be filled in. The mod_op field is ignored unless ORed with the constant LDAP_MOD_BVALUES, used to select the mod_bvalues case of the mod_vals union. |
Returns |
|
enum OperationReturnCode add_on_read(int rc,
LDAPMessage* message,
ldap_ connection_ ctx_ t* connection)
add_on_write This callback called on complition of ldap add operation.
Parameters | |
---|---|
rc in | Return code of ldap_result. |
message in | Message received from ldap. |
connection in | Connection to work with. |
Returns |
|
enum OperationReturnCode search(struct ldap_ connection_ ctx_ t* connection,
const char* base_dn,
int scope,
const char* filter,
char** attrs,
bool attrsonly,
search_ callback_ fn search_callback,
void* user_data)
search Function wraps ldap search operation associating it with connection.
Parameters | |
---|---|
connection in | Connection to work with. |
base_dn in | The dn of the entry at which to start the search. If NULL, a zero length DN is sent to the server. |
scope in | One of LDAP_SCOPE_BASE (0x00), LDAP_SCOPE_ONELEVEL (0x01), or LDAP_SCOPE_SUBTREE (0x02), indicating the scope of the search. |
filter in | A character string as described in [13], representing the search filter. The value NULL can be passed to indicate that the filter "(objectclass=*)" which matches all entries is to be used. Note that if the caller of the API is using LDAPv2, only a subset of the filter functionality described in [13] can be successfully used. |
attrs in | A NULL-terminated array of strings indicating which attributes to return for each matching entry. Passing NULL for this parameter causes all available user attributes to be retrieved. The special constant string LDAP_NO_ATTRS ("1.1") MAY be used as the only string in the array to indicate that no attribute types are to be returned by the server. The special constant string LDAP_ALL_USER_ATTRS ("*") can be used in the attrs array along with the names of some operational attributes to indicate that all user attributes plus the listed operational attributes are to be returned. |
attrsonly in | A boolean value that MUST be zero if both attribute types and values are to be returned, and non-zero if only types are wanted. |
search_callback in | A callback function on search operation. |
user_data in | An output parameter for returning data after a search. |
Returns |
|
enum OperationReturnCode search_on_read(int rc,
LDAPMessage* message,
struct ldap_ connection_ ctx_ t* connection)
search_on_read This callback called upon complition of ldap search operation.
Parameters | |
---|---|
rc in | Return code of ldap_result. |
message in | Message received from ldap. |
connection in | Connection to work with. |
Returns |
|
enum OperationReturnCode modify(struct ldap_ connection_ ctx_ t* connection,
const char* dn,
LDAPMod** attrs)
modify This function wraps ldap_modify_ext.
Parameters | |
---|---|
connection in | Connection to work with. |
dn in | The name of the entry to modify. If NULL, a zero length DN is sent to the server. |
attrs in | A NULL-terminated array of modifications to make to the entry. |
Returns |
|
enum OperationReturnCode modify_on_read(int rc,
LDAPMessage* message,
ldap_ connection_ ctx_ t* connection)
modify_on_read This callback called upon complition of ldap modify operation.
Parameters | |
---|---|
rc | Return code of ldap_result. |
message | Message received from ldap. |
connection | Connection to work with. |
Returns |
|
enum OperationReturnCode ld_delete(struct ldap_ connection_ ctx_ t* connection,
const char* dn)
ld_delete Function wraps ldap_delete_ext.
Parameters | |
---|---|
connection in | Connection to work with. |
dn in | The name of the entry to delete. If NULL, a zero length DN is sent to the server. |
Returns |
|
enum OperationReturnCode delete_on_read(int rc,
LDAPMessage* message,
ldap_ connection_ ctx_ t* connection)
delete_on_read This callback determines result of delete operation.
Parameters | |
---|---|
rc in | Return code of ldap_result. |
message in | Message received from ldap. |
connection in | Connection to work with. |
Returns |
|
enum OperationReturnCode ld_rename(struct ldap_ connection_ ctx_ t* connection,
const char* olddn,
const char* newdn,
const char* new_parent,
bool delete_original)
ld_rename Wraps ldap_rename function.
Returns |
|
---|
enum OperationReturnCode rename_on_read(int rc,
LDAPMessage* message,
ldap_ connection_ ctx_ t* connection)
rename_on_read This callback determines result of rename operation.
Parameters | |
---|---|
rc in | Return code of ldap_result. |
message in | Message received from ldap. |
connection in | Connection to work with. |
Returns |
|
enum OperationReturnCode whoami(struct ldap_ connection_ ctx_ t* connection)
whoami This operation only supported on OpenLDAP and determines who current user is.
Parameters | |
---|---|
connection in | Connection to work with. |
enum OperationReturnCode whoami_on_read(int rc,
LDAPMessage* message,
struct ldap_ connection_ ctx_ t* connection)
whoami_on_read This callback determines result of whoami operation.
Parameters | |
---|---|
rc in | Return code of ldap_result. |
message in | Message received from ldap. |
connection in | Connection to work with. |
Returns |
|
ld_ entry_ t* ld_entry_new(TALLOC_CTX* ctx,
const char* dn)
ld_entry_new Creates new ld_entry_t;
Parameters | |
---|---|
ctx in | Talloc ctx to use. |
dn | |
Returns |
|
const char* ld_entry_get_dn(ld_ entry_ t* entry)
ld_entry_get_dn Get entry's dn;
Parameters | |
---|---|
entry in | Entry to use. |
Returns |
|
enum OperationReturnCode ld_entry_add_attribute(ld_ entry_ t* entry,
const LDAPAttribute_ t* attr)
ld_entry_add_attribute Adds attribute to entry.
Parameters | |
---|---|
entry in | Entry to use. |
attr in | Attribute to add. |
Returns |
|
LDAPAttribute_ t* ld_entry_get_attribute(ld_ entry_ t* entry,
const char* name_or_oid)
ld_entry_get_attribute Gets attribute from entry.
Parameters | |
---|---|
entry in | Entry to use. |
name_or_oid in | Name of attribute. |
Returns |
|
LDAPAttribute_ t** ld_entry_get_attributes(ld_ entry_ t* entry)
ld_entry_get_attributes Get all attributes.
Parameters | |
---|---|
entry in | Entry to get attributes from. |
Returns |
|