r8006: I have seen w2k3 send multiple encoding syntaxes in rpc bind
authorAndrew Tridgell <tridge@samba.org>
Thu, 30 Jun 2005 01:59:51 +0000 (01:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:58 +0000 (13:18 -0500)
requests. This is a simple change to accept that, as long as the first
one is NDR.

source/rpc_server/dcerpc_server.c

index 709216db4696c44f53386ba9def289de0cdc8924..87f8c9a42100e5b97ac7ae78bbb9b5e9893e274b 100644 (file)
@@ -468,7 +468,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
        uint32_t context_id;
        const struct dcesrv_interface *iface;
 
-       if (call->pkt.u.bind.num_contexts != 1 ||
+       if (call->pkt.u.bind.num_contexts < 1 ||
            call->pkt.u.bind.ctx_list[0].num_transfer_syntaxes < 1) {
                return dcesrv_bind_nak(call, 0);
        }
@@ -493,6 +493,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
            strcasecmp(NDR_GUID, transfer_syntax) != 0 ||
            NDR_GUID_VERSION != transfer_syntax_version) {
                /* we only do NDR encoded dcerpc */
+               DEBUG(0,("Non NDR transfer syntax requested - %s\n", transfer_syntax));
                return dcesrv_bind_nak(call, 0);
        }