diff options
author | Steve French <stfrench@microsoft.com> | 2020-10-20 10:02:02 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-10-20 19:51:24 +0300 |
commit | 9934430e2178d5164eb1ac91a9b092f9e7e64745 (patch) | |
tree | 27b267463591d6f552b00d5e931bd1a1529be700 /fs/cifs/readdir.c | |
parent | 9eec21bfbe9096141f15c624d3d0c2142121f6cb (diff) | |
download | linux-9934430e2178d5164eb1ac91a9b092f9e7e64745.tar.xz |
SMB3.1.1: Fix ids returned in POSIX query dir
We were setting the uid/gid to the default in each dir entry
in the parsing of the POSIX query dir response, rather
than attempting to map the user and group SIDs returned by
the server to well known SIDs (or upcall if not found).
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 31a18aae5e64..5abf1ea21abe 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -267,9 +267,8 @@ cifs_posix_to_fattr(struct cifs_fattr *fattr, struct smb2_posix_info *info, if (reparse_file_needs_reval(fattr)) fattr->cf_flags |= CIFS_FATTR_NEED_REVAL; - /* TODO map SIDs */ - fattr->cf_uid = cifs_sb->mnt_uid; - fattr->cf_gid = cifs_sb->mnt_gid; + sid_to_id(cifs_sb, &parsed.owner, fattr, SIDOWNER); + sid_to_id(cifs_sb, &parsed.group, fattr, SIDGROUP); } static void __dir_info_to_fattr(struct cifs_fattr *fattr, const void *info) |