[PATCH] SMB2: fix allocation size return value when opening existing files

Jeremy Allison jra at samba.org
Mon Oct 10 10:44:33 MDT 2011

On Mon, Oct 10, 2011 at 06:09:40PM +0200, Christian M Ambach wrote:
> Hi Jeremy,
> hi Metze,
> I wanted to run this patch by you for sanity checking before pushing it.
> While looking at the some network traces, I found that in the reply
> to a SMB2 CreateFile request that opens an existing file, the reported
> allocation size of the file was much too large.
> e.g. 25769803776000 while the file size actually had 12582912000 bytes.
> FileInfo calls report the correct value, so I thought it would be
> a good idea to sync up the code of CreateFile with the FileInfo
> code.
> Is this fix good to push or did I miss potential sideeffects?

No - looks completely correct and matches exactly what we do
in SMB2 NTCreateX. Feel free to push to autobuild (I'm going
to do this also, don't mind which one gets through first :-).

I'll raise a bug against 3.6.1 to get this into the next

Thanks !


More information about the samba-technical mailing list