util_ldap.h revision 6efdaed03d9670667ac618dc67b33156d4ef9f72
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd/* ====================================================================
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * The Apache Software License, Version 1.1
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * reserved.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * Redistribution and use in source and binary forms, with or without
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * modification, are permitted provided that the following conditions
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * are met:
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * 1. Redistributions of source code must retain the above copyright
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * notice, this list of conditions and the following disclaimer.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * 2. Redistributions in binary form must reproduce the above copyright
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * notice, this list of conditions and the following disclaimer in
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * the documentation and/or other materials provided with the
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * distribution.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * 3. The end-user documentation included with the redistribution,
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * if any, must include the following acknowledgment:
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * "This product includes software developed by the
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * Apache Software Foundation (http://www.apache.org/)."
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * Alternately, this acknowledgment may appear in the software itself,
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * if and wherever such third-party acknowledgments normally appear.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * 4. The names "Apache" and "Apache Software Foundation" must
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * not be used to endorse or promote products derived from this
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * software without prior written permission. For written
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * permission, please contact apache@apache.org.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * 5. Products derived from this software may not be called "Apache",
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * nor may "Apache" appear in their name, without prior written
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * permission of the Apache Software Foundation.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * SUCH DAMAGE.
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * ====================================================================
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * This software consists of voluntary contributions made by many
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * individuals on behalf of the Apache Software Foundation. For more
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * information on the Apache Software Foundation, please see
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd/* this whole thing disappears if LDAP is not enabled */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd/* APR header files */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd/* Apache header files */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd * LDAP Connections
a751155a30bbd9ccb739c1b052635b14d39038c2wrowe/* Values that the deref member can have */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5ndtypedef enum {
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd/* Structure representing an LDAP connection */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5ndtypedef struct util_ldap_connection_t {
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd apr_pool_t *pool; /* Pool from which this connection is created */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd apr_thread_mutex_t *lock; /* Lock to indicate this connection is in use */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd int bound; /* Flag to indicate whether this connection is bound yet */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd const char *host; /* Name of the LDAP server (or space separated list) */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd deref_options deref; /* how to handle alias dereferening */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd const char *binddn; /* DN to bind to server (can be NULL) */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd const char *bindpw; /* Password to bind to server (can be NULL) */
5f687b4bc4c5a435a683711d3b4bfa5791aeb2a5nd int netscapessl; /* True if use Netscape SSL connection */
typedef struct util_ldap_state_t {
#ifdef APU_HAS_LDAP_NETSCAPE_SSL
int have_certdb;
* @deffunc util_ldap_connection_t *util_ldap_connection_find(request_rec *r, const char *host, int port,
int compare_dn_on_server);
/* from apr_ldap_cache.c */
/* from apr_ldap_cache_mgr.c */