]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs/cifs: make share unaccessible at root level mountable
authorAurelien Aptel <aaptel@suse.com>
Wed, 25 May 2016 17:59:09 +0000 (19:59 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:08 +0000 (17:22 -0500)
commit78307a6fc282c2c3dd1ca66309d7faaf46389b52
tree930eaee83bdc2bb3b4db601233e8408651def69c
parent037ad9d4083f7dd19ee8a0e8b8f9648e740b38a8
fs/cifs: make share unaccessible at root level mountable

Orabug: 25308138

[ Upstream commit a6b5058fafdf508904bbf16c29b24042cef3c496 ]

if, when mounting //HOST/share/sub/dir/foo we can query /sub/dir/foo but
not any of the path components above:

- store the /sub/dir/foo prefix in the cifs super_block info
- in the superblock, set root dentry to the subpath dentry (instead of
  the share root)
- set a flag in the superblock to remember it
- use prefixpath when building path from a dentry

fixes bso#8950

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
(cherry picked from commit b7e61a108f9fccd8d1b90ffe62704b929ba841eb)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
fs/cifs/cifs_fs_sb.h
fs/cifs/cifsfs.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/inode.c