[Samba] NFS quotas: truncated files without warning

Jeremy Allison jra at samba.org
Mon Jun 18 19:21:50 GMT 2007

On Mon, Jun 18, 2007 at 08:48:09PM +0200, SER.RI-TIC - David Losada wrote:
> Hi Jeremy,
> 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
> convenience.
> 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.

This work looks good - it's not a complex change.

The fix will definately be in 3.0.25b, I'll let Simo
pick up the change for RH for their older versions if
he thinks it's warrented.



More information about the samba mailing list