From: Timo Sirainen Date: Mon, 2 Jun 2025 17:42:03 +0000 (+0300) Subject: auth: Fix LDAP SASL support X-Git-Tag: 2.4.2~714 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=431e328b3b035ddb187526cd13bccf29833aed90;p=thirdparty%2Fdovecot%2Fcore.git auth: Fix LDAP SASL support The settings code didn't see the necessary defines. Based on patch by Jakob Haufe Broken by 961275fdb54878fdfa4ee1b9f1a4f00e82bf4a83 --- diff --git a/src/auth/db-ldap-settings.h b/src/auth/db-ldap-settings.h index dc341dd394..a5f2d09fa3 100644 --- a/src/auth/db-ldap-settings.h +++ b/src/auth/db-ldap-settings.h @@ -1,6 +1,20 @@ #ifndef DB_LDAP_SETTINGS_H #define DB_LDAP_SETTINGS_H +/* */ +#define HAVE_LDAP_SASL +#ifdef HAVE_SASL_SASL_H +# include +#elif defined (HAVE_SASL_H) +# include +#else +# undef HAVE_LDAP_SASL +#endif +#if !defined(SASL_VERSION_MAJOR) || SASL_VERSION_MAJOR < 2 +# undef HAVE_LDAP_SASL +#endif +/* */ + enum db_ldap_lookup_type { DB_LDAP_LOOKUP_TYPE_PASSDB, DB_LDAP_LOOKUP_TYPE_USERDB, diff --git a/src/auth/db-ldap.c b/src/auth/db-ldap.c index 9dcebedd57..302faf38f4 100644 --- a/src/auth/db-ldap.c +++ b/src/auth/db-ldap.c @@ -22,20 +22,9 @@ #include -#define HAVE_LDAP_SASL -#ifdef HAVE_SASL_SASL_H -# include -#elif defined (HAVE_SASL_H) -# include -#else -# undef HAVE_LDAP_SASL -#endif #ifdef LDAP_OPT_X_TLS # define OPENLDAP_TLS_OPTIONS #endif -#if !defined(SASL_VERSION_MAJOR) || SASL_VERSION_MAJOR < 2 -# undef HAVE_LDAP_SASL -#endif #ifndef LDAP_SASL_QUIET # define LDAP_SASL_QUIET 0 /* Doesn't exist in Solaris LDAP */