summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-04-22 17:24:15 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-04-29 04:54:06 +0300
commit546a727bd326464c6fac3c6454e4e98314e0e75a (patch)
treefb9f5fde3e11e890e3e9d5cef4a705ad8f928468 /source4/dsdb/schema/schema_init.c
parentda127d44e31306b4865e682be362fd9672d8201f (diff)
downloadsamba-546a727bd326464c6fac3c6454e4e98314e0e75a.tar.gz
samba-546a727bd326464c6fac3c6454e4e98314e0e75a.tar.bz2
samba-546a727bd326464c6fac3c6454e4e98314e0e75a.zip
s4/dsdb: Use default schemaInfo value when no such value is given
Having no value for schemaInfo is totally OK as it turns out. In such cases, we should use a default value with all fields set to 0.
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 3405e155d3..cdd37f094b 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -734,20 +734,10 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
}
info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
if (!info_val) {
- struct dsdb_schema_info *schema_info;
-
- status = dsdb_schema_info_create(ldb, false, mem_ctx, &schema_info);
- if (!W_ERROR_IS_OK(status)) {
- *error_string = talloc_asprintf(mem_ctx,
- "schema_fsmo_init: dsdb_schema_info_create() failed - %s",
- win_errstr(status));
- DEBUG(0,(__location__ ": %s\n", *error_string));
- return LDB_ERR_OPERATIONS_ERROR;
- }
- status = dsdb_blob_from_schema_info(schema_info, mem_ctx, &info_val_default);
+ status = dsdb_schema_info_blob_new(mem_ctx, &info_val_default);
if (!W_ERROR_IS_OK(status)) {
*error_string = talloc_asprintf(mem_ctx,
- "schema_fsmo_init: dsdb_blob_from_schema_info() failed - %s",
+ "schema_fsmo_init: dsdb_schema_info_blob_new() failed - %s",
win_errstr(status));
DEBUG(0,(__location__ ": %s\n", *error_string));
return LDB_ERR_OPERATIONS_ERROR;