Ignore:
Timestamp:
May 29, 2008, 11:30:31 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.30

Location:
branches/samba-3.0/source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/VERSION

    r134 r135  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=0
    28 SAMBA_VERSION_RELEASE=29
     28SAMBA_VERSION_RELEASE=30
    2929
    3030########################################################
  • branches/samba-3.0/source/client/client.c

    r124 r135  
    36273627        */
    36283628        if (FD_ISSET(cli->fd,&fds)) {
    3629                 if (!receive_smb(cli->fd,cli->inbuf,0)) {
     3629                if (!receive_smb(cli->fd,cli->inbuf,cli->bufsize,0)) {
    36303630                        DEBUG(0, ("Read from server failed, maybe it closed the "
    36313631                                "connection\n"));
  • branches/samba-3.0/source/client/smbctool.c

    r22 r135  
    33053305        */
    33063306        if (FD_ISSET(cli->fd,&fds)) {
    3307                 receive_smb(cli->fd,cli->inbuf,0);
     3307                receive_smb(cli->fd,cli->inbuf,cli->bufsize,0);
    33083308                goto again;
    33093309        }
  • branches/samba-3.0/source/include/version.h

    r134 r135  
    22#define SAMBA_VERSION_MAJOR 3
    33#define SAMBA_VERSION_MINOR 0
    4 #define SAMBA_VERSION_RELEASE 29
    5 #define SAMBA_VERSION_OFFICIAL_STRING "3.0.29"
     4#define SAMBA_VERSION_RELEASE 30
     5#define SAMBA_VERSION_OFFICIAL_STRING "3.0.30"
    66#define SAMBA_VERSION_STRING samba_version_string()
  • branches/samba-3.0/source/lib/util_sock.c

    r30 r135  
    697697
    698698/****************************************************************************
    699  Read an smb from a fd. Note that the buffer *MUST* be of size
    700  BUFFER_SIZE+SAFETY_MARGIN.
     699 Read an smb from a fd.
    701700 The timeout is in milliseconds.
    702701 This function will return on receipt of a session keepalive packet.
     
    704703****************************************************************************/
    705704
    706 BOOL receive_smb_raw(int fd, char *buffer, unsigned int timeout)
     705BOOL receive_smb_raw(int fd, char *buffer, size_t buflen, unsigned int timeout)
    707706{
    708707        ssize_t len,ret;
     
    725724        }
    726725
    727         /*
    728          * A WRITEX with CAP_LARGE_WRITEX can be 64k worth of data plus 65 bytes
    729          * of header. Don't print the error if this fits.... JRA.
    730          */
    731 
    732         if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) {
     726        if (len > buflen) {
    733727                DEBUG(0,("Invalid packet length! (%lu bytes).\n",(unsigned long)len));
    734                 if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) {
    735 
    736                         /*
    737                          * Correct fix. smb_read_error may have already been
    738                          * set. Only set it here if not already set. Global
    739                          * variables still suck :-). JRA.
    740                          */
    741 
    742                         if (smb_read_error == 0)
    743                                 smb_read_error = READ_ERROR;
    744                         return False;
    745                 }
     728
     729                /*
     730                 * smb_read_error may have already been
     731                 * set. Only set it here if not already set. Global
     732                 * variables still suck :-). JRA.
     733                 */
     734
     735                if (smb_read_error == 0)
     736                        smb_read_error = READ_ERROR;
     737                return False;
    746738        }
    747739
     
    773765****************************************************************************/
    774766
    775 BOOL receive_smb(int fd, char *buffer, unsigned int timeout)
    776 {
    777         if (!receive_smb_raw(fd, buffer, timeout)) {
     767BOOL receive_smb(int fd, char *buffer, size_t buflen, unsigned int timeout)
     768{
     769        if (!receive_smb_raw(fd, buffer, buflen, timeout)) {
    778770                return False;
    779771        }
  • branches/samba-3.0/source/libsmb/clientgen.c

    r30 r135  
    4545
    4646/****************************************************************************
    47  Read an smb from a fd ignoring all keepalive packets. Note that the buffer
    48  *MUST* be of size BUFFER_SIZE+SAFETY_MARGIN.
     47 Read an smb from a fd ignoring all keepalive packets.
    4948 The timeout is in milliseconds
    5049
     
    5554****************************************************************************/
    5655
    57 static BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout)
     56static BOOL client_receive_smb(int fd,char *buffer, size_t bufsize, unsigned int timeout)
    5857{
    5958        BOOL ret;
    6059
    6160        for(;;) {
    62                 ret = receive_smb_raw(fd, buffer, timeout);
     61                ret = receive_smb_raw(fd, buffer, bufsize, timeout);
    6362
    6463                if (!ret) {
     
    8988
    9089 again:
    91         ret = client_receive_smb(cli->fd,cli->inbuf,cli->timeout);
     90        ret = client_receive_smb(cli->fd,cli->inbuf, cli->bufsize, cli->timeout);
    9291       
    9392        if (ret) {
  • branches/samba-3.0/source/smbd/process.c

    r30 r135  
    522522        }
    523523
    524         return receive_smb(smbd_server_fd(), buffer, 0);
     524        return receive_smb(smbd_server_fd(), buffer,
     525                        BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE, 0);
    525526}
    526527
  • branches/samba-3.0/source/utils/smbfilter.c

    r1 r135  
    141141               
    142142                if (c != -1 && FD_ISSET(c, &fds)) {
    143                         if (!receive_smb(c, packet, 0)) {
     143                        if (!receive_smb(c, packet, BUFFER_SIZE, 0)) {
    144144                                d_printf("client closed connection\n");
    145145                                exit(0);
     
    152152                }
    153153                if (s != -1 && FD_ISSET(s, &fds)) {
    154                         if (!receive_smb(s, packet, 0)) {
     154                        if (!receive_smb(s, packet, BUFFER_SIZE, 0)) {
    155155                                d_printf("server closed connection\n");
    156156                                exit(0);
Note: See TracChangeset for help on using the changeset viewer.