s4:rpc_server: it's not a protocol error to do an alter context with an unknown trans...
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Aug 2016 12:35:34 +0000 (14:35 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Oct 2016 09:20:14 +0000 (11:20 +0200)
Windows 2012R2 only returns a protocol error if the client wants to change
between supported transfer syntaxes, e.g. from NDR32 to NDR64.

If the proposed transfer syntax is not known to the server,
the request will be silently ignored.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/knownfail
source4/rpc_server/dcerpc_server.c

index 976761b94b440220e9bcac30332fe0251236075e..e5abe627c8a67ea0b71112c76a1a2a25683339a8 100644 (file)
 #ntvfs server blocks copychunk with execute access on read handle
 ^samba4.smb2.ioctl.copy_chunk_bad_access
 ^samba4.drs.getnc_exop.python.*getnc_exop.DrsReplicaPrefixMapTestCase.test_regular_prefix_map_ex_attid.*
+# We don't support NDR64 yet, so we generate the wrong FAULT code
+^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_spnego_change_auth_type2
+^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_spnego_change_transfer
index e36fa6ff43985c4402044abb50f6d8ba63cdd41a..4e115b53582546c15340cdcdb30754ac8ba19caf 100644 (file)
@@ -989,10 +989,6 @@ static NTSTATUS dcesrv_check_or_create_context(struct dcesrv_call_state *call,
                        return NT_STATUS_RPC_PROTOCOL_ERROR;
                }
 
-               if (ctx->num_transfer_syntaxes != 1) {
-                       return NT_STATUS_RPC_PROTOCOL_ERROR;
-               }
-
                if (selected_transfer != NULL) {
                        ok = ndr_syntax_id_equal(&context->transfer_syntax,
                                                 selected_transfer);
@@ -1003,8 +999,6 @@ static NTSTATUS dcesrv_check_or_create_context(struct dcesrv_call_state *call,
                        ack->result = DCERPC_BIND_ACK_RESULT_ACCEPTANCE;
                        ack->reason.value = DCERPC_BIND_ACK_REASON_NOT_SPECIFIED;
                        ack->syntax = context->transfer_syntax;
-               } else {
-                       return NT_STATUS_RPC_PROTOCOL_ERROR;
                }
 
                /*