]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: fix default permissions on new files when mounting with modefromsid
authorSteve French <stfrench@microsoft.com>
Fri, 17 Jan 2020 01:55:33 +0000 (19:55 -0600)
committerSteve French <stfrench@microsoft.com>
Mon, 27 Jan 2020 01:24:17 +0000 (19:24 -0600)
commit4d296426cd5029295bf42a37afb48a34c5c60591
tree54a07ac880d8fd9800ddf0e9440c01856f712434
parent181230de4216dc688904b355a3915372acfa6ba9
smb3: fix default permissions on new files when mounting with modefromsid

When mounting with "modefromsid" mount parm most servers will require
that some default permissions are given to users in the ACL on newly
created files, files created with the new 'sd context' - when passing in
an sd context on create, permissions are not inherited from the parent
directory, so in addition to the ACE with the special SID which contains
the mode, we also must pass in an ACE allowing users to access the file
(GENERIC_ALL for authenticated users seemed like a reasonable default,
although later we could allow a mount option or config switch to make
it GENERIC_ALL for EVERYONE special sid).

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-By: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/cifsacl.c
fs/cifs/cifsproto.h
fs/cifs/smb2pdu.c