[PATCH] Fix bug #11589 - turning off EA's can create files incorrectly.
jra at samba.org
Wed Nov 4 17:40:38 UTC 2015
On Wed, Nov 04, 2015 at 04:12:47AM +0200, Uri Simchoni wrote:
> The SMB1 handlers for this (TRANSACT2_OPEN and NT_TRANSACT_CREATE)
> block it at the protocol level before going to VFS. Which approach
> do you think is more correct?
Hmmmm - I hadn't noticed that before... good point.
> It does seem like a detail of the underlying file system (also
> according to MS-SMB2), but I'm just asking because maybe there were
> good reasons to place this check at the SMB layer...
Haha. Would that that were so. Samba grew more organically
than that over the years :-).
The checks were placed there probably to avoid
having to unmarshall the EA's if the underlying
filesystem didn't support it.
However, the reason to keep them is to allow a VFS that supports
EA's to be overridden if "ea support = no" is set in the
share definition of the smb.conf.
In that spirit, let me propose this patch instead,
which does the same thing at the same level as the
SMB1 checks. The original patch works, but could allow a custom
VFS to override "ea support = no" in smb.conf,
which we shouldn't allow to happen I think.
Can you re-review the attached patch ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1203 bytes
Desc: not available
More information about the samba-technical