1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * The APR LDAP rebind functions provide an implementation of
19 * a rebind procedure that can be used to allow clients to chase referrals,
20 * using the same credentials used to log in originally.
22 * Use of this implementation is optional.
24 * @file apu_ldap_rebind.h
25 * @brief Apache LDAP library
28 #ifndef APU_LDAP_REBIND_H
29 #define APU_LDAP_REBIND_H
32 * Handle the case when LDAP is enabled
37 * APR LDAP initialize rebind lock
39 * This function creates the lock for controlling access to the xref list..
40 * @param pool Pool to use when creating the xref_lock.
42 APU_DECLARE_LDAP(apr_status_t
) apr_ldap_rebind_init(apr_pool_t
*pool
);
46 * APR LDAP rebind_add function
48 * This function creates a cross reference entry for the specified ldap
49 * connection. The rebind callback function will look up this ldap
50 * connection so it can retrieve the bindDN and bindPW for use in any
51 * binds while referrals are being chased.
53 * This function will add the callback to the LDAP handle passed in.
55 * A cleanup is registered within the pool provided to remove this
56 * entry when the pool is removed. Alternatively apr_ldap_rebind_remove()
57 * can be called to explicitly remove the entry at will.
59 * @param pool The pool to use
60 * @param ld The LDAP connectionhandle
61 * @param bindDN The bind DN to be used for any binds while chasing
62 * referrals on this ldap connection.
63 * @param bindPW The bind Password to be used for any binds while
64 * chasing referrals on this ldap connection.
66 APU_DECLARE_LDAP(apr_status_t
) apr_ldap_rebind_add(apr_pool_t
*pool
,
72 * APR LDAP rebind_remove function
74 * This function removes the rebind cross reference entry for the
75 * specified ldap connection.
77 * If not explicitly removed, this function will be called automatically
78 * when the pool is cleaned up.
80 * @param ld The LDAP connectionhandle
82 APU_DECLARE_LDAP(apr_status_t
) apr_ldap_rebind_remove(LDAP
*ld
);
84 #endif /* APR_HAS_LDAP */
86 #endif /* APU_LDAP_REBIND_H */