summaryrefslogtreecommitdiffstats
path: root/debian/patches/do-not-second-guess-sonames
blob: a5fb3281b286056259f708c5c18f6388a5a459e2 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Rip out code that second-guesses the libsasl soname / Debian shlibs.  If
cyrus sasl upstream is breaking the ABI, this needs to be fixed upstream
there, not kludged around upstream here!

Debian bug #546885

Upstream ITS #6302 filed.

Index: openldap/libraries/libldap/cyrus.c
===================================================================
--- openldap.orig/libraries/libldap/cyrus.c	2022-05-20 17:36:13.661247231 -0400
+++ openldap/libraries/libldap/cyrus.c	2022-05-20 17:36:13.661247231 -0400
@@ -74,29 +74,6 @@
  */
 int ldap_int_sasl_init( void )
 {
-#ifdef HAVE_SASL_VERSION
-	/* stringify the version number, sasl.h doesn't do it for us */
-#define VSTR0(maj, min, pat)	#maj "." #min "." #pat
-#define VSTR(maj, min, pat)	VSTR0(maj, min, pat)
-#define SASL_VERSION_STRING	VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
-				SASL_VERSION_STEP)
-	{ int rc;
-	sasl_version( NULL, &rc );
-	if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
-		(rc & 0xffff) < SASL_VERSION_STEP) {
-		char version[sizeof("xxx.xxx.xxxxx")];
-		sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
-			rc & 0xffff );
-
-		Debug1( LDAP_DEBUG_ANY,
-		"ldap_int_sasl_init: SASL library version mismatch:"
-		" expected " SASL_VERSION_STRING ","
-		" got %s\n", version );
-		return -1;
-	}
-	}
-#endif
-
 /* SASL 2 takes care of its own memory completely internally */
 #if SASL_VERSION_MAJOR < 2 && !defined(CSRIMALLOC)
 	sasl_set_alloc(
Index: openldap/servers/slapd/sasl.c
===================================================================
--- openldap.orig/servers/slapd/sasl.c	2022-05-20 17:36:13.661247231 -0400
+++ openldap/servers/slapd/sasl.c	2022-05-20 17:36:13.661247231 -0400
@@ -1271,26 +1271,6 @@
 	rewrite_mapper_register( &slapd_mapper );
 
 #ifdef HAVE_CYRUS_SASL
-#ifdef HAVE_SASL_VERSION
-	/* stringify the version number, sasl.h doesn't do it for us */
-#define	VSTR0(maj, min, pat)	#maj "." #min "." #pat
-#define	VSTR(maj, min, pat)	VSTR0(maj, min, pat)
-#define	SASL_VERSION_STRING	VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
-				SASL_VERSION_STEP)
-
-	sasl_version( NULL, &rc );
-	if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
-		(rc & 0xffff) < SASL_VERSION_STEP)
-	{
-		char version[sizeof("xxx.xxx.xxxxx")];
-		sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
-			rc & 0xffff );
-		Debug( LDAP_DEBUG_ANY, "slap_sasl_init: SASL library version mismatch:"
-			" expected %s, got %s\n",
-			SASL_VERSION_STRING, version );
-		return -1;
-	}
-#endif
 
 	sasl_set_mutex(
 		ldap_pvt_sasl_mutex_new,