]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 12 Oct 2017 14:28:20 +0000 (15:28 +0100)
commita2b22f20316fa2b6a523089c9348bec6c95d833e
tree11823a2365b0325864ba88b217a6fda46a4b2008
parentf747d99ca6b0100f8978a52f24590542feae25d5
fs/cifs: make share unaccessible at root level mountable

commit a6b5058fafdf508904bbf16c29b24042cef3c496 upstream.

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>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.16: use Jiri Slaby's backport of the change in
 cifs_root_iget()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cifs/cifs_fs_sb.h
fs/cifs/cifsfs.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/inode.c