Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
if (dsdb_flags & DSDB_SEARCH_ONE_ONLY) {
if (res->count == 0) {
talloc_free(tmp_ctx);
- ldb_reset_err_string(ldb_module_get_ctx(module));
- return LDB_ERR_NO_SUCH_OBJECT;
+ return ldb_error(ldb_module_get_ctx(module), LDB_ERR_NO_SUCH_OBJECT, __func__);
}
if (res->count != 1) {
talloc_free(tmp_ctx);
}
if (res->count == 0) {
talloc_free(tmp_ctx);
- return LDB_ERR_NO_SUCH_OBJECT;
+ return ldb_error(ldb_module_get_ctx(module), LDB_ERR_NO_SUCH_OBJECT, __func__);
}
if (res->count != 1) {
ldb_asprintf_errstring(ldb_module_get_ctx(module), "More than one object found matching objectGUID %s\n",