do-not-second-guess-sonames
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Sun, 18 Sep 2022 22:29:46 +0000 (23:29 +0100)
committerSergio Durigan Junior <sergiodj@debian.org>
Sun, 18 Sep 2022 22:29:46 +0000 (23:29 +0100)
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.

Gbp-Pq: Name do-not-second-guess-sonames

libraries/libldap/cyrus.c
servers/slapd/sasl.c

index cc925d349d2a7e28d1d82ac466e1b6965e6aaa7b..83413dd1e98f334432e028ddf2f8881238de3391 100644 (file)
@@ -74,29 +74,6 @@ static const sasl_callback_t client_callbacks[] = {
  */
 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 20e2d03e25ddcde8d2b0418efb8fbb3fbd9da783..cb77a9a78945f915c766169b14213d817695cb3a 100644 (file)
@@ -1271,26 +1271,6 @@ int slap_sasl_init( void )
        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,