The Samba-Bugzilla – Attachment 3826 Details for
Bug 5990
strict allocate should be checked before ftruncate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
a patch for samba 3.2.6
samba-3.2.6-diskfull.patch (text/plain), 942 bytes, created by
Yasuma Takeda
on 2008-12-24 02:50:27 UTC
(
hide
)
Description:
a patch for samba 3.2.6
Filename:
MIME Type:
Creator:
Yasuma Takeda
Created:
2008-12-24 02:50:27 UTC
Size:
942 bytes
patch
obsolete
>diff -uNrp samba-3.2.6.org/source/smbd/vfs.c samba-3.2.6/source/smbd/vfs.c >--- samba-3.2.6.org/source/smbd/vfs.c 2008-12-10 20:12:23.000000000 +0900 >+++ samba-3.2.6/source/smbd/vfs.c 2008-12-22 13:54:54.000000000 +0900 >@@ -575,6 +575,20 @@ int vfs_allocate_file_space(files_struct > int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len) > { > int ret; >+ connection_struct *conn = fsp->conn; >+ SMB_BIG_UINT space_avail; >+ SMB_BIG_UINT bsize,dfree,dsize; >+ >+ /* available disk space is enough or not? */ >+ if (lp_strict_allocate(SNUM(fsp->conn))){ >+ space_avail = get_dfree_info(conn,fsp->fsp_name,False,&bsize,&dfree,&dsize); >+ /* space_avail is 1k blocks */ >+ if (space_avail == (SMB_BIG_UINT)-1 || >+ ((SMB_BIG_UINT)len/1024 > space_avail) ) { >+ errno = ENOSPC; >+ return -1; >+ } >+ } > > release_level_2_oplocks_on_change(fsp); > DEBUG(10,("vfs_set_filelen: ftruncate %s to len %.0f\n", fsp->fsp_name, (double)len));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5990
:
3826
|
3828