summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-06-09 20:52:02 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-06-15 10:51:34 +1000
commit5323485eb3d5aeb844535c5b08fbdd3e7f8c9429 (patch)
tree91b9e2bd321fb7ea83edb3924c8ff51a4096cbf9 /source4/libnet
parent6a2f7fe04c2c658e59fba01f7346303676b121b3 (diff)
downloadsamba-5323485eb3d5aeb844535c5b08fbdd3e7f8c9429.tar.gz
samba-5323485eb3d5aeb844535c5b08fbdd3e7f8c9429.tar.bz2
samba-5323485eb3d5aeb844535c5b08fbdd3e7f8c9429.zip
s4:dsdb Allow the setting an override on the schema
The change here is to try and convert a per the previous rules, but if we don't know a particular OID as a attributeID, then store it as an OID (for example). This allows known values to be converted as before, but still copes with unknown values. Andrew Bartlett Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_vampire.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 8a9ba12141..f7c2d66fc6 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -60,6 +60,7 @@ struct libnet_vampire_cb_state {
const char *realm;
struct cli_credentials *machine_account;
struct dsdb_schema *self_made_schema;
+ struct dsdb_schema *provision_schema;
const struct dsdb_schema *schema;
struct ldb_context *ldb;
@@ -139,6 +140,7 @@ NTSTATUS libnet_vampire_cb_prepare_db(void *private_data,
s->ldb = talloc_steal(s, result.samdb);
s->lp_ctx = talloc_steal(s, result.lp_ctx);
+ s->provision_schema = dsdb_get_schema(s->ldb, s);
/* wrap the entire vapire operation in a transaction. This
isn't just cosmetic - we use this to ensure that linked
@@ -249,6 +251,8 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s
NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
s_dsa->other_info->dns_name = tmp_dns_name;
+ s->provision_schema->relax_OID_conversions = true;
+
/* Now convert the schema elements again, using the schema we just imported */
status = dsdb_extended_replicated_objects_convert(s->ldb,
c->partition->nc.dn,