Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/libsmb/smb_seal.c

    r414 r745  
    1919
    2020#include "includes.h"
     21#include "../libcli/auth/ntlmssp.h"
     22#include "smb_crypt.h"
     23#include "libsmb/libsmb.h"
    2124
    2225/******************************************************************************
     
    6063******************************************************************************/
    6164
    62 NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf)
     65NTSTATUS common_ntlm_decrypt_buffer(struct ntlmssp_state *ntlmssp_state, char *buf)
    6366{
    6467        NTSTATUS status;
     
    108111******************************************************************************/
    109112
    110 NTSTATUS common_ntlm_encrypt_buffer(NTLMSSP_STATE *ntlmssp_state,
     113NTSTATUS common_ntlm_encrypt_buffer(struct ntlmssp_state *ntlmssp_state,
    111114                                uint16 enc_ctx_num,
    112115                                char *buf,
     
    117120        size_t data_len = smb_len(buf) - 4; /* Ignore the 0xFF SMB bytes. */
    118121        DATA_BLOB sig;
    119 
     122        TALLOC_CTX *frame;
    120123        *ppbuf_out = NULL;
    121124
     
    124127        }
    125128
     129        frame = talloc_stackframe();
    126130        /*
    127131         * We know smb_len can't return a value > 128k, so no int overflow
     
    140144
    141145        status = ntlmssp_seal_packet(ntlmssp_state,
     146                                     frame,
    142147                (unsigned char *)buf_out + 8 + NTLMSSP_SIG_SIZE, /* 4 byte len + 0xFF 'S' <enc> <ctx> */
    143148                data_len,
     
    147152
    148153        if (!NT_STATUS_IS_OK(status)) {
    149                 data_blob_free(&sig);
     154                talloc_free(frame);
    150155                SAFE_FREE(buf_out);
    151156                return status;
     
    154159        /* First 16 data bytes are signature for SSPI compatibility. */
    155160        memcpy(buf_out + 8, sig.data, NTLMSSP_SIG_SIZE);
    156         data_blob_free(&sig);
     161        talloc_free(frame);
    157162        *ppbuf_out = buf_out;
    158163        return NT_STATUS_OK;
     
    369374        if (es->smb_enc_type == SMB_TRANS_ENC_NTLM) {
    370375                if (es->s.ntlmssp_state) {
    371                         ntlmssp_end(&es->s.ntlmssp_state);
     376                        TALLOC_FREE(es->s.ntlmssp_state);
    372377                }
    373378        }
Note: See TracChangeset for help on using the changeset viewer.