[Samba] NFS quotas: truncated files without warning

SER.RI-TIC - David Losada david.losada at urv.cat
Tue Jun 19 14:15:05 GMT 2007

Opened bug in RHs bugzilla (
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=244848 )

En/na simo ha escrit:
> On Mon, 2007-06-18 at 12:21 -0700, Jeremy Allison wrote:
>> 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.
> I'd really prefer an entry in RHs bugzilla to be able to easily pick it
> up :-)
> Simo.

More information about the samba mailing list