samba-cvs.cvs
[Top] [All Lists]

svn commit: samba r13345 - in branches/SAMBA_4_0/source: libcli/wrepl wr

Subject: svn commit: samba r13345 - in branches/SAMBA_4_0/source: libcli/wrepl wrepl_server
From:
Date: Sat, 4 Feb 2006 13:54:31 +0000 GMT
Author: metze
Date: 2006-02-04 13:54:30 +0000 (Sat, 04 Feb 2006)
New Revision: 13345

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13345

Log:
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
Modified:
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2006-02-04 11:19:09 UTC 
(rev 13344)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2006-02-04 13:54:30 UTC 
(rev 13345)
@@ -563,6 +563,21 @@
        packet->message.start.minor_version = 2;
        packet->message.start.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
+        */
+       packet->padding = data_blob_talloc(packet, NULL, 21);
+       if (packet->padding.data == NULL) {
+               talloc_free(packet);
+               return NULL;
+       }
+       memset(packet->padding.data, 0, packet->padding.length);
+
        req = wrepl_request_send(wrepl_socket, packet, NULL);
 
        talloc_free(packet);

Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c      2006-02-04 
11:19:09 UTC (rev 13344)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c      2006-02-04 
13:54:30 UTC (rev 13345)
@@ -50,10 +50,17 @@
                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 @@
        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;
 }
 

<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: samba r13345 - in branches/SAMBA_4_0/source: libcli/wrepl wrepl_server, metze <=