Skip to content

Commit 13bcb18

Browse files
committed
Maintenance: update --with-ldap detection
Remove Mosilla LDAP SDK support which has apparently not been maintained since 2017.
1 parent 82c9e1f commit 13bcb18

File tree

11 files changed

+30
-47
lines changed

11 files changed

+30
-47
lines changed

acinclude/ldap.m4

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ AC_DEFUN([SQUID_LDAP_TEST],[
1212
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
1313
CPPFLAGS="-DLDAP_DEPRECATED=1 -DLDAP_REFERRALS $CPPFLAGS"
1414
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
15-
# if HAVE_LDAP_H
16-
# include <ldap.h>
17-
# elif HAVE_MOZLDAP_LDAP_H
18-
# include <mozldap/ldap.h>
19-
# endif
15+
#if HAVE_LDAP_H
16+
#include <ldap.h>
17+
#endif
2018
]],[[$2]])
2119
],[
2220
squid_cv_$1=1
@@ -37,12 +35,12 @@ AC_DEFUN([SQUID_LDAP_TEST_RUN],[
3735
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
3836
CPPFLAGS="-DLDAP_DEPRECATED=1 -DLDAP_REFERRALS $CPPFLAGS"
3937
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
40-
# if HAVE_LDAP_H
41-
# include <ldap.h>
42-
# elif HAVE_MOZLDAP_LDAP_H
43-
# include <mozldap/ldap.h>
44-
# endif
45-
# include <string.h>
38+
#if HAVE_LDAP_H
39+
#include <ldap.h>
40+
#endif
41+
#if HAVE_STRING_H
42+
#include <string.h>
43+
#endif
4644
]],[[$2]])
4745
],[
4846
m4_translit([squid_cv_$1],[-+. ],[____])=1
@@ -61,7 +59,6 @@ dnl find the LDAP library vendor and define relevant HAVE_(vendor name) macro
6159
AC_DEFUN([SQUID_LDAP_CHECK_VENDOR],[
6260
SQUID_LDAP_TEST_RUN([OpenLDAP],[return strcmp(LDAP_VENDOR_NAME,"OpenLDAP")])
6361
SQUID_LDAP_TEST_RUN([Sun LDAP SDK],[return strcmp(LDAP_VENDOR_NAME,"Sun Microsystems Inc.")])
64-
SQUID_LDAP_TEST_RUN([Mozilla LDAP SDK],[return strcmp(LDAP_VENDOR_NAME,"mozilla.org")])
6562
])
6663

6764
dnl check whether the LDAP library(s) provide the needed API and types
@@ -99,5 +96,4 @@ AC_DEFUN([SQUID_CHECK_LDAP_API],[
9996
AC_SEARCH_LIBS([ldap_start_tls_s],[$LIBLDAP_NAMES],[
10097
AC_DEFINE(HAVE_LDAP_START_TLS_S,1,[Define to 1 if you have ldap_start_tls_s])
10198
])
102-
SQUID_STATE_ROLLBACK(squid_ldap_state)
10399
])

configure.ac

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,33 +1219,19 @@ SQUID_CHECK_LIB_WORKS(gss,[
12191219
])
12201220

12211221
SQUID_AUTO_LIB(ldap,[LDAP],[LIBLDAP])
1222+
dnl On MinGW set Windows LDAP libraries using -lwldap32
1223+
AS_IF([test "x$with_ldap" != "xno" -a "$squid_host_os" = "mingw"],[
1224+
LIBLDAP_LIBS="$LIBLDAP_LIBS -lwldap32"
1225+
])
12221226
SQUID_CHECK_LIB_WORKS(ldap,[
1223-
dnl On MinGW OpenLDAP is not available, so LDAP helpers can be linked
1224-
dnl only with Windows LDAP libraries using -lwldap32
1225-
AS_IF([test "$squid_host_os" = "mingw"],[
1226-
LIBLDAP_LIBS="-lwldap32"
1227-
],[
1228-
SQUID_STATE_SAVE(squid_ldap_state)
1229-
LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS"
1230-
PKG_CHECK_MODULES([LIBLDAP],[ldap],[],[
1231-
AC_CHECK_LIB(lber, ber_init, [LIBLBER="-llber"])
1232-
AC_CHECK_LIB(ldap, ldap_init, [LIBLDAP_LIBS="-lldap $LIBLBER"])
1233-
dnl if no ldap lib found check for mozilla version
1234-
AS_IF([test "x$ac_cv_lib_ldap_ldap_init" != "xyes"],[
1235-
SQUID_STATE_SAVE(squid_ldap_mozilla)
1236-
LIBS="$LIBLDAP_PATH $LIBPTHREADS"
1237-
AC_CHECK_LIB(ldap60, ldap_init, [LIBLDAP_LIBS="-lldap60 $LIBLBER"])
1238-
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
1239-
AC_CHECK_LIB(prldap60, prldap_init, [LIBLDAP_LIBS="-lprldap60 $LIBLDAP_LIBS"])
1240-
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
1241-
AC_CHECK_LIB(ssldap60, ldapssl_init, [LIBLDAP_LIBS="-lssldap60 $LIBLDAP_LIBS"])
1242-
SQUID_STATE_ROLLBACK(squid_ldap_mozilla)
1243-
])
1244-
])
1245-
AC_CHECK_HEADERS(ldap.h lber.h)
1246-
AC_CHECK_HEADERS(mozldap/ldap.h)
1227+
SQUID_STATE_SAVE(squid_ldap_state)
1228+
LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS"
1229+
PKG_CHECK_MODULES([LIBLDAP],[ldap],[:],[:])
1230+
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[
1231+
AC_CHECK_HEADERS(ldap.h lber.h winldap.h)
12471232
SQUID_CHECK_LDAP_API
12481233
])
1234+
SQUID_STATE_ROLLBACK(squid_ldap_state)
12491235
])
12501236

12511237
SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD])

