From fb9f5264ef709e110bf11cff3fa0f7c371ea67ce Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 15 Mar 2016 15:11:54 +1300 Subject: [PATCH] dsdb: Give more errors in operational module when building the parentGUID Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- source4/dsdb/samdb/ldb_modules/operational.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 0dd420ada05..4205c4b716b 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -352,7 +352,7 @@ static int construct_parent_guid(struct ldb_module *module, if (parent_dn == NULL) { DEBUG(4,(__location__ ": Failed to find parent for dn %s\n", ldb_dn_get_linearized(msg->dn))); - return LDB_SUCCESS; + return LDB_ERR_OTHER; } ret = dsdb_module_search_dn(module, msg, &parent_res, parent_dn, attrs2, DSDB_FLAG_NEXT_MODULE | @@ -372,7 +372,7 @@ static int construct_parent_guid(struct ldb_module *module, parent_guid = ldb_msg_find_ldb_val(parent_res->msgs[0], "objectGUID"); if (!parent_guid) { talloc_free(parent_res); - return LDB_SUCCESS; + return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } v = data_blob_dup_talloc(parent_res, *parent_guid); -- 2.47.3