fs/ntfs3: Fix junction point resolution
authorDaniel Pinto <danielpinto52@gmail.com>
Wed, 7 Sep 2022 01:45:13 +0000 (02:45 +0100)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 30 Sep 2022 14:39:52 +0000 (17:39 +0300)
commit0a4e7ce6bc03389d75bc62eb6de66cb5efc55839
tree2252215651495cafbacc2b0939dc8b441b415a19
parentcaad9dd8792a2622737b7273cb34835fd9536cd2
fs/ntfs3: Fix junction point resolution

The ntfs3 file system driver does not convert the target path of
junction points to a proper Linux path. As junction points targets
are always absolute paths (they start with a drive letter), all
junctions will result in broken links.

Translate the targets of junction points to relative paths so they
point to directories inside the mounted volume. Note that Windows
allows junction points to reference directories in another drive.
However, as there is no way to know which drive the junctions refer
to, we assume they always target the same file system they are in.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=214833
Signed-off-by: Daniel Pinto <danielpinto52@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/inode.c