From db0a105aae2ba32be4aa5658fc8963ba28933a6b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 1 Jul 2008 16:35:13 +0200 Subject: schema_fsmo: move fsmo info into struct dsdb_schema metze (This used to be commit 8538d305c803268c712a90879f29a2a74ba0ef03) --- source4/dsdb/schema/schema.h | 5 +++++ source4/dsdb/schema/schema_init.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'source4/dsdb/schema') diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h index bb34235465..6fce354f7c 100644 --- a/source4/dsdb/schema/schema.h +++ b/source4/dsdb/schema/schema.h @@ -150,6 +150,11 @@ struct dsdb_schema { struct dsdb_attribute *attributes; struct dsdb_class *classes; + struct { + bool we_are_master; + struct ldb_dn *master_dn; + } fsmo; + struct smb_iconv_convenience *iconv_convenience; }; diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index c046cb597f..6f8958dab8 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -1164,6 +1164,12 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm"))); + schema->fsmo.we_are_master = true; + schema->fsmo.master_dn = ldb_dn_new_fmt(schema, ldb, "@PROVISION_SCHEMA_MASTER"); + if (!schema->fsmo.master_dn) { + goto nomem; + } + /* * load the prefixMap attribute from pf */ -- cgit