![]() |
The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
|
Determine remote server implementation and capabilities. More...
#include <freeradius-devel/ldap/base.h>
Include dependency graph for directory.c:Go to the source code of this file.
Data Structures | |
| struct | ldap_directory_discover_ctx_t |
| State of an in progress rootDSE search on a connection being established. More... | |
Macros | |
| #define | LOG_PREFIX name |
Functions | |
| static void | _ldap_directory_discover_io_error (UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, UNUSED int fd_errno, void *uctx) |
| Error reading from or writing to the file descriptor. | |
| static void | _ldap_directory_discover_io_read (UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, void *uctx) |
| Parse a rootDSE response from a server. | |
| static int8_t | _naming_context_cmp (void const *one, void const *two) |
| Compare two naming contexts, case insensitively. | |
| static uint32_t | _naming_context_hash (void const *data) |
| Hash a naming context, case insensitively. | |
| int | fr_ldap_conn_directory_alloc_async (fr_ldap_connection_t *ldap_conn) |
| Asynchronously extract useful information from the rootDSE of the LDAP server. | |
| fr_ldap_directory_t * | fr_ldap_directory_alloc (TALLOC_CTX *ctx) |
| Allocate a directory structure with defaults. | |
| char const * | fr_ldap_directory_common_base_find (fr_ldap_directory_t const *directory, char const *const *dn_list) |
| Find the naming context which contains a set of DNs. | |
| int | fr_ldap_directory_discover_async (fr_ldap_connection_t *c) |
| Send a rootDSE search on a connection being established. | |
| int | fr_ldap_directory_result_parse (fr_ldap_directory_t *directory, LDAP *handle, LDAPMessage *result, char const *name) |
Variables | |
| static fr_table_num_sorted_t const | fr_ldap_directory_type_table [] |
| static size_t | fr_ldap_directory_type_table_len = NUM_ELEMENTS(fr_ldap_directory_type_table) |
Determine remote server implementation and capabilities.
As described by http://ldapwiki.willeke.com/wiki/Determine%20LDAP%20Server%20Vendor
Definition in file directory.c.
| struct ldap_directory_discover_ctx_t |
State of an in progress rootDSE search on a connection being established.
Definition at line 338 of file directory.c.
Collaboration diagram for ldap_directory_discover_ctx_t:| Data Fields | ||
|---|---|---|
| fr_ldap_connection_t * | c | Connection the rootDSE search was sent on. |
| int | msgid | Of the outstanding rootDSE search. |
Definition at line 31 of file directory.c.
|
static |
Error reading from or writing to the file descriptor.
| [in] | el | the event occurred in. |
| [in] | fd | the event occurred on. |
| [in] | flags | from kevent. |
| [in] | fd_errno | The error that occurred. |
| [in] | uctx | discover_ctx containing the connection and message ID. |
Definition at line 351 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Parse a rootDSE response from a server.
A failure parsing the rootDSE leaves the directory with its defaults, the connection is still usable, so the state machine advances either way.
| [in] | el | the event occurred in. |
| [in] | fd | the event occurred on. |
| [in] | flags | from kevent. |
| [in] | uctx | discover_ctx containing the connection and message ID. |
Definition at line 371 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Compare two naming contexts, case insensitively.
Definition at line 63 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Hash a naming context, case insensitively.
Definition at line 55 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_ldap_conn_directory_alloc_async | ( | fr_ldap_connection_t * | ldap_conn | ) |
Asynchronously extract useful information from the rootDSE of the LDAP server.
This version is for a single connection rather than a connection trunk
| [in] | ldap_conn | connection to be queried |
Definition at line 442 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_ldap_directory_t * fr_ldap_directory_alloc | ( | TALLOC_CTX * | ctx | ) |
Allocate a directory structure with defaults.
dn_attr defaults to the RFC 5020 entryDN attribute, overridden when parsing the rootDSE detects a directory which doesn't implement entryDN.
Definition at line 272 of file directory.c.
Here is the caller graph for this function:| char const * fr_ldap_directory_common_base_find | ( | fr_ldap_directory_t const * | directory, |
| char const *const * | dn_list | ||
| ) |
Find the naming context which contains a set of DNs.
Looks up successively shorter suffixes of each DN in the hash table of naming contexts (database suffixes) built when the rootDSE was parsed, and returns the naming context containing every DN. A search with the returned base covers all the DNs.
| [in] | directory | Directory discovery results, providing the naming contexts. |
| [in] | dn_list | NULL terminated list of DNs to cover, no empty strings. |
Definition at line 296 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_ldap_directory_discover_async | ( | fr_ldap_connection_t * | c | ) |
Send a rootDSE search on a connection being established.
Called by the connection state machine after binding, so the directory capabilities (vendor, naming contexts) are known before the connection starts serving requests. Results are parsed into c->directory.
| [in] | c | LDAP connection to be queried. |
Definition at line 404 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_ldap_directory_result_parse | ( | fr_ldap_directory_t * | directory, |
| LDAP * | handle, | ||
| LDAPMessage * | result, | ||
| char const * | name | ||
| ) |
Definition at line 68 of file directory.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 35 of file directory.c.
|
static |
Definition at line 50 of file directory.c.
1.9.8