]> git.sur5r.net Git - openldap/commitdiff
Don't init SASL library until we actually want a SASL session
authorHoward Chu <hyc@openldap.org>
Wed, 3 Dec 2003 01:59:33 +0000 (01:59 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 3 Dec 2003 01:59:33 +0000 (01:59 +0000)
libraries/libldap/cyrus.c
libraries/libldap/init.c

index ca39f2e8619379a220a9dfb631b93d75564421cc..339d21dc8720d94d1e82fc8942bd7627cbd900a0 100644 (file)
@@ -499,6 +499,11 @@ ldap_int_sasl_open(
                return ld->ld_errno;
        }
 
+       if ( ldap_int_sasl_init() ) {
+               ld->ld_errno = LDAP_LOCAL_ERROR;
+               return ld->ld_errno;
+       }
+
 #if SASL_VERSION_MAJOR >= 2
        rc = sasl_client_new( "ldap", host, NULL, NULL,
                NULL, 0, &ctx );
index de918e836ecbbdcb44c19161f673382dc1e91286..9e80c815bcb49b62d0103bd897fe1106f38e18b6 100644 (file)
@@ -611,6 +611,4 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
        }
 
        openldap_ldap_init_w_env(gopts, NULL);
-
-       ldap_int_sasl_init();
 }