dsdb: Do not give an error is metadata.tdb does not yet exist
authorAndrew Bartlett <abartlet@samba.org>
Fri, 23 May 2014 04:41:33 +0000 (16:41 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:12 +0000 (12:46 +0200)
Change-Id: I88ee188c776364fd66da388ce01fc9288aa2ded0
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 822b4927288231b7a90579af9792608a0bdef706)

source4/dsdb/samdb/ldb_modules/schema_load.c

index faaf3f2071c4af72f52f9a45bc16c1746ec44075..3397669135da79af0e3ca77564e10f518bc8eb9d 100644 (file)
@@ -113,8 +113,8 @@ static int schema_metadata_get_uint64(struct ldb_module *module,
        TALLOC_CTX *tmp_ctx;
 
        if (!data || !data->metadata) {
-               return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
-                                       "schema: metadata tdb not initialized");
+               *value = default_value;
+               return LDB_SUCCESS;
        }
 
        tmp_ctx = talloc_new(NULL);