Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

Location:
vendor/current/source4/libcli/smb2
Files:
1 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/libcli/smb2/cancel.c

    r414 r740  
    5454        SIVAL(c->out.hdr, SMB2_HDR_FLAGS,       0x00000002);
    5555        SSVAL(c->out.hdr, SMB2_HDR_CREDIT,      0x0030);
    56         SIVAL(c->out.hdr, SMB2_HDR_PID,         r->cancel.pending_id);
     56        SBVAL(c->out.hdr, SMB2_HDR_ASYNC_ID,    r->cancel.async_id);
    5757        SBVAL(c->out.hdr, SMB2_HDR_MESSAGE_ID,  c->seqnum);
    5858        if (r->session) {
  • vendor/current/source4/libcli/smb2/create.c

    r414 r740  
    132132                enum ndr_err_code ndr_err;
    133133                DATA_BLOB sd_blob;
    134                 ndr_err = ndr_push_struct_blob(&sd_blob, req, NULL,
    135                                                io->in.sec_desc,
     134                ndr_err = ndr_push_struct_blob(&sd_blob, req, io->in.sec_desc,
    136135                                               (ndr_push_flags_fn_t)ndr_push_security_descriptor);
    137136                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
  • vendor/current/source4/libcli/smb2/find.c

    r414 r740  
    9696*/
    9797NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx,
    98                               uint8_t level, uint_t *count,
     98                              uint8_t level, unsigned int *count,
    9999                              union smb_search_data **io)
    100100{
     
    103103        DATA_BLOB b;
    104104        enum smb_search_data_level smb_level;
    105         uint_t next_ofs=0;
     105        unsigned int next_ofs=0;
    106106
    107107        switch (level) {
     
    172172NTSTATUS smb2_find_level(struct smb2_tree *tree, TALLOC_CTX *mem_ctx,
    173173                         struct smb2_find *f,
    174                          uint_t *count, union smb_search_data **io)
     174                         unsigned int *count, union smb_search_data **io)
    175175{
    176176        struct smb2_request *req;
  • vendor/current/source4/libcli/smb2/lock.c

    r414 r740  
    4040
    4141        SSVAL(req->out.body, 0x02, io->in.lock_count);
    42         SIVAL(req->out.body, 0x04, io->in.reserved);
     42        SIVAL(req->out.body, 0x04, io->in.lock_sequence);
    4343        smb2_push_handle(req->out.body+0x08, &io->in.file.handle);
    4444
  • vendor/current/source4/libcli/smb2/negprot.c

    r414 r740  
    3535        struct smb2_request *req;
    3636        uint16_t size = 0x24 + io->in.dialect_count*2;
    37         enum ndr_err_code ndr_err;
    3837        int i;
     38        NTSTATUS status;
    3939
    4040        req = smb2_request_init(transport, SMB2_OP_NEGPROT, size, false, 0);
     
    4747        SSVAL(req->out.body, 0x06, io->in.reserved);
    4848        SIVAL(req->out.body, 0x08, io->in.capabilities);
    49         ndr_err = smbcli_push_guid(req->out.body, 0x0C, &io->in.client_guid);
    50         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     49        status = smbcli_push_guid(req->out.body, 0x0C, &io->in.client_guid);
     50        if (!NT_STATUS_IS_OK(status)) {
    5151                talloc_free(req);
    5252                return NULL;
     
    6969{
    7070        NTSTATUS status;
    71         enum ndr_err_code ndr_err;
    7271
    7372        if (!smb2_request_receive(req) ||
     
    8180        io->out.dialect_revision   = SVAL(req->in.body, 0x04);
    8281        io->out.reserved           = SVAL(req->in.body, 0x06);
    83         ndr_err = smbcli_pull_guid(req->in.body, 0x08, &io->in.client_guid);
    84         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     82        status = smbcli_pull_guid(req->in.body, 0x08, &io->in.client_guid);
     83        if (!NT_STATUS_IS_OK(status)) {
    8584                smb2_request_destroy(req);
    86                 return NT_STATUS_INTERNAL_ERROR;
     85                return status;
    8786        }
    8887        io->out.capabilities       = IVAL(req->in.body, 0x18);
  • vendor/current/source4/libcli/smb2/request.c

    r414 r740  
    176176
    177177        SBVAL(req->out.hdr,  SMB2_HDR_SESSION_ID, tree->session->uid);
     178        SIVAL(req->out.hdr,  SMB2_HDR_PID, tree->session->pid);
    178179        SIVAL(req->out.hdr,  SMB2_HDR_TID, tree->tid);
    179180        req->session = tree->session;
  • vendor/current/source4/libcli/smb2/session.c

    r414 r740  
    2727#include "auth/gensec/gensec.h"
    2828
     29#include <unistd.h>
     30
    2931/**
    3032  initialise a smb2_session structure
     
    4648                session->transport = talloc_reference(session, transport);
    4749        }
     50
     51        session->pid = getpid();
    4852
    4953        /* prepare a gensec context for later use */
  • vendor/current/source4/libcli/smb2/smb2.h

    r414 r740  
    104104                void (*func)(struct smb2_transport *, void *);
    105105                void *private_data;
    106                 uint_t period;
     106                unsigned int period;
    107107        } idle;
    108108
     
    146146        struct gensec_security *gensec;
    147147        uint64_t uid;
     148        uint32_t pid;
    148149        DATA_BLOB session_key;
    149150        bool signing_active;
     
    167168        /* each request is in one of 3 possible states */
    168169        enum smb2_request_state state;
    169        
     170
    170171        struct smb2_transport *transport;
    171172        struct smb2_session   *session;
     
    177178                bool do_cancel;
    178179                bool can_cancel;
    179                 uint32_t pending_id;
     180                uint64_t async_id;
    180181        } cancel;
    181182
     
    183184           or code detecting error. */
    184185        NTSTATUS status;
    185        
     186
    186187        struct smb2_request_buffer in;
    187188        struct smb2_request_buffer out;
  • vendor/current/source4/libcli/smb2/transport.c

    r414 r740  
    303303            NT_STATUS_EQUAL(req->status, STATUS_PENDING)) {
    304304                req->cancel.can_cancel = true;
    305                 req->cancel.pending_id = IVAL(hdr, SMB2_HDR_PID);
     305                req->cancel.async_id = BVAL(hdr, SMB2_HDR_ASYNC_ID);
    306306                for (i=0; i< req->cancel.do_cancel; i++) {
    307307                        smb2_cancel(req);
  • vendor/current/source4/libcli/smb2/util.c

    r414 r740  
    2626#include "libcli/smb2/smb2_calls.h"
    2727#include "libcli/smb_composite/smb_composite.h"
     28#include "librpc/gen_ndr/ndr_security.h"
    2829
    2930/*
     
    109110        NTSTATUS status;
    110111        uint32_t total_deleted = 0;
    111         uint_t count, i;
     112        unsigned int count, i;
    112113        union smb_search_data *list;
    113114        TALLOC_CTX *tmp_ctx = talloc_new(tree);
     
    221222        return total_deleted;
    222223}
     224
     225/*
     226  check if two SMB2 file handles are the same
     227*/
     228bool smb2_util_handle_equal(const struct smb2_handle h1,
     229                            const struct smb2_handle h2)
     230{
     231        return (h1.data[0] == h2.data[0]) && (h1.data[1] == h2.data[1]);
     232}
Note: See TracChangeset for help on using the changeset viewer.