summaryrefslogtreecommitdiffstats
path: root/source4/wrepl_server/wrepl_in_call.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-02-04 13:54:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:47 -0500
commit289e9baa1d9ab7fa36d88a5cd50c0a0f706c07bb (patch)
tree2fb9dc712640e256b433f4c8a8885af68b485d54 /source4/wrepl_server/wrepl_in_call.c
parent2e7f35f88faedb5b6e2302c5dacf62709dee12a9 (diff)
downloadsamba-289e9baa1d9ab7fa36d88a5cd50c0a0f706c07bb.tar.gz
samba-289e9baa1d9ab7fa36d88a5cd50c0a0f706c07bb.tar.xz
samba-289e9baa1d9ab7fa36d88a5cd50c0a0f706c07bb.zip
r13345: let us replicate with NT4sp6a
I don't yet know what the extra data in the start_association call mean... This also let w2k use WREPL_REPL_INFORM messages to us, but w2k3 doesn't it do it yet... metze (This used to be commit 02d6dfa1da754857c28125392a561cfde0087c48)
Diffstat (limited to 'source4/wrepl_server/wrepl_in_call.c')
-rw-r--r--source4/wrepl_server/wrepl_in_call.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 8ce88db6a9c..09ea2c15b48 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -50,10 +50,17 @@ static NTSTATUS wreplsrv_in_start_association(struct wreplsrv_in_call *call)
return NT_STATUS_OK;
}
+/*
+ * it seems that we don't know all details about the start_association
+ * to support replication with NT4 (it sends 1.1 instead of 5.2)
+ * we ignore the version numbers until we know all details
+ */
+#if 0
if (start->minor_version != 2 || start->major_version != 5) {
/* w2k terminate the connection if the versions doesn't match */
return NT_STATUS_UNKNOWN_REVISION;
}
+#endif
call->wreplconn->assoc_ctx.stopped = False;
call->wreplconn->assoc_ctx.our_ctx = WREPLSRV_VALID_ASSOC_CTX;
@@ -64,6 +71,19 @@ static NTSTATUS wreplsrv_in_start_association(struct wreplsrv_in_call *call)
start_reply->minor_version = 2;
start_reply->major_version = 5;
+ /*
+ * nt4 uses 41 bytes for the start_association call
+ * so do it the same and as we don't know th emeanings of this bytes
+ * we just send zeros and nt4, w2k and w2k3 seems to be happy with this
+ *
+ * if we don't do this nt4 uses an old version of the wins replication protocol
+ * and that would break nt4 <-> samba replication
+ */
+ call->rep_packet.padding = data_blob_talloc(call, NULL, 21);
+ NT_STATUS_HAVE_NO_MEMORY(call->rep_packet.padding.data);
+
+ memset(call->rep_packet.padding.data, 0, call->rep_packet.padding.length);
+
return NT_STATUS_OK;
}