diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-11-11 16:35:59 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-11-15 09:46:27 +0100 |
commit | 75ae19422b2b405cabe269c29afb61a1b50636d1 (patch) | |
tree | e6ca4fc28108dab7edf126ff3563870a9d9fc179 /source4/dsdb/schema | |
parent | e6a9e1dda920d83c2926061e331d52aa9e9d0871 (diff) | |
download | samba-75ae19422b2b405cabe269c29afb61a1b50636d1.tar.gz samba-75ae19422b2b405cabe269c29afb61a1b50636d1.tar.bz2 samba-75ae19422b2b405cabe269c29afb61a1b50636d1.zip |
s4:dsdb/schema: pass and remember the schema_dn in dsdb_set_schema_from_ldif()
metze
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_set.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 18f3ab7b7c..6f735db486 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -683,7 +683,9 @@ WERROR dsdb_schema_set_el_from_ldb_msg(struct ldb_context *ldb, struct dsdb_sche * schema itself to the directory. */ -WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, const char *pf, const char *df) +WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, + const char *pf, const char *df, + const char *dn) { struct ldb_ldif *ldif; struct ldb_message *msg; @@ -702,9 +704,15 @@ WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, const char *pf, const } schema = dsdb_new_schema(mem_ctx); - + if (!schema) { + goto nomem; + } + schema->base_dn = ldb_dn_new(schema, ldb, dn); + if (!schema->base_dn) { + goto nomem; + } schema->fsmo.we_are_master = true; - schema->fsmo.master_dn = ldb_dn_new_fmt(schema, ldb, "@PROVISION_SCHEMA_MASTER"); + schema->fsmo.master_dn = ldb_dn_new(schema, ldb, "@PROVISION_SCHEMA_MASTER"); if (!schema->fsmo.master_dn) { goto nomem; } |