summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-12-31 02:12:23 -0800
committerMatthieu Patou <mat@samba.org>2013-01-09 07:19:54 +0100
commit0c86126d166c8f75bd3593fce077f26bca51f8aa (patch)
treedb29849463b38b0c1dcdba299f06d7a17d3706ed
parent411440d2d9085fe9db0e3c26c025c6b94d02c00f (diff)
downloadsamba-0c86126d166c8f75bd3593fce077f26bca51f8aa.tar.gz
samba-0c86126d166c8f75bd3593fce077f26bca51f8aa.tar.bz2
samba-0c86126d166c8f75bd3593fce077f26bca51f8aa.zip
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 <mat@matws.net> Reviewed-By: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/libnet/libnet_vampire.c26
1 files 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"));