diff options
author | Boris Protopopov <pboris@amazon.com> | 2020-12-17 23:58:08 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-12-19 08:32:04 +0300 |
commit | 9541b81322e60120b299222919957becd7a13683 (patch) | |
tree | e8f685b2da9e36c575780539ca5381e931e6290b /fs/cifs/smb2ops.c | |
parent | 3970acf7ddb9aa01c4bdeef197495157c98a15f6 (diff) | |
download | linux-9541b81322e60120b299222919957becd7a13683.tar.xz |
Add SMB 2 support for getting and setting SACLs
Fix passing of the additional security info via version
operations. Force new open when getting SACL and avoid
reuse of files that were previously open without
sufficient privileges to access SACLs.
Signed-off-by: Boris Protopopov <pboris@amazon.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 4a1761139e00..f19274857292 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -3369,9 +3369,9 @@ get_smb2_acl(struct cifs_sb_info *cifs_sb, struct cifs_ntsd *pntsd = NULL; struct cifsFileInfo *open_file = NULL; - if (inode) + if (inode && !(info & SACL_SECINFO)) open_file = find_readable_file(CIFS_I(inode), true); - if (!open_file) + if (!open_file || (info & SACL_SECINFO)) return get_smb2_acl_by_path(cifs_sb, path, pacllen, info); pntsd = get_smb2_acl_by_fid(cifs_sb, &open_file->fid, pacllen, info); |