chmod via unix extensions cut by "create mask"/"directory mask" - intended?

Jeremy Allison jra at samba.org
Wed Aug 21 09:45:24 MDT 2013


On Wed, Aug 21, 2013 at 05:27:57PM +0200, Michael Adam wrote:
> Hi Jeremy,
> 
> in unix_perms_from_wire() as called from
> smb_set_file_unix_basic(), we apply the
> create mask (or directory mask) to the permissions,
> even if the file already existed, as is the
> case for the smb_set_file_unix_basic() call
> which is used, e.g. when a cifs-mount with
> unix extensions is connected to the Samba
> server.
> 
> This effectively restricts chmod by the
> create mask and directory mask.
> This is different from the behaviour when
> setting NT ACLs, where the masks do not
> restrict.
> 
> Shouldn't we change this to allow chmod over
> cifs-mount with unix extensions?
> Or is there a subtle reason for this restriction?

No, that's just a bug :-(. I thought we'd gone
through these carefully - must have missed one.

> The obvious patch would be to change the
> switch statement in unix_perms_from_wire(),
> but I am not 100% certain about possible side
> effects, when e.g. called from smb_posix_open().

Let me take a look.

Thanks,

Jeremy.


More information about the samba-technical mailing list