diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass.c | 3 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/subtree_delete.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index 5626d9a891..b996f05250 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -453,6 +453,9 @@ static int objectclass_do_add(struct ldb_handle *h) if (ac->search_res == NULL) { if (ldb_dn_compare(ldb_get_root_basedn(ac->module->ldb), ac->orig_req->op.add.message->dn) == 0) { /* Allow the tree to be started */ + + /* but don't keep any error string, it's meaningless */ + ldb_set_errstring(ac->module->ldb, NULL); } else { ldb_asprintf_errstring(ac->module->ldb, "objectclass: Cannot add %s, parent does not exist!", ldb_dn_get_linearized(ac->orig_req->op.add.message->dn)); diff --git a/source4/dsdb/samdb/ldb_modules/subtree_delete.c b/source4/dsdb/samdb/ldb_modules/subtree_delete.c index 92f539457e..f8064a4967 100644 --- a/source4/dsdb/samdb/ldb_modules/subtree_delete.c +++ b/source4/dsdb/samdb/ldb_modules/subtree_delete.c @@ -89,6 +89,10 @@ static int subtree_delete_check_for_children(struct subtree_delete_context *ac) } *req = *ac->orig_req; + /* Ensure any (io) errors during the search for + * children don't propgate back in the error string */ + ldb_set_errstr(ac->module->ldb, NULL); + ac->down_req = req; ac->step = SD_DO_DEL; return ldb_next_request(ac->module, req); |