Ignore:
Timestamp:
May 20, 2009, 6:46:53 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/smbd/nttrans.c

    r136 r204  
    114114                                    + data_alignment_offset);
    115115
    116         /*
    117          * useable_space can never be more than max_send minus the
    118          * alignment offset.
    119          */
    120 
    121         useable_space = MIN(useable_space,
    122                                 max_send - (alignment_offset+data_alignment_offset));
    123 
     116        if (useable_space < 0) {
     117                DEBUG(0, ("send_nt_replies failed sanity useable_space "
     118                          "= %d!!!", useable_space));
     119                exit_server_cleanly("send_nt_replies: srv_send_smb failed.");
     120        }
    124121
    125122        while (params_to_send || data_to_send) {
     
    129126                 */
    130127
    131                 total_sent_thistime = params_to_send + data_to_send +
    132                                         alignment_offset + data_alignment_offset;
     128                total_sent_thistime = params_to_send + data_to_send;
    133129
    134130                /*
     
    138134                total_sent_thistime = MIN(total_sent_thistime, useable_space);
    139135
    140                 reply_outbuf(req, 18, total_sent_thistime);
     136                reply_outbuf(req, 18,
     137                             total_sent_thistime + alignment_offset
     138                             + data_alignment_offset);
    141139
    142140                /*
     
    265263                        DEBUG(0,("send_nt_replies failed sanity check pts = %d, dts = %d\n!!!",
    266264                                params_to_send, data_to_send));
    267                         return;
     265                        exit_server_cleanly("send_nt_replies: internal error");
    268266                }
    269267        }
     
    489487                        (unsigned int)root_dir_fid,
    490488                        fname));
     489
     490        /*
     491         * we need to remove ignored bits when they come directly from the client
     492         * because we reuse some of them for internal stuff
     493         */
     494        create_options &= ~NTCREATEX_OPTIONS_MUST_IGNORE_MASK;
    491495
    492496        /*
     
    900904#endif
    901905
     906        /*
     907         * we need to remove ignored bits when they come directly from the client
     908         * because we reuse some of them for internal stuff
     909         */
     910        create_options &= ~NTCREATEX_OPTIONS_MUST_IGNORE_MASK;
     911
    902912        /* Ensure the data_len is correct for the sd and ea values given. */
    903913        if ((ea_len + sd_len > data_count)
Note: See TracChangeset for help on using the changeset viewer.