The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
directory.c File Reference

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.

Macros

#define LOG_PREFIX   name
 

Functions

int fr_ldap_conn_directory_alloc_async (fr_ldap_connection_t *ldap_conn)
 Async extract useful information from the rootDSE of the LDAP server. More...
 
int fr_ldap_directory_result_parse (fr_ldap_directory_t *directory, LDAP *handle, LDAPMessage *result, char const *name)
 
int fr_ldap_trunk_directory_alloc_async (TALLOC_CTX *ctx, fr_ldap_thread_trunk_t *ttrunk)
 Async extract useful information from the rootDSE of the LDAP server. More...
 
static void ldap_trunk_directory_alloc_read (LDAP *handle, fr_ldap_query_t *query, LDAPMessage *result, void *rctx)
 Parse results of search on rootDSE to gather data on LDAP server. More...
 

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)
 

Detailed Description

Determine remote server implementation and capabilities.

Id
9af4bde1933d9f774159825f74f98209204f5805

As described by http://ldapwiki.willeke.com/wiki/Determine%20LDAP%20Server%20Vendor

Definition in file directory.c.

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   name

Definition at line 31 of file directory.c.

Function Documentation

◆ fr_ldap_conn_directory_alloc_async()

int fr_ldap_conn_directory_alloc_async ( fr_ldap_connection_t ldap_conn)

Async extract useful information from the rootDSE of the LDAP server.

This version is for a single connection rather than a connection trunk

Parameters
[in]ldap_connconnection to be queried
Returns
  • message ID on success < 0 on failure

Definition at line 283 of file directory.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_ldap_directory_result_parse()

int fr_ldap_directory_result_parse ( fr_ldap_directory_t directory,
LDAP *  handle,
LDAPMessage *  result,
char const *  name 
)

Definition at line 51 of file directory.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_ldap_trunk_directory_alloc_async()

int fr_ldap_trunk_directory_alloc_async ( TALLOC_CTX *  ctx,
fr_ldap_thread_trunk_t ttrunk 
)

Async extract useful information from the rootDSE of the LDAP server.

This is called once for each new thread trunk when it first connects.

Parameters
[in]ctxto allocate fr_ldap_directory_t in.
[in]ttrunkThread trunk connection to be queried
Returns
  • 0 on success < 0 on failure

Definition at line 253 of file directory.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ldap_trunk_directory_alloc_read()

static void ldap_trunk_directory_alloc_read ( LDAP *  handle,
fr_ldap_query_t query,
LDAPMessage *  result,
void *  rctx 
)
static

Parse results of search on rootDSE to gather data on LDAP server.

Parameters
[in]handleon which the query was run.
[in]querywhich requested the rootDSE.
[in]resulthead of LDAP results message chain.
[in]rctxLDAP directory whose properties are to be populated.

Definition at line 235 of file directory.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ fr_ldap_directory_type_table

fr_table_num_sorted_t const fr_ldap_directory_type_table[]
static
Initial value:
= {
{ L("Active Directory"), FR_LDAP_DIRECTORY_ACTIVE_DIRECTORY },
{ L("IBM"), FR_LDAP_DIRECTORY_IBM },
{ L("NetScape"), FR_LDAP_DIRECTORY_NETSCAPE },
{ L("OpenLDAP"), FR_LDAP_DIRECTORY_OPENLDAP },
{ L("Oracle Internet Directory"), FR_LDAP_DIRECTORY_ORACLE_INTERNET_DIRECTORY },
{ L("Oracle Unified Directory"), FR_LDAP_DIRECTORY_ORACLE_UNIFIED_DIRECTORY },
{ L("Oracle Virtual Directory"), FR_LDAP_DIRECTORY_ORACLE_VIRTUAL_DIRECTORY },
{ L("Siemens AG"), FR_LDAP_DIRECTORY_SIEMENS_AG },
{ L("Sun One Directory"), FR_LDAP_DIRECTORY_SUN_ONE_DIRECTORY },
{ L("Unbound ID"), FR_LDAP_DIRECTORY_UNBOUND_ID },
{ L("Unknown"), FR_LDAP_DIRECTORY_UNKNOWN },
{ L("eDirectory"), FR_LDAP_DIRECTORY_EDIRECTORY }
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition: build.h:207
@ FR_LDAP_DIRECTORY_ORACLE_UNIFIED_DIRECTORY
Directory server is Oracle Unified Directory.
Definition: base.h:149
@ FR_LDAP_DIRECTORY_UNKNOWN
We can't determine the directory server.
Definition: base.h:141
@ FR_LDAP_DIRECTORY_NETSCAPE
Directory server is Netscape.
Definition: base.h:146
@ FR_LDAP_DIRECTORY_EDIRECTORY
Directory server is eDir.
Definition: base.h:144
@ FR_LDAP_DIRECTORY_ORACLE_INTERNET_DIRECTORY
Directory server is Oracle Internet Directory.
Definition: base.h:148
@ FR_LDAP_DIRECTORY_UNBOUND_ID
Directory server is Unbound ID.
Definition: base.h:153
@ FR_LDAP_DIRECTORY_SIEMENS_AG
Directory server is Siemens AG.
Definition: base.h:152
@ FR_LDAP_DIRECTORY_ORACLE_VIRTUAL_DIRECTORY
Directory server is Oracle Virtual Directory.
Definition: base.h:150
@ FR_LDAP_DIRECTORY_ACTIVE_DIRECTORY
Directory server is Active Directory.
Definition: base.h:143
@ FR_LDAP_DIRECTORY_OPENLDAP
Directory server is OpenLDAP.
Definition: base.h:147
@ FR_LDAP_DIRECTORY_SUN_ONE_DIRECTORY
Directory server is Sun One Directory.
Definition: base.h:151
@ FR_LDAP_DIRECTORY_IBM
Directory server is IBM.
Definition: base.h:145

Definition at line 35 of file directory.c.

◆ fr_ldap_directory_type_table_len

size_t fr_ldap_directory_type_table_len = NUM_ELEMENTS(fr_ldap_directory_type_table)
static

Definition at line 49 of file directory.c.