summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/objectclass.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-12-04 03:37:41 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:07 +0100
commitd4fbd381fa5f75a76870531fe15bace4550e0f01 (patch)
treeeca3aa6ee60e1f765632834b7ed5f57adcbe6853 /source4/dsdb/samdb/ldb_modules/objectclass.c
parente611afb3e4edc50d80c3145aa119d0d3b63dbacc (diff)
downloadsamba-d4fbd381fa5f75a76870531fe15bace4550e0f01.tar.gz
samba-d4fbd381fa5f75a76870531fe15bace4550e0f01.tar.bz2
samba-d4fbd381fa5f75a76870531fe15bace4550e0f01.zip
r26282: These modules expect errors, but if we don't wipe the error string, we
get phony error strings at the caller, which is very confusing. Andrew Bartlett (This used to be commit 9ac7f4f6098b392dbe4a883a802d2417e074586a)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/objectclass.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c3
1 files changed, 3 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));