From d0edb478964cb5bf7446c34d5ac1e9d34dc5ca63 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 11 Aug 2007 20:57:54 +0000 Subject: Patrick Monnerat modified the LDAP code and approach in curl. Starting now, the configure script checks for openldap and friends and we link with those libs just like we link all other third party libraries, and we no longer dlopen() those libraries. Our private header file lib/ldap.h was renamed to lib/curl_ldap.h due to this. I set a tag in CVS (curl-7_17_0-preldapfix) just before this commit, just in case. --- lib/curl_ldap.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/curl_ldap.h (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h new file mode 100644 index 000000000..071cbcb43 --- /dev/null +++ b/lib/curl_ldap.h @@ -0,0 +1,29 @@ +#ifndef __CURL_LDAP_H +#define __CURL_LDAP_H + +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ +#ifndef CURL_DISABLE_LDAP +CURLcode Curl_ldap(struct connectdata *conn, bool *done); +#endif +#endif /* __CURL_LDAP_H */ -- cgit v1.2.1 From 07b6e7363d910ad4828376d568a2f19fd8d64661 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 12 Oct 2007 13:36:37 +0000 Subject: Added per-protocol callback static tables, replacing callback ptr storage in the connectdata structure by a single handler table ptr. --- lib/curl_ldap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h index 071cbcb43..7813ae70b 100644 --- a/lib/curl_ldap.h +++ b/lib/curl_ldap.h @@ -24,6 +24,11 @@ * $Id$ ***************************************************************************/ #ifndef CURL_DISABLE_LDAP -CURLcode Curl_ldap(struct connectdata *conn, bool *done); +extern const struct Curl_handler Curl_handler_ldap; + +#ifdef HAVE_LDAP_SSL +extern const struct Curl_handler Curl_handler_ldaps; +#endif + #endif #endif /* __CURL_LDAP_H */ -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- lib/curl_ldap.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h index 7813ae70b..1f28afee0 100644 --- a/lib/curl_ldap.h +++ b/lib/curl_ldap.h @@ -21,7 +21,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #ifndef CURL_DISABLE_LDAP extern const struct Curl_handler Curl_handler_ldap; -- cgit v1.2.1 From 2e056353b00d0944bdb2f8e948cc40a4dc0f3dfb Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 25 May 2010 00:44:42 +0200 Subject: LDAP: properly implemented as a curl_handler makes the LDAP code much cleaner, nicer and in general being a better libcurl citizen. If a new enough OpenLDAP version is detect, the new and shiny lib/openldap.c code is then used instead of the old cruft Code by Howard, minor cleanups by Daniel. --- lib/curl_ldap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h index 1f28afee0..a2b167fa0 100644 --- a/lib/curl_ldap.h +++ b/lib/curl_ldap.h @@ -22,10 +22,10 @@ * KIND, either express or implied. * ***************************************************************************/ -#ifndef CURL_DISABLE_LDAP +#if !defined(CURL_DISABLE_LDAP) || defined(USE_OPENLDAP) extern const struct Curl_handler Curl_handler_ldap; -#ifdef HAVE_LDAP_SSL +#if defined(HAVE_LDAP_SSL) || defined(USE_OPENLDAP) extern const struct Curl_handler Curl_handler_ldaps; #endif -- cgit v1.2.1 From 89da5324457070cb4a7391c48c6c4f84ed7fe964 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 1 Jun 2010 17:25:03 +0200 Subject: fix ldap related compilation issues --- lib/curl_ldap.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h index a2b167fa0..3cce4bf7b 100644 --- a/lib/curl_ldap.h +++ b/lib/curl_ldap.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,10 +22,11 @@ * KIND, either express or implied. * ***************************************************************************/ -#if !defined(CURL_DISABLE_LDAP) || defined(USE_OPENLDAP) +#ifndef CURL_DISABLE_LDAP extern const struct Curl_handler Curl_handler_ldap; -#if defined(HAVE_LDAP_SSL) || defined(USE_OPENLDAP) +#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \ + (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)) extern const struct Curl_handler Curl_handler_ldaps; #endif -- cgit v1.2.1 From 29f0898525bf48292606f098bee33ce8f1f58781 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 7 Mar 2011 17:45:33 -0800 Subject: Fixed libcurl to honour the --disable-ldaps configure option --- lib/curl_ldap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/curl_ldap.h') diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h index 3cce4bf7b..4cd13cfd2 100644 --- a/lib/curl_ldap.h +++ b/lib/curl_ldap.h @@ -25,8 +25,9 @@ #ifndef CURL_DISABLE_LDAP extern const struct Curl_handler Curl_handler_ldap; -#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \ - (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)) +#if !defined(CURL_DISABLE_LDAPS) && \ + ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \ + (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))) extern const struct Curl_handler Curl_handler_ldaps; #endif -- cgit v1.2.1