doc/manuals/manuals.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ msgstr ""
772772
#: src/acl/external/kerberos_ldap_group/ext_kerberos_ldap_group_acl.8:80
773773
msgid ""
774774
"The SSL certificate database can be set via the environment variable "
775-
"SSL_CERTDBPATH (default /etc/certs) (Sun and Mozilla LDAP SDK)."
775+
"SSL_CERTDBPATH (default /etc/certs) (Sun LDAP SDK)."
776776
msgstr ""
777777

778778
#. type: Plain text

doc/release-notes/release-7.sgml.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ This section gives an account of those changes in three categories:
209209
<p>The ESI feature is now disabled by default.
210210
Use <em>--enable-esi</em> if needed.
211211

212+
<tag>--with-ldap</tag>
213+
<p>No longer builds with Mozilla LDAP SDK.
214+
212215
</descrip>
213216
</p>
214217

src/acl/external/LDAP_group/required.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
## Please see the COPYING and CONTRIBUTORS files for details.
66
##
77

8-
AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="LDAP_group"])
8+
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="LDAP_group"])

src/acl/external/eDirectory_userip/required.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
## Please see the COPYING and CONTRIBUTORS files for details.
66
##
77

8-
AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="eDirectory_userip"])
8+
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="eDirectory_userip"])

src/acl/external/kerberos_ldap_group/ext_kerberos_ldap_group_acl.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Use SSL for the LDAP connection.
7676
.IP
7777
The CA certificate file can be set via the environment variable TLS_CACERTFILE (default /etc/ssl/certs/cert.pem) (OpenLDAP).
7878
.IP
79-
The SSL certificate database can be set via the environment variable SSL_CERTDBPATH (default /etc/certs) (Sun and Mozilla LDAP SDK).
79+
The SSL certificate database can be set via the environment variable SSL_CERTDBPATH (default /etc/certs) (Sun LDAP SDK).
8080
.if !'po4a'hide' .TP 12
8181
.if !'po4a'hide' .B \-a
8282
Allow SSL without certificate verification.

src/acl/external/kerberos_ldap_group/support.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
#if HAVE_LDAP_H
5252
#include <ldap.h>
5353
#endif
54-
#if HAVE_MOZLDAP_LDAP_H
55-
#include <mozldap/ldap.h>
56-
#endif
5754

5855
struct gdstruct {
5956
char *group;

src/acl/external/kerberos_ldap_group/support_ldap.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ size_t get_bin_attributes(LDAP * ld, LDAPMessage * res,
8282
int search_group_tree(struct main_args *margs, LDAP * ld, char *bindp,
8383
char *ldap_group, char *group, int depth);
8484

85-
#if HAVE_SUN_LDAP_SDK || HAVE_MOZILLA_LDAP_SDK
85+
#if HAVE_SUN_LDAP_SDK
86+
8687
#if HAVE_LDAP_REBINDPROC_CALLBACK
8788

8889
#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN

src/auth/basic/LDAP/required.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
## Please see the COPYING and CONTRIBUTORS files for details.
66
##
77

8-
AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="LDAP"])
8+
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="LDAP"])

0 commit comments

Comments
 (0)