MacOS Homebrew offers Cyrus SASL.
$3],[$4])
AS_VAR_POPDEF([ac_Search])dnl
])
-
-dnl Check for Cyrus SASL
-AC_DEFUN([SQUID_CHECK_SASL],[
- squid_cv_check_sasl="auto"
- AC_CHECK_HEADERS([sasl/sasl.h sasl.h])
- AC_CHECK_LIB(sasl2,sasl_errstring,[LIBSASL="-lsasl2"],[
- AC_CHECK_LIB(sasl,sasl_errstring,[LIBSASL="-lsasl"], [
- squid_cv_check_sasl="no"
- ])
- ])
- AS_IF([test "$squid_host_os" = "darwin"],[
- AS_IF([test "$ac_cv_lib_sasl2_sasl_errstring" = "yes"],[
- AC_DEFINE(HAVE_SASL_DARWIN,1,[Define to 1 if Mac Darwin without sasl.h])
- echo "checking for MAC Darwin without sasl.h ... yes"
- squid_cv_check_sasl="yes"
- ],[
- echo "checking for MAC Darwin without sasl.h ... no"
- squid_cv_check_sasl="no"
- ])
- ])
- AS_IF([test "x$squid_cv_check_sasl" = "xno"],[
- AC_MSG_WARN([Neither SASL nor SASL2 found])
- ],[
- squid_cv_check_sasl="yes"
- ])
- AC_SUBST(LIBSASL)
-])
SQUID_STATE_ROLLBACK(squid_ldap_state)
])
+SQUID_AUTO_LIB(sasl,[Cyrus SASL],[LIBSASL])
+SQUID_CHECK_LIB_WORKS([sasl],[
+ SQUID_STATE_SAVE(sasl_state)
+ PKG_CHECK_MODULES([LIBSASL],[libsasl2],[:],[:])
+ CPPFLAGS="$LIBSASL_CFLAGS $CPPFLAGS"
+ LIBS="$LIBSASL_LIBS $LIBS"
+ AC_CHECK_HEADERS([sasl/sasl.h sasl.h])
+ SQUID_STATE_ROLLBACK(sasl_state)
+])
+
SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD])
SQUID_CHECK_LIB_WORKS(systemd,[
SQUID_STATE_SAVE(squid_systemd_state)
<tag>--without-psapi</tag>
<p>Disable auto-detection of Windows PSAPI library.
+ <tag>--without-sasl</tag>
+ <p>Disable auto-detection of Cyrus SASL (or compatible) library.
+
<tag>CPPFLAGS=-DINCOMING_FACTOR=</tag>
<p>Control the listening sockets responsiveness with poll(2) and select(2).
The higher the INCOMING_FACTOR, the slower the algorithm will
$(LIBHEIMDAL_KRB5_LIBS) \
$(LIBLDAP_LIBS) \
$(LIBMIT_KRB5_LIBS) \
- $(LIBSASL) \
+ $(LIBSASL_LIBS) \
$(XTRA_LIBS)
##
AS_IF([test "x$LIBMIT_KRB5_LIBS" != "x" -o "x$LIBHEIMDAL_KRB5_LIBS" != "x" -o "x$LIBGSS_LIBS" != "x"],[
- SQUID_CHECK_SASL
- AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="kerberos_ldap_group"])
+ AS_IF([test "x$LIBLDAP_LIBS" != "x" -a "x$LIBSASL_LIBS" != "x"],[
+ BUILD_HELPER="kerberos_ldap_group"
+ ])
])
size_t get_hostname_list(struct hstruct **hlist, size_t nhosts, char *name);
size_t free_hostname_list(struct hstruct **hlist, size_t nhosts);
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
int tool_sasl_bind(LDAP * ld, char *binddn, char *ssl);
#endif
#if HAVE_SUN_LDAP_SDK || HAVE_MOZILLA_LDAP_SDK
#if HAVE_LDAP_REBINDPROC_CALLBACK
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
static LDAP_REBINDPROC_CALLBACK ldap_sasl_rebind;
static int LDAP_CALL LDAP_CALLBACK
nullptr);
}
#elif HAVE_LDAP_REBIND_PROC
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
static LDAP_REBIND_PROC ldap_sasl_rebind;
static int
struct ldap_creds *cp = (struct ldap_creds *) params;
return tool_sasl_bind(ld, cp->dn, cp->pw);
}
-#endif /* HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN */
+#endif /* HAVE_SASL_H || HAVE_SASL_SASL_H */
static LDAP_REBIND_PROC ldap_simple_rebind;
#ifndef LDAP_REFERRALS
#define LDAP_REFERRALS
#endif /* LDAP_REFERRALS */
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
static LDAP_REBIND_FUNCTION ldap_sasl_rebind;
static int
#error "No rebind functione defined"
#endif
#else /* HAVE_SUN_LDAP_SDK */
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
static LDAP_REBIND_PROC ldap_sasl_rebind;
static int
* ldap bind with SASL/GSSAPI authentication (only possible if a domain was part of the username)
*/
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
debug((char *)
"%s| %s: DEBUG: Bind to ldap server with SASL/GSSAPI\n",
LogTime(), PROGRAM);
#include <sasl.h>
#elif HAVE_SASL_SASL_H
#include <sasl/sasl.h>
-#elif HAVE_SASL_DARWIN
-typedef struct sasl_interact {
- unsigned long id; /* same as client/user callback ID */
- const char *challenge; /* presented to user (e.g. OTP challenge) */
- const char *prompt; /* presented to user (e.g. "Username: ") */
- const char *defresult; /* default result string */
- const void *result; /* set to point to result */
- unsigned len; /* set to length of result */
-} sasl_interact_t;
-
-#define SASL_CB_USER 0x4001 /* client user identity to login as */
-#define SASL_CB_AUTHNAME 0x4002 /* client authentication name */
-#define SASL_CB_PASS 0x4004 /* client passphrase-based secret */
-#define SASL_CB_ECHOPROMPT 0x4005 /* challenge and client enterred result */
-#define SASL_CB_NOECHOPROMPT 0x4006 /* challenge and client enterred result */
-#define SASL_CB_GETREALM 0x4008 /* realm to attempt authentication in */
-#define SASL_CB_LIST_END 0 /* end of list */
#endif
-#if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN
+#if HAVE_SASL_H || HAVE_SASL_SASL_H
void *lutil_sasl_defaults(
LDAP * ld,
char *mech,
basic_sasl_auth_LDADD= \
$(top_builddir)/lib/libmiscencoding.la \
$(COMPAT_LIB) \
- $(LIBSASL) \
+ $(LIBSASL_LIBS) \
$(XTRA_LIBS)
EXTRA_DIST= \
## Please see the COPYING and CONTRIBUTORS files for details.
##
-SQUID_CHECK_SASL
-AS_IF([test "x$squid_cv_check_sasl" = "xyes"],[BUILD_HELPER="SASL"])
+AS_IF([test "x$LIBSASL_LIBS" != "x"],[BUILD_HELPER="SASL"])