LDAP module group functions. More...
Go to the source code of this file.
Functions | |
rlm_rcode_t | rlm_ldap_cacheable_groupobj (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn) |
Convert group membership information into attributes. More... | |
rlm_rcode_t | rlm_ldap_cacheable_userobj (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, LDAPMessage *entry, char const *attr) |
Convert group membership information into attributes. More... | |
rlm_rcode_t | rlm_ldap_check_cached (rlm_ldap_t const *inst, REQUEST *request, VALUE_PAIR *check) |
Check group membership attributes to see if a user is a member. More... | |
rlm_rcode_t | rlm_ldap_check_groupobj_dynamic (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, VALUE_PAIR *check) |
Query the LDAP directory to check if a group object includes a user object as a member. More... | |
rlm_rcode_t | rlm_ldap_check_userobj_dynamic (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, char const *dn, VALUE_PAIR *check) |
Query the LDAP directory to check if a user object is a member of a group. More... | |
static rlm_rcode_t | rlm_ldap_group_dn2name (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, char const *dn, char **out) |
Convert a single group name into a DN. More... | |
static rlm_rcode_t | rlm_ldap_group_name2dn (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, char **names, char **out, size_t outlen) |
Convert multiple group names into a DNs. More... | |
LDAP module group functions.
Definition in file groups.c.
rlm_rcode_t rlm_ldap_cacheable_groupobj | ( | rlm_ldap_t const * | inst, |
REQUEST * | request, | ||
ldap_handle_t ** | pconn | ||
) |
Convert group membership information into attributes.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
Definition at line 415 of file groups.c.
rlm_rcode_t rlm_ldap_cacheable_userobj | ( | rlm_ldap_t const * | inst, |
REQUEST * | request, | ||
ldap_handle_t ** | pconn, | ||
LDAPMessage * | entry, | ||
char const * | attr | ||
) |
Convert group membership information into attributes.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | entry | retrieved by rlm_ldap_find_user or rlm_ldap_search. |
[in] | attr | membership attribute to look for in the entry. |
Definition at line 267 of file groups.c.
rlm_rcode_t rlm_ldap_check_cached | ( | rlm_ldap_t const * | inst, |
REQUEST * | request, | ||
VALUE_PAIR * | check | ||
) |
Check group membership attributes to see if a user is a member.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in] | check | vp containing the group value (name or dn). |
Definition at line 812 of file groups.c.
rlm_rcode_t rlm_ldap_check_groupobj_dynamic | ( | rlm_ldap_t const * | inst, |
REQUEST * | request, | ||
ldap_handle_t ** | pconn, | ||
VALUE_PAIR * | check | ||
) |
Query the LDAP directory to check if a group object includes a user object as a member.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | check | vp containing the group value (name or dn). |
Definition at line 530 of file groups.c.
rlm_rcode_t rlm_ldap_check_userobj_dynamic | ( | rlm_ldap_t const * | inst, |
REQUEST * | request, | ||
ldap_handle_t ** | pconn, | ||
char const * | dn, | ||
VALUE_PAIR * | check | ||
) |
Query the LDAP directory to check if a user object is a member of a group.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | dn | of user object. |
[in] | check | vp containing the group value (name or dn). |
Definition at line 632 of file groups.c.
|
static |
Convert a single group name into a DN.
Unlike the inverse conversion of a name to a DN, most LDAP directories don't allow filtering by DN, so we need to search for each DN individually.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | dn | to resolve. |
[out] | out | Where to write group name (must be freed with talloc_free). |
Definition at line 196 of file groups.c.
|
static |
Convert multiple group names into a DNs.
Given an array of group names, builds a filter matching all names, then retrieves all group objects and stores the DN associated with each group object.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | names | to covert to DNs (NULL terminated). |
[out] | out | Where to write the DNs. DNs must be freed with ldap_memfree(). Will be NULL terminated. |
[in] | outlen | Size of out. |
Definition at line 45 of file groups.c.