From 0c86126d166c8f75bd3593fce077f26bca51f8aa Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Mon, 31 Dec 2012 02:12:23 -0800 Subject: libnet: set the invocation_id earlier in order to avoid annoying messages At that moment we have all the information to set the invocation id so let's set it, it will avoid useless messages about missing invocation id. Signed-off-by: Matthieu Patou Reviewed-By: Andrew Bartlett --- source4/libnet/libnet_vampire.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 4091346630..a354d41e38 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -288,6 +288,19 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s default: return NT_STATUS_INVALID_PARAMETER; } + /* We must set these up to ensure the replMetaData is written + * correctly, before our NTDS Settings entry is replicated */ + ok = samdb_set_ntds_invocation_id(s->ldb, &c->dest_dsa->invocation_id); + if (!ok) { + DEBUG(0,("Failed to set cached ntds invocationId\n")); + return NT_STATUS_FOOBAR; + } + ok = samdb_set_ntds_objectGUID(s->ldb, &c->dest_dsa->ntds_guid); + if (!ok) { + DEBUG(0,("Failed to set cached ntds objectGUID\n")); + return NT_STATUS_FOOBAR; + } + status = dsdb_schema_pfm_from_drsuapi_pfm(mapping_ctr, true, s, &pfm_remote, NULL); @@ -492,19 +505,6 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s talloc_free(s_dsa); talloc_free(schema_objs); - /* We must set these up to ensure the replMetaData is written - * correctly, before our NTDS Settings entry is replicated */ - ok = samdb_set_ntds_invocation_id(s->ldb, &c->dest_dsa->invocation_id); - if (!ok) { - DEBUG(0,("Failed to set cached ntds invocationId\n")); - return NT_STATUS_FOOBAR; - } - ok = samdb_set_ntds_objectGUID(s->ldb, &c->dest_dsa->ntds_guid); - if (!ok) { - DEBUG(0,("Failed to set cached ntds objectGUID\n")); - return NT_STATUS_FOOBAR; - } - s->schema = dsdb_get_schema(s->ldb, s); if (!s->schema) { DEBUG(0,("Failed to get loaded dsdb_schema\n")); -- cgit