svn commit: samba r13785 - in
branches/tmp/samba4-ldb-register/source:
dsdb/samdb/ldb_modules lib/ldb/common lib/ldb/modules
nbt_server/wins
jelmer at samba.org
jelmer at samba.org
Thu Mar 2 14:40:20 GMT 2006
Author: jelmer
Date: 2006-03-02 14:40:16 +0000 (Thu, 02 Mar 2006)
New Revision: 13785
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13785
Log:
Fix annoying bug that caused test breakage
Modified:
branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samldb.c
branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb_modules.c
branches/tmp/samba4-ldb-register/source/lib/ldb/modules/operational.c
branches/tmp/samba4-ldb-register/source/lib/ldb/modules/paged_results.c
branches/tmp/samba4-ldb-register/source/lib/ldb/modules/skel.c
branches/tmp/samba4-ldb-register/source/nbt_server/wins/wins_ldb.c
Changeset:
Modified: branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samldb.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samldb.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samldb.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -822,7 +822,7 @@
static int samldb_init(struct ldb_module *module)
{
talloc_set_destructor(module, samldb_destructor);
- return 0;
+ return ldb_next_init(module);
}
static const struct ldb_module_ops samldb_ops = {
Modified: branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb_modules.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb_modules.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -193,7 +193,7 @@
}
}
- /* if not overloaded by options and the backend is not ldap try to load the modules list form ldb */
+ /* if not overloaded by options and the backend is not ldap try to load the modules list from ldb */
if ((modules == NULL) && (strcmp("ldap", ldb->modules->ops->name) != 0)) {
int ret;
const char * const attrs[] = { "@LIST" , NULL};
@@ -293,7 +293,17 @@
int ldb_next_init(struct ldb_module *module)
{
- FIND_OP(module, init_context);
+ /* init is different in that it is not an error if modules
+ * do not require initialization */
+
+ module = module->next;
+
+ while (module && module->ops->init_context == NULL)
+ module = module->next;
+
+ if (module == NULL)
+ return LDB_SUCCESS;
+
return module->ops->init_context(module);
}
Modified: branches/tmp/samba4-ldb-register/source/lib/ldb/modules/operational.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/lib/ldb/modules/operational.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/lib/ldb/modules/operational.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -408,7 +408,7 @@
ldb_set_attrib_handler_syntax(ctx->ldb, "subschemaSubentry", LDB_SYNTAX_DN);
ldb_set_attrib_handler_syntax(ctx->ldb, "structuralObjectClass", LDB_SYNTAX_OBJECTCLASS);
- return LDB_SUCCESS;
+ return ldb_next_init(ctx);
}
static const struct ldb_module_ops operational_ops = {
Modified: branches/tmp/samba4-ldb-register/source/lib/ldb/modules/paged_results.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/lib/ldb/modules/paged_results.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/lib/ldb/modules/paged_results.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -272,7 +272,7 @@
return LDB_ERR_OTHER;
}
- return LDB_SUCCESS;
+ return ldb_next_init(module);
}
static const struct ldb_module_ops paged_ops = {
Modified: branches/tmp/samba4-ldb-register/source/lib/ldb/modules/skel.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/lib/ldb/modules/skel.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/lib/ldb/modules/skel.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -136,7 +136,7 @@
talloc_set_destructor (ctx, skel_destructor);
- return 0;
+ return ldb_next_init(ctx);
}
static const struct ldb_module_ops skel_ops = {
Modified: branches/tmp/samba4-ldb-register/source/nbt_server/wins/wins_ldb.c
===================================================================
--- branches/tmp/samba4-ldb-register/source/nbt_server/wins/wins_ldb.c 2006-03-02 12:53:46 UTC (rev 13784)
+++ branches/tmp/samba4-ldb-register/source/nbt_server/wins/wins_ldb.c 2006-03-02 14:40:16 UTC (rev 13785)
@@ -115,7 +115,7 @@
failed:
talloc_free(h);
- return 1;
+ return LDB_ERR_OTHER;
}
static const struct ldb_module_ops wins_ldb_ops = {
More information about the samba-cvs
mailing list