ap_ldap_rebind.c revision 328106dab4706c964329eb20ad8173e1dbd2d32a
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* ap_ldap_rebind.c -- LDAP rebind callbacks for referrals
*
* The LDAP SDK allows a callback to be set to enable rebinding
* for referral processing.
*
*/
#include "apr.h"
#include "ap_config.h"
#include "ap_ldap.h"
#if AP_HAS_LDAP
#include "apr_errno.h"
#include "apr_strings.h"
#include "stdio.h"
/* Used to store information about connections for use in the referral rebind callback. */
struct ap_ldap_rebind_entry {
const char *bindDN;
const char *bindPW;
struct ap_ldap_rebind_entry *next;
};
typedef struct ap_ldap_rebind_entry ap_ldap_rebind_entry_t;
#ifdef NETWARE
#define get_apd \
#endif
#if APR_HAS_THREADS
#endif
{
return APR_SUCCESS;
}
/* AP utility routine used to create the xref_lock. */
{
#ifdef NETWARE
#endif
/* run after apr_thread_mutex_create cleanup */
#if APR_HAS_THREADS
if (ap_ldap_xref_lock == NULL) {
}
#endif
return(retcode);
}
const char *bindDN,
const char *bindPW)
{
#ifdef NETWARE
#endif
if (new_xref) {
if (bindDN) {
}
if (bindPW) {
}
#if APR_HAS_THREADS
if (retcode != APR_SUCCESS) {
return retcode;
}
#endif
#if APR_HAS_THREADS
if (retcode != APR_SUCCESS) {
return retcode;
}
#endif
}
else {
return(APR_ENOMEM);
}
if (APR_SUCCESS != retcode) {
return retcode;
}
return(APR_SUCCESS);
}
{
apr_status_t retcode = 0;
#ifdef NETWARE
#endif
#if APR_HAS_THREADS
if (retcode != APR_SUCCESS) {
return retcode;
}
#endif
}
if (tmp_xref) {
}
else {
}
/* tmp_xref and its contents were pool allocated so they don't need to be freed here. */
/* remove the cleanup, just in case this was done manually */
}
#if APR_HAS_THREADS
if (retcode != APR_SUCCESS) {
return retcode;
}
#endif
return APR_SUCCESS;
}
{
return APR_SUCCESS;
}
{
#ifdef NETWARE
#endif
#if APR_HAS_THREADS
#endif
while (tmp_xref) {
}
else {
}
}
#if APR_HAS_THREADS
#endif
return (match);
}
#endif
/* LDAP_rebindproc() Tivoli LDAP style
* Rebind callback function. Called when chasing referrals. See API docs.
* ON ENTRY:
* ld Pointer to an LDAP control structure. (input only)
* binddnp Pointer to an Application DName used for binding (in *or* out)
* passwdp Pointer to the password associated with the DName (in *or* out)
* methodp Pointer to the Auth method (output only)
* freeit Flag to indicate if this is a lookup or a free request (input only)
*/
{
if (!freeit) {
} else {
}
} else {
if (*binddnp) {
}
if (*passwdp) {
}
}
return LDAP_SUCCESS;
}
{
return APR_SUCCESS;
}
/* LDAP_rebindproc() openLDAP V3 style
* ON ENTRY:
* ld Pointer to an LDAP control structure. (input only)
* url Unused in this routine
* request Unused in this routine
* msgid Unused in this routine
* params Unused in this routine
*
* or
*
* ld Pointer to an LDAP control structure. (input only)
* url Unused in this routine
* request Unused in this routine
* msgid Unused in this routine
*/
#if defined(LDAP_SET_REBIND_PROC_THREE)
#else
#endif
{
}
}
{
#if defined(LDAP_SET_REBIND_PROC_THREE)
#else
#endif
return APR_SUCCESS;
}
/* LDAP_rebindproc() openLDAP V3 style
* ON ENTRY:
* ld Pointer to an LDAP control structure. (input only)
* url Unused in this routine
* request Unused in this routine
* msgid Unused in this routine
*/
{
}
}
{
return APR_SUCCESS;
}
#else /* Implementation not recognised */
{
return APR_ENOTIMPL;
}
#endif
#endif /* AP_HAS_LDAP */