fs/cifs: make share unaccessible at root level mountable
authorAurelien Aptel <aaptel@suse.com>
Thu, 26 Jan 2017 13:25:49 +0000 (14:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 06:03:00 +0000 (08:03 +0200)
commita9baa44162bf847ea97ea179e9b37d25a75a8c99
tree7b1f3519128d94d27adb5a1231e5dbe878c72a25
parent60f2c2fa044c5e127bfa01b2c0bae00d7711acc1
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/cifs/cifs_fs_sb.h
fs/cifs/cifsfs.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/inode.c