Ignore:
Timestamp:
May 27, 2009, 9:09:42 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/modules/vfs_default.c

    r141 r232  
    715715                return sys_ftruncate(fsp->fh->fd, len);
    716716
     717        /* available disk space is enough or not? */
     718        if (lp_strict_allocate(SNUM(fsp->conn))){
     719                SMB_BIG_UINT space_avail;
     720                SMB_BIG_UINT bsize,dfree,dsize;
     721
     722                space_avail = get_dfree_info(fsp->conn,fsp->fsp_name,false,&bsize,&dfree,&dsize);
     723                /* space_avail is 1k blocks */
     724                if (space_avail == (SMB_BIG_UINT)-1 ||
     725                                ((SMB_BIG_UINT)space_to_write/1024 > space_avail) ) {
     726                        errno = ENOSPC;
     727                        return -1;
     728                }
     729        }
     730
    717731        /* Write out the real space on disk. */
    718732        if (SMB_VFS_LSEEK(fsp, st.st_size, SEEK_SET) != st.st_size)
Note: See TracChangeset for help on using the changeset viewer.