diff options
author | Aurelien Aptel | 2020-02-06 18:16:55 +0100 |
---|---|---|
committer | Steve French | 2020-02-06 17:19:38 -0600 |
commit | e3e056c35108661e418c803adfc054bf683426e7 (patch) | |
tree | 3838d53d8bd718d1c6fb8dc12f7a60e1b107afa6 /fs/minix | |
parent | cc95b6772790c476b2c2de09abec739120593d98 (diff) |
cifs: fix mode bits from dir listing when mounted with modefromsid
When mounting with -o modefromsid, the mode bits are stored in an
ACE. Directory enumeration (e.g. ls -l /mnt) triggers an SMB Query Dir
which does not include ACEs in its response. The mode bits in this
case are silently set to a default value of 755 instead.
This patch marks the dentry created during the directory enumeration
as needing re-evaluation (i.e. additional Query Info with ACEs) so
that the mode bits can be properly extracted.
Quick repro:
$ mount.cifs //win19.test/data /mnt -o ...,modefromsid
$ touch /mnt/foo && chmod 751 /mnt/foo
$ stat /mnt/foo
# reports 751 (OK)
$ sleep 2
# dentry older than 1s by default get invalidated
$ ls -l /mnt
# since dentry invalid, ls does a Query Dir
# and reports foo as 755 (WRONG)
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/minix')
0 files changed, 0 insertions, 0 deletions