This patch adds remaining padding bytes to the dcerpc_fault IDL structure and adds...
authorJulien Kerihuel <j.kerihuel@openchange.org>
Thu, 15 May 2008 11:54:07 +0000 (13:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 16 May 2008 06:54:27 +0000 (08:54 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 652b8c5f156b357e231057a5a0fbded88f4f9c5f)

source4/librpc/idl/dcerpc.idl
source4/rpc_server/dcerpc_server.c

index b2c67542f5188fba9ae8d9d8f323739771d61ac9..e228d85c464df93bd9522659c1c6142f330b7d69 100644 (file)
@@ -116,6 +116,7 @@ interface dcerpc
                uint16 context_id;
                uint8 cancel_count;
                uint32 status;
+               [flag(NDR_REMAINING)] DATA_BLOB _pad;
        } dcerpc_fault;
 
        /* the auth types we know about */
index 1962a97d5b49d3863e283a5ee1a15c156e06f7d8..eb467709c9cc5379e5c903287c16c66571bd2ae8 100644 (file)
@@ -445,6 +445,7 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code
 {
        struct ncacn_packet pkt;
        struct data_blob_list_item *rep;
+       uint8_t zeros[4];
        NTSTATUS status;
 
        /* setup a bind_ack */
@@ -458,6 +459,9 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code
        pkt.u.fault.cancel_count = 0;
        pkt.u.fault.status = fault_code;
 
+       ZERO_STRUCT(zeros);
+       pkt.u.fault._pad = data_blob_const(zeros, sizeof(zeros));
+
        rep = talloc(call, struct data_blob_list_item);
        if (!rep) {
                return NT_STATUS_NO_MEMORY;