From c436f986ca67c71fe5d0855a14dfea65942a47fb Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 6 Jul 2012 15:36:12 +1000 Subject: [PATCH] s4-dsdb: Give a much better error message when parentGUID generation fails --- source4/dsdb/samdb/ldb_modules/operational.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 79a1d6f2def..4ce8b8fddaf 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -309,9 +309,9 @@ static int construct_parent_guid(struct ldb_module *module, /* not NC, so the object should have a parent*/ if (ret == LDB_ERR_NO_SUCH_OBJECT) { - DEBUG(4,(__location__ ": Parent dn for %s does not exist \n", - ldb_dn_get_linearized(msg->dn))); - return ldb_operr(ldb_module_get_ctx(module)); + return ldb_error(ldb_module_get_ctx(module), LDB_ERR_OPERATIONS_ERROR, + talloc_asprintf(msg, "Parent dn for %s does not exist", + ldb_dn_get_linearized(msg->dn))); } else if (ret != LDB_SUCCESS) { return ret; } -- 2.11.4.GIT