The branch, v4-0-test has been updated
       via  718f9ce6889346c92894e868f0678fbe404a43ab (commit)
       via  652b8c5f156b357e231057a5a0fbded88f4f9c5f (commit)
      from  0c09d28acf42400d26cc27675e37226060de26d3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 718f9ce6889346c92894e868f0678fbe404a43ab
Author: Julien Kerihuel <[EMAIL PROTECTED]>
Date:   Thu May 15 13:55:23 2008 +0200

    The following patch calls the op_bind operation for an interface which 
context is altered by dcerpc alter_context requests. It prevents dcerpc_server 
from returning errors (nca_s_fault_access_denied, then 
nca_s_fault_context_mismatch in further client requests) and keeps the 
connection alive.
    
    Signed-off-by: Stefan Metzmacher <[EMAIL PROTECTED]>

commit 652b8c5f156b357e231057a5a0fbded88f4f9c5f
Author: Julien Kerihuel <[EMAIL PROTECTED]>
Date:   Thu May 15 13:54:07 2008 +0200

    This patch adds remaining padding bytes to the dcerpc_fault IDL structure 
and adds a const 4 bytes blob to pkt.u.fault.
    
    Signed-off-by: Stefan Metzmacher <[EMAIL PROTECTED]>

-----------------------------------------------------------------------

Summary of changes:
 source/librpc/idl/dcerpc.idl      |    1 +
 source/rpc_server/dcerpc_server.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/idl/dcerpc.idl b/source/librpc/idl/dcerpc.idl
index b2c6754..e228d85 100644
--- a/source/librpc/idl/dcerpc.idl
+++ b/source/librpc/idl/dcerpc.idl
@@ -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 */
diff --git a/source/rpc_server/dcerpc_server.c 
b/source/rpc_server/dcerpc_server.c
index 1962a97..e0351bb 100644
--- a/source/rpc_server/dcerpc_server.c
+++ b/source/rpc_server/dcerpc_server.c
@@ -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;
@@ -684,6 +688,7 @@ static NTSTATUS dcesrv_alter_new_context(struct 
dcesrv_call_state *call, uint32_
        struct dcesrv_connection_context *context;
        const struct dcesrv_interface *iface;
        struct GUID uuid, *transfer_syntax_uuid;
+       NTSTATUS status;
 
        if_version = call->pkt.u.alter.ctx_list[0].abstract_syntax.if_version;
        uuid = call->pkt.u.alter.ctx_list[0].abstract_syntax.uuid;
@@ -717,6 +722,13 @@ static NTSTATUS dcesrv_alter_new_context(struct 
dcesrv_call_state *call, uint32_
        DLIST_ADD(call->conn->contexts, context);
        call->context = context;
 
+       if (iface) {
+               status = iface->bind(call, iface);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return status;
+               }
+       }
+
        return NT_STATUS_OK;
 }
 


-- 
Samba Shared Repository

Reply via email to