00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef APR_LDAP_INIT_H
00022 #define APR_LDAP_INIT_H
00023
00029 #include "apr_ldap.h"
00030
00031 #if APR_HAS_LDAP
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037
00041 #if defined(LDAP_INSUFFICIENT_ACCESS)
00042 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
00043 #elif defined(LDAP_INSUFFICIENT_RIGHTS)
00044 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
00045 #elif defined(APR_HAS_MICROSOFT_LDAPSDK)
00046
00047
00048
00049
00050 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
00051 #else
00052 #error The security return codes must be added to support this LDAP toolkit.
00053 #endif
00054
00055 #if defined(LDAP_SECURITY_ERROR)
00056 #define APU_LDAP_SECURITY_ERROR LDAP_SECURITY_ERROR
00057 #else
00058 #define APU_LDAP_SECURITY_ERROR(n) \
00059 (LDAP_INAPPROPRIATE_AUTH == n) ? 1 \
00060 : (LDAP_INVALID_CREDENTIALS == n) ? 1 \
00061 : (APU_LDAP_INSUFFICIENT_ACCESS == n) ? 1 \
00062 : 0
00063 #endif
00064
00065
00089 APU_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
00090 const char *cert_auth_file,
00091 int cert_file_type,
00092 apr_ldap_err_t **result_err);
00093
00103 APU_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void);
00104
00139 APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
00140 LDAP **ldap,
00141 const char *hostname,
00142 int portno,
00143 int secure,
00144 apr_ldap_err_t **result_err);
00145
00154 APU_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool,
00155 apr_ldap_err_t **result_err);
00156
00157 #ifdef __cplusplus
00158 }
00159 #endif
00160
00161 #endif
00162
00165 #endif