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

Michael Adam obnox at samba.org
Wed Aug 21 09:27:57 MDT 2013


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?

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().

Hence I ask you for advice.

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130821/b3e9b0bb/attachment.pgp>


More information about the samba-technical mailing list