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...
This commit is contained in:
Howard Chu 1999-08-06 13:16:26 +00:00
parent 496f9b1476
commit 03b58cc9cf
7 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 <bcollins@debian.org>, 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;