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)
committerSteve French <smfrench@gmail.com>
Thu, 28 Jul 2016 03:50:55 +0000 (22:50 -0500)
commita6b5058fafdf508904bbf16c29b24042cef3c496
tree608fb6daff9de4338e6a19661d27e54a517cf4a1
parentbd975d1eead2558b76e1079e861eacf1f678b73b
fs/cifs: make share unaccessible at root level mountable

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>
fs/cifs/cifs_fs_sb.h
fs/cifs/cifsfs.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/inode.c