summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-02-08 12:45:51 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-02-08 12:45:51 +1100
commitcd5c3f5842984c8ce0a6208dc0a482c5be53606f (patch)
treef1b2cae9f0a05abff8f7f8edef81358234465823
parentbebd139db02408b29b78b2ef9502d1363d45b3f9 (diff)
downloadsamba-cd5c3f5842984c8ce0a6208dc0a482c5be53606f.tar.gz
samba-cd5c3f5842984c8ce0a6208dc0a482c5be53606f.tar.bz2
samba-cd5c3f5842984c8ce0a6208dc0a482c5be53606f.zip
Ensure expected errors do not leak up to the application.
(reset the error string to be sure). Andrew Bartlett (This used to be commit 741d33bf8c9b2e2b1ba4762ca63e90885a702184)
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_fsmo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index 559c91bd2d..f9dd131fd4 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@ -59,6 +59,7 @@ static int schema_fsmo_init(struct ldb_module *module)
schema_dn = samdb_schema_dn(module->ldb);
if (!schema_dn) {
+ ldb_reset_err_string(module->ldb);
ldb_debug(module->ldb, LDB_DEBUG_WARNING,
"schema_fsmo_init: no schema dn present: (skip schema loading)\n");
return ldb_next_init(module);
@@ -91,6 +92,7 @@ static int schema_fsmo_init(struct ldb_module *module)
NULL, schema_attrs,
&schema_res);
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
+ ldb_reset_err_string(module->ldb);
ldb_debug(module->ldb, LDB_DEBUG_WARNING,
"schema_fsmo_init: no schema head present: (skip schema loading)\n");
talloc_free(mem_ctx);