File: bug1106784_Fix-LDAP-SASL-auth-support.patch

package info (click to toggle)
dovecot 1%3A2.4.1%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 46,280 kB
  • sloc: ansic: 596,203; makefile: 7,825; sh: 6,005; cpp: 1,866; perl: 487; yacc: 412; lex: 320; python: 253; xml: 232
file content (39 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 09cc148e4bbbae91514b6ff58bd71c15f95e4e8a Mon Sep 17 00:00:00 2001
From: Jakob Haufe <sur5r@sur5r.net>
Date: Sun, 25 May 2025 15:04:50 +0200
Subject: [PATCH] Fix LDAP SASL auth support

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.
---
 src/auth/db-ldap-settings.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/auth/db-ldap-settings.c b/src/auth/db-ldap-settings.c
index 6c8feb334e..9245fcabd2 100644
--- a/src/auth/db-ldap-settings.c
+++ b/src/auth/db-ldap-settings.c
@@ -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)
-- 
2.47.2