s4-dsdb: force LDB_ERR_NO_SUCH_ATTRIBUTE on missing schemaInfo
authorAndrew Tridgell <tridge@samba.org>
Thu, 21 Oct 2010 07:17:59 +0000 (18:17 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 21 Oct 2010 08:03:27 +0000 (19:03 +1100)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/samdb/ldb_modules/schema_util.c

index 79c0011c0c6d536798a3e9b69adffc7b4395de43..aa7a33af424fbfcaca0812ce0b0b8ca31b4198a1 100644 (file)
@@ -70,9 +70,10 @@ int dsdb_module_schema_info_blob_read(struct ldb_module *ldb_module,
 
        blob_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
        if (!blob_val) {
-               DEBUG(0,("dsdb_module_schema_info_blob_read: no schemaInfo attribute found\n"));
+               ldb_asprintf_errstring(ldb_module_get_ctx(ldb_module),
+                                      "dsdb_module_schema_info_blob_read: no schemaInfo attribute found");
                talloc_free(schema_res);
-               return ldb_operr(ldb_module_get_ctx(ldb_module));
+               return LDB_ERR_NO_SUCH_ATTRIBUTE;
        }
 
        /* transfer .data ownership to mem_ctx */