File: Use-OpenLDAP-specific-functionality.patch

package info (click to toggle)
curl 7.88.1-10%2Bdeb12u12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,320 kB
  • sloc: ansic: 173,342; perl: 15,803; sh: 5,503; makefile: 1,421; pascal: 744; python: 717; cpp: 167
file content (35 lines) | stat: -rw-r--r-- 1,396 bytes parent folder | download | duplicates (3)
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
Description: Fix Autotools not enabling OpenLDAP-specific functionality
 The non-OpenLDAP code paths are less tested, less featureful, less secure,
 and omitted in the build system by accident. It has been discovered that this
 also mitigates curl not being able to make LDIF output when attributes have
 binary values.
Origin: upstream, https://github.com/curl/curl/commit/0ac6108856b9d500bc376d1d7e0b648d15499837.patch
Bug: https://github.com/curl/curl/issues/11372
Applied-Upstream: 8.2.0, https://github.com/curl/curl/commit/0ac6108856b9d500bc376d1d7e0b648d15499837
Reviewed-By: John Scott <jscott@posteo.net>
Last-Update: 2023-07-25

--- curl-7.88.1.orig/configure.ac
+++ curl-7.88.1/configure.ac
@@ -1663,16 +1663,19 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
 fi

 if test x$CURL_DISABLE_LDAP != x1 ; then
-  AC_CHECK_FUNCS([ldap_url_parse])
+  AC_CHECK_FUNCS([ldap_url_parse \
+                  ldap_init_fd])

   if test "$LDAPLIBNAME" = "wldap32"; then
     curl_ldap_msg="enabled (winldap)"
     AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
   else
-    curl_ldap_msg="enabled (OpenLDAP)"
     if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
+      curl_ldap_msg="enabled (OpenLDAP)"
       AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
       AC_SUBST(USE_OPENLDAP, [1])
+    else
+      curl_ldap_msg="enabled (ancient OpenLDAP)"
     fi
   fi
 fi