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

Samba Server: updated vendor to 3.6.9

File:
1 edited

Legend:

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

    r740 r746  
    452452                                        p_unread, &len);
    453453        if (!NT_STATUS_IS_OK(status)) {
    454                 DEBUG(1, ("read_smb_length_return_keepalive failed for "
    455                           "client %s read error = %s.\n",
    456                           sconn->client_id.addr, nt_errstr(status)));
     454                DEBUG(NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)?5:1,
     455                      ("receive_smb_raw_talloc failed for client %s "
     456                       "read error = %s.\n",
     457                       sconn->client_id.addr, nt_errstr(status)));
    457458                return status;
    458459        }
     
    14421443        /* Make sure this is an SMB packet. smb_size contains NetBIOS header
    14431444         * so subtract 4 from it. */
    1444         if (!valid_smb_header(req->inbuf)
    1445             || (size < (smb_size - 4))) {
     1445        if ((size < (smb_size - 4)) ||
     1446            !valid_smb_header(req->inbuf)) {
    14461447                DEBUG(2,("Non-SMB packet of length %d. Terminating server\n",
    14471448                         smb_len(req->inbuf)));
     
    20892090
    20902091        /*
    2091          * Check if the client tries to fool us. The request so far uses the
    2092          * space to the end of the byte buffer in the request just
    2093          * processed. The chain_offset can't point into that area. If that was
    2094          * the case, we could end up with an endless processing of the chain,
    2095          * we would always handle the same request.
     2092         * Check if the client tries to fool us. The chain offset
     2093         * needs to point beyond the current request in the chain, it
     2094         * needs to strictly grow. Otherwise we might be tricked into
     2095         * an endless loop always processing the same request over and
     2096         * over again. We used to assume that vwv and the byte buffer
     2097         * array in a chain are always attached, but OS/2 the
     2098         * Write&X/Read&X chain puts the Read&X vwv array right behind
     2099         * the Write&X vwv chain. The Write&X bcc array is put behind
     2100         * the Read&X vwv array. So now we check whether the chain
     2101         * offset points strictly behind the previous vwv
     2102         * array. req->buf points right after the vwv array of the
     2103         * previous request. See
     2104         * https://bugzilla.samba.org/show_bug.cgi?id=8360 for more
     2105         * information.
    20962106         */
    20972107
    2098         already_used = PTR_DIFF(req->buf+req->buflen, smb_base(req->inbuf));
    2099         if (chain_offset < already_used) {
     2108        already_used = PTR_DIFF(req->buf, smb_base(req->inbuf));
     2109        if (chain_offset <= already_used) {
    21002110                goto error;
    21012111        }
     
    27982808 * Handle SMBecho requests in a forked child process
    27992809 */
    2800 static bool fork_echo_handler(struct smbd_server_connection *sconn)
     2810bool fork_echo_handler(struct smbd_server_connection *sconn)
    28012811{
    28022812        int listener_pipe[2];
     
    29122922        int ret;
    29132923
    2914         if (lp_maxprotocol() == PROTOCOL_SMB2 &&
    2915             !lp_async_smb_echo_handler()) {
     2924        if (lp_maxprotocol() == PROTOCOL_SMB2) {
    29162925                /*
    29172926                 * We're not making the decision here,
     
    30343043        }
    30353044
    3036         if (lp_async_smb_echo_handler() && !fork_echo_handler(sconn)) {
    3037                 exit_server("Failed to fork echo handler");
    3038         }
    3039 
    30403045        /* Setup oplocks */
    30413046        if (!init_oplocks(sconn->msg_ctx))
Note: See TracChangeset for help on using the changeset viewer.