Incorrect file size returned in the Respond of "FILE_SUPERSEDE Create"
kdinh at peaxy.net
Mon Apr 27 19:14:41 MDT 2015
We were running a test in IFSTEST suite called "SupersideFileTest". The
test expects file size to be 0 after a successful open request, with
FILE_SUPERSEDE disposition, returned.
While handling FILE_SUPERSEDE disposition, SAMBA call vfswrap_ftruncate()
to truncate the file. However, the file size stored in
fsp->fsp_name->st.st_ex_size was not updated after ftruncate() is called.
As a result, the Create Respond for FILE_SUPERSEDE request contains the
stale file size instead of 0. The existing code simply returns if
ftruncate() succeeded. I moved the code such that we always call
vfs_stat_fsp() to update the file size in fsp->fsp_name->st.st_ex_size.
Could someone verify if the attached patch is correct is should be pulled
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 846 bytes
Desc: not available
More information about the samba-technical