From: Howard Chu Date: Fri, 6 Aug 1999 13:16:26 +0000 (+0000) Subject: For dynamic modules, must explicitly zero BackendInfo structure in X-Git-Tag: TWEB_OL_BASE~270 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03b58cc9cfb7f46d90e76cbd5d1f2b763830174d;p=openldap For dynamic modules, must explicitly zero BackendInfo structure in init_module. Since it's a local var, you have no idea what kind of garbage is sitting in important function pointers... --- diff --git a/servers/slapd/back-bdb2/init.c b/servers/slapd/back-bdb2/init.c index 593405061b..8db6191557 100644 --- a/servers/slapd/back-bdb2/init.c +++ b/servers/slapd/back-bdb2/init.c @@ -16,6 +16,7 @@ G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "bdb2"; bi.bi_init = bdb2_back_initialize; diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 63cbf896a3..025b974a61 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -36,6 +36,7 @@ G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "ldap"; bi.bi_init = ldap_back_initialize; diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index 4a95b5bf93..72a0482aa3 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -16,6 +16,7 @@ G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "ldbm"; bi.bi_init = ldbm_back_initialize; diff --git a/servers/slapd/back-passwd/init.c b/servers/slapd/back-passwd/init.c index ea41064bf3..5beac7415f 100644 --- a/servers/slapd/back-passwd/init.c +++ b/servers/slapd/back-passwd/init.c @@ -15,6 +15,7 @@ G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "passwd"; bi.bi_init = passwd_back_initialize; diff --git a/servers/slapd/back-perl/init.c b/servers/slapd/back-perl/init.c index c1b85fd090..6632f0acb2 100644 --- a/servers/slapd/back-perl/init.c +++ b/servers/slapd/back-perl/init.c @@ -34,6 +34,7 @@ ldap_pvt_thread_mutex_t perl_interpreter_mutex; G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "perl"; bi.bi_init = perl_back_initialize; diff --git a/servers/slapd/back-shell/init.c b/servers/slapd/back-shell/init.c index d5d1be0538..8a04ef4f1f 100644 --- a/servers/slapd/back-shell/init.c +++ b/servers/slapd/back-shell/init.c @@ -15,6 +15,7 @@ G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "shell"; bi.bi_init = shell_back_initialize; diff --git a/servers/slapd/back-tcl/tcl_init.c b/servers/slapd/back-tcl/tcl_init.c index d807164d4c..956b9e5c84 100644 --- a/servers/slapd/back-tcl/tcl_init.c +++ b/servers/slapd/back-tcl/tcl_init.c @@ -1,6 +1,6 @@ /* tcl_init.c - tcl backend initialization * - * $Id: tcl_init.c,v 1.8 1999/06/24 15:06:42 bastiaan Exp $ + * $Id: tcl_init.c,v 1.9 1999/07/05 04:26:30 kdz Exp $ * * Copyright 1999, Ben Collins , All rights reserved. * @@ -27,6 +27,7 @@ ldap_pvt_thread_mutex_t tcl_interpreter_mutex; G_MODULE_EXPORT void init_module(int argc, char *argv[]) { BackendInfo bi; + memset( &bi, 0, sizeof(bi) ); bi.bi_type = "tcl"; bi.bi_init = tcl_back_initialize;