From dc19332bb9db142c52b580e3f74a6c20d5c8ef23 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 3 Dec 2003 01:59:33 +0000 Subject: [PATCH] Don't init SASL library until we actually want a SASL session --- libraries/libldap/cyrus.c | 5 +++++ libraries/libldap/init.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index ca39f2e861..339d21dc87 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -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 ); diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index de918e836e..9e80c815bc 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -611,6 +611,4 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl ) } openldap_ldap_init_w_env(gopts, NULL); - - ldap_int_sasl_init(); } -- 2.39.5