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

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/smbd/ipc.c

    r414 r740  
    2626
    2727#include "includes.h"
     28#include "smbd/smbd.h"
    2829#include "smbd/globals.h"
     30#include "smbprofile.h"
     31#include "rpc_server/srv_pipe_hnd.h"
    2932
    3033#define NERR_notsupported 50
     
    9497        int ldata  = rdata  ? rdata_len : 0;
    9598        int lparam = rparam ? rparam_len : 0;
    96         struct smbd_server_connection *sconn = smbd_server_conn;
     99        struct smbd_server_connection *sconn = req->sconn;
    97100        int max_send = sconn->smb1.sessions.max_send;
    98101
     
    136139
    137140        show_msg((char *)req->outbuf);
    138         if (!srv_send_smb(smbd_server_fd(), (char *)req->outbuf,
     141        if (!srv_send_smb(sconn, (char *)req->outbuf,
    139142                          true, req->seqnum+1,
    140143                          IS_CONN_ENCRYPTED(conn), &req->pcd)) {
     
    196199
    197200                show_msg((char *)req->outbuf);
    198                 if (!srv_send_smb(smbd_server_fd(), (char *)req->outbuf,
     201                if (!srv_send_smb(sconn, (char *)req->outbuf,
    199202                                  true, req->seqnum+1,
    200203                                  IS_CONN_ENCRYPTED(conn), &req->pcd))
     
    228231        struct tevent_req *subreq;
    229232        struct dcerpc_cmd_state *state;
     233        bool busy;
    230234
    231235        if (!fsp_is_np(fsp)) {
    232236                api_no_reply(conn, req);
     237                return;
     238        }
     239
     240        /*
     241         * Trans requests are only allowed
     242         * if no other Trans or Read is active
     243         */
     244        busy = np_read_in_progress(fsp->fake_file_handle);
     245        if (busy) {
     246                reply_nterror(req, NT_STATUS_PIPE_BUSY);
    233247                return;
    234248        }
     
    303317 send:
    304318        if (!srv_send_smb(
    305                     smbd_server_fd(), (char *)req->outbuf,
     319                    req->sconn, (char *)req->outbuf,
    306320                    true, req->seqnum+1,
    307321                    IS_CONN_ENCRYPTED(req->conn) || req->encrypted,
    308322                    &req->pcd)) {
    309                 exit_server_cleanly("construct_reply: srv_send_smb failed.");
     323                exit_server_cleanly("api_dcerpc_cmd_write_done: "
     324                                    "srv_send_smb failed.");
    310325        }
    311326        TALLOC_FREE(req);
     
    330345                reply_nterror(req, status);
    331346
    332                 if (!srv_send_smb(smbd_server_fd(), (char *)req->outbuf,
     347                if (!srv_send_smb(req->sconn, (char *)req->outbuf,
    333348                                  true, req->seqnum+1,
    334349                                  IS_CONN_ENCRYPTED(req->conn)
    335350                                  ||req->encrypted, &req->pcd)) {
    336                         exit_server_cleanly("construct_reply: srv_send_smb "
    337                                             "failed.");
     351                        exit_server_cleanly("api_dcerpc_cmd_read_done: "
     352                                            "srv_send_smb failed.");
    338353                }
    339354                TALLOC_FREE(req);
Note: See TracChangeset for help on using the changeset viewer.