[PATCH] Fix LDAP SASL auth support
authorJakob Haufe <sur5r@sur5r.net>
Sun, 25 May 2025 13:04:50 +0000 (15:04 +0200)
committerNoah Meyerhans <noahm@debian.org>
Wed, 18 Jun 2025 14:01:58 +0000 (10:01 -0400)
961275fdb54878fdfa4ee1b9f1a4f00e82bf4a83 moved code without creating a
way to have HAVE_LDAP_SASL defined there.

Copy the preprocessor block from src/auth/db-ldap.c to fix this.

Gbp-Pq: Name bug1106784_Fix-LDAP-SASL-auth-support.patch

src/auth/db-ldap-settings.c

index 6c8feb334e3edba357c1c72ee01e0133a63c7b1b..9245fcabd2304c2317122153b66fc2a32cc59f42 100644 (file)
@@ -137,6 +137,18 @@ const struct setting_parser_info ldap_post_setting_parser_info = {
 
 /* <settings checks> */
 
+#define HAVE_LDAP_SASL
+#ifdef HAVE_SASL_SASL_H
+#  include <sasl/sasl.h>
+#elif defined (HAVE_SASL_H)
+#  include <sasl.h>
+#else
+#  undef HAVE_LDAP_SASL
+#endif
+#if !defined(SASL_VERSION_MAJOR) || SASL_VERSION_MAJOR < 2
+#  undef HAVE_LDAP_SASL
+#endif
+
 static int ldap_parse_deref(const char *str, int *ref_r)
 {
        if (strcasecmp(str, "never") == 0)