From: Andrew Bartlett Date: Tue, 15 Mar 2016 02:11:54 +0000 (+1300) Subject: dsdb: Give more errors in operational module when building the parentGUID X-Git-Tag: tdb-1.3.10~976 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb9f5264ef709e110bf11cff3fa0f7c371ea67ce;p=thirdparty%2Fsamba.git dsdb: Give more errors in operational module when building the parentGUID Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- 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);