> -----Original Message-----
> From: [email protected] [mailto:cifs-protocol-
> [email protected]] On Behalf Of Bill Wesse
> Sent: Tuesday, December 08, 2009 6:08 AM
> To: Tim Prouty
> Cc: [email protected]; [email protected]
> Subject: Re: [cifs-protocol] [Pfif] SMB1 Trans2SetPathInfo()
> FileEndOfFileInformation is not enforcing share modes
> 
> 3. Client 2 does a Trans2SetPathInfo() with the undocumented
>    pass-through level that also allows setting the
>    FileEndOfFileInformation (1020 / 0x3FC).  The client specifies that
>    it wants to extend the file size to 100.  Interestingly, win7 and
>    winXP will return NT_STATUS_SUCCESS and successfully extend the
>    length of the file.  This operation seems to be circumventing the
>    share mode enforcement.
[...] 
> #3 is correct behavior. Sending an SMB_COM_TRANSACTION2 request for
> SET_PATH_INFORMATION with SMB_INFO_PASSTHROUGH +
> FileEndOfFileInformation is
> functionally equivalent to a remote call to NtSetInformationFile.

Thanks for the information on what a Windows server does. You should
consider revisiting this decision, though, as it's a fairly serious data
integrity issue. It's not just the file extension case that you need to
consider - you're saying the client can *truncate* all of the data of
the file without any share mode lock enforcement.

...Zach
_______________________________________________
cifs-protocol mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/cifs-protocol

Reply via email to