Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 12:57:51 +0000 (14:57 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 12:57:51 +0000 (14:57 +0200)
1  2 
source4/librpc/rpc/dcerpc.c

index 5cee9f27ad4cd6ac44c141218570b42b0ec60c2a,c1e3e26ee988be9107fe0e4d1ccf7573ca76f8cd..4e07cc7b57c89e4233da1df00f7fdca70131de8e
@@@ -33,7 -33,9 +33,7 @@@
  
  _PUBLIC_ NTSTATUS dcerpc_init(void)
  {
 -      gensec_init(global_loadparm);
 -
 -      return NT_STATUS_OK;
 +      return gensec_init(global_loadparm);
  }
  
  static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status);
@@@ -332,6 -334,7 +332,7 @@@ static NTSTATUS ncacn_push_request_sign
        DATA_BLOB creds2;
        size_t payload_length;
        enum ndr_err_code ndr_err;
+       size_t hdr_size = DCERPC_REQUEST_LENGTH;
  
        /* non-signed packets are simpler */
        if (sig_size == 0) {
  
        if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) {
                ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
+               hdr_size += 16;
        }
  
        ndr_err = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt);
        case DCERPC_AUTH_LEVEL_PRIVACY:
                status = gensec_seal_packet(c->security_state.generic_state, 
                                            mem_ctx, 
-                                           blob->data + DCERPC_REQUEST_LENGTH, 
+                                           blob->data + hdr_size,
                                            payload_length,
                                            blob->data,
                                            blob->length,
        case DCERPC_AUTH_LEVEL_INTEGRITY:
                status = gensec_sign_packet(c->security_state.generic_state, 
                                            mem_ctx, 
-                                           blob->data + DCERPC_REQUEST_LENGTH, 
+                                           blob->data + hdr_size,
                                            payload_length, 
                                            blob->data,
                                            blob->length,