From: Andrew Bartlett Date: Fri, 9 Jun 2017 00:06:37 +0000 (+1200) Subject: dsdb: Provide proper errors when dsdb_schema_set_indices_and_attributes fails X-Git-Tag: ldb-1.1.31~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ff09f0f82a97e2950b9fddc15a3cf58fef3bc23;p=thirdparty%2Fsamba.git dsdb: Provide proper errors when dsdb_schema_set_indices_and_attributes fails Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index fd48d279af2..977c9e339b6 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -184,6 +184,8 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, ret = LDB_SUCCESS; } if (ret != LDB_SUCCESS) { + DBG_ERR("Failed to set schema into @ATTRIBUTES: %s\n", + ldb_errstring(ldb)); talloc_free(mem_ctx); return ret; } @@ -216,6 +218,12 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, /* We might be on a read-only DB */ ret = LDB_SUCCESS; } + + if (ret != LDB_SUCCESS) { + DBG_ERR("Failed to set schema into @INDEXLIST: %s\n", + ldb_errstring(ldb)); + } + talloc_free(mem_ctx); return ret;