1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Fix static module list generation for ldb.

(This used to be commit 92c1c0e913)
This commit is contained in:
Jelmer Vernooij 2008-02-20 03:40:44 +01:00
parent 84f69645c2
commit 0020793515
20 changed files with 18 additions and 48 deletions

View File

@ -44,8 +44,14 @@ sub _prepare_build_h($)
$DEFINE->{VAL} .= "\t$_, \\\n";
unless (/{/) {
my $fn = $key->{INIT_FUNCTION_TYPE};
$fn =~ s/\(\*\)/$_/;
$output .= "$fn;\n";
my $n = $_;
if ($fn =~ /\(\*\)/) {
$fn =~ s/\(\*\)/$n/;
$output .= "$fn;\n";
} else {
$n =~ s/\&//;
$output .= "$fn $n;\n";
}
}
}

View File

@ -282,7 +282,6 @@ int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, co
int ret;
const char *url2;
/* We seem to need to do this here, or else some utilities don't get ldb backends */
ldb_global_init();
ldb->flags = flags;

View File

@ -3,7 +3,7 @@
[MODULE::ldb_asq]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
INIT_FUNCTION = ldb_asq_init
INIT_FUNCTION = &ldb_asq_module_ops
SUBSYSTEM = LIBLDB
OBJ_FILES = \
modules/asq.o
@ -15,7 +15,7 @@ OBJ_FILES = \
[MODULE::ldb_server_sort]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
INIT_FUNCTION = ldb_sort_init
INIT_FUNCTION = &ldb_server_sort_module_ops
SUBSYSTEM = LIBLDB
OBJ_FILES = \
modules/sort.o
@ -25,7 +25,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_results]
INIT_FUNCTION = ldb_paged_results_init
INIT_FUNCTION = &ldb_paged_results_module_ops
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@ -37,7 +37,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_searches]
INIT_FUNCTION = ldb_paged_searches_init
INIT_FUNCTION = &ldb_paged_searches_module_ops
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@ -52,7 +52,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
INIT_FUNCTION = ldb_operational_init
INIT_FUNCTION = &ldb_operational_module_ops
OBJ_FILES = \
modules/operational.o
# End MODULE ldb_operational
@ -64,7 +64,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
INIT_FUNCTION = ldb_rdn_name_init
INIT_FUNCTION = &ldb_rdn_name_module_ops
OBJ_FILES = \
modules/rdn_name.o
# End MODULE ldb_rdn_name
@ -88,7 +88,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
INIT_FUNCTION = ldb_skel_init
INIT_FUNCTION = &ldb_skel_module_ops
OBJ_FILES = modules/skel.o
# End MODULE ldb_skel
################################################
@ -99,7 +99,7 @@ OBJ_FILES = modules/skel.o
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC SQLITE3 LIBTALLOC
INIT_FUNCTION = ldb_sqlite3_init
INIT_FUNCTION = &ldb_sqlite3_module_ops
OBJ_FILES = \
ldb_sqlite3/ldb_sqlite3.o
# End MODULE ldb_sqlite3
@ -110,7 +110,6 @@ OBJ_FILES = \
[MODULE::ldb_tdb]
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include -Ilib/ldb/ldb_tdb
INIT_FUNCTION = ldb_tdb_init
OBJ_FILES = \
ldb_tdb/ldb_tdb.o \
ldb_tdb/ldb_search.o \
@ -131,7 +130,7 @@ SO_VERSION = 0
OUTPUT_TYPE = SHARED_LIBRARY
CFLAGS = -Ilib/ldb/include
PC_FILE = ldb.pc
INIT_FUNCTION_TYPE = int (*) (void)
INIT_FUNCTION_TYPE = extern const struct ldb_module_ops
OBJ_FILES = \
common/ldb.o \
common/ldb_ldif.o \

View File

@ -5,7 +5,6 @@ SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBCLI_LDAP CREDENTIALS
INIT_FUNCTION = ldb_ildap_init
ALIASES = ldapi ldaps ldap
OBJ_FILES = \
ldb_ildap.o

View File

@ -455,7 +455,7 @@ static int ps_init(struct ldb_module *module)
return ldb_next_init(module);
}
const struct ldb_module_ops ldb_pages_searches_module_ops = {
const struct ldb_module_ops ldb_paged_searches_module_ops = {
.name = "paged_searches",
.search = ps_search,
.wait = ps_wait,

View File

@ -45,11 +45,6 @@ NSS_STATUS _ldb_nss_init(void)
_ldb_nss_ctx->pid = mypid;
ret = ldb_global_init();
if (ret != 0) {
goto failed;
}
_ldb_nss_ctx->ldb = ldb_init(_ldb_nss_ctx);
if (_ldb_nss_ctx->ldb == NULL) {
goto failed;

View File

@ -656,8 +656,6 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_
const char *target_str;
enum convert_target target;
ldb_global_init();
ctx = talloc_new(NULL);
ldb = ldb_init(ctx);

View File

@ -80,8 +80,6 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
{ NULL }
};
ldb_global_init();
#if (_SAMBA_BUILD_ >= 4)
r = ldb_register_samba_handlers(ldb);
if (r != 0) {

View File

@ -88,8 +88,6 @@ int main(int argc, const char **argv)
int i, ret=0, count=0;
struct ldb_cmdline *options;
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -77,8 +77,6 @@ int main(int argc, const char **argv)
int ret = 0, i;
struct ldb_cmdline *options;
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -279,8 +279,6 @@ int main(int argc, const char **argv)
const char *expression = "(|(objectClass=*)(distinguishedName=*))";
const char * const * attrs = NULL;
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -89,8 +89,6 @@ int main(int argc, const char **argv)
int i, ret=LDB_SUCCESS;
struct ldb_cmdline *options;
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -56,8 +56,6 @@ int main(int argc, const char **argv)
struct ldb_cmdline *options;
struct ldb_dn *dn1, *dn2;
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -276,8 +276,6 @@ int main(int argc, const char **argv)
int ret = -1;
const char *expression = "(|(objectClass=*)(distinguishedName=*))";
ldb_global_init();
ldb = ldb_init(NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -393,8 +393,6 @@ int main(int argc, const char **argv)
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct ldb_context *ldb;
ldb_global_init();
ldb = ldb_init(mem_ctx);
options = ldb_cmdline_process(ldb, argc, argv, usage);

View File

@ -560,8 +560,6 @@ static void usage(void)
struct ldb_cmdline *options;
FILE *in = stdin;
FILE *out = stdout;
ldb_global_init();
ctx = talloc_new(NULL);
ldb_ctx = ldb_init(ctx);

View File

@ -61,8 +61,6 @@ int main(int argc, const char **argv)
lp_load(lp_ctx, dyn_CONFIGFILE);
}
ldb_global_init();
gensec_init(lp_ctx);
mprSetCtx(mem_ctx);

View File

@ -282,8 +282,6 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
exit(1);
}
ldb_global_init(); /* FIXME: */
share_init();
gensec_init(cmdline_lp_ctx); /* FIXME: */

View File

@ -615,8 +615,6 @@ int main(int argc,char *argv[])
alarm(max_runtime);
}
ldb_global_init();
if (extra_module != NULL) {
init_module_fn fn = load_module(talloc_autofree_context(), poptGetOptArg(pc));

View File

@ -182,8 +182,6 @@ static int binary_net(int argc, const char **argv)
dcerpc_init();
ldb_global_init();
mem_ctx = talloc_init("net_context");
ctx = talloc(mem_ctx, struct net_context);
if (!ctx) {