[Samba] NFS quotas: truncated files without warning
SER.RI-TIC - David Losada
david.losada at urv.cat
Mon Jun 18 18:48:09 GMT 2007
actually, I have adapted your patch for applying to the current RHEL4
Samba release (samba-3.0.10-1.4E.12.2). Would you mind to check if I
have made any flagrant mistakes? If anyone reads this and decides to try
it, please bear in mind it's experimental.
Summary of what I have modified from your patch:
* no patch for smbd/aio.c , because it's just not there yet in this release
* in smbd/fileio.c:sync_file() , doesn't check for the "sync always"
directive, the check's not originally there
* in smbd/fileio.c:sync_file() , for accessing the fd, it's just
"fsp->fd", not "fsp->fh->fd"
* in smbd/reply.c:reply_write() , ignored the hunk around
CHECK_WRITE(fsp), because in this release that check is not made
* took into account that the checking of conditions for forcing
synchronization (lp_strict_sync, lp_sync_always, write_through) hadn't
yet been refactored into the fileio.c:sync_file() function
If patching from a vanilla samba-3.0.10 release, should apply the
"smbd_deferred_open_backport" patch first. I'm also attaching it for
If your patch makes it to next Samba official release, and this patch
receives your blessing, could we put them in consideration of RedHat for
an errata? The fact it helps to avoid silent data corruption in an
scenario like ours, should be interesting for them.
En/na Jeremy Allison ha escrit:
> On Fri, Jun 15, 2007 at 08:23:49PM +0200, SER.RI-TIC - David Losada wrote:
>> mmm... well, it doesn't seem to be working like that in the version that
>> ships with RHEL4. I will get around to try it on a fresh build on monday
>> and report to you about it.
> Apply this patch and let me know if it fixes it (will be in 3.0.25b).
More information about the samba