From 3f65ccd9496451397f92e537a0d3defd97e854da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sun, 8 Mar 2020 10:17:21 +0100 Subject: [PATCH] Exported the translations of Windows paths The translations of Windows paths designed for translating Windows symlinks and mount points may also be used in plugins for translation execlinks, so make them available. --- include/ntfs-3g/reparse.h | 3 +++ include/ntfs-3g/volume.h | 2 +- libntfs-3g/reparse.c | 2 +- src/lowntfs-3g.c | 1 + src/ntfs-3g.c | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/ntfs-3g/reparse.h b/include/ntfs-3g/reparse.h index 76af9150..9109762b 100644 --- a/include/ntfs-3g/reparse.h +++ b/include/ntfs-3g/reparse.h @@ -30,6 +30,9 @@ BOOL ntfs_possible_symlink(ntfs_inode *ni); int ntfs_get_ntfs_reparse_data(ntfs_inode *ni, char *value, size_t size); +char *ntfs_get_abslink(ntfs_volume *vol, ntfschar *junction, + int count, const char *mnt_point, BOOL isdir); + REPARSE_POINT *ntfs_get_reparse_point(ntfs_inode *ni); int ntfs_set_ntfs_reparse_data(ntfs_inode *ni, const char *value, diff --git a/include/ntfs-3g/volume.h b/include/ntfs-3g/volume.h index cee91e21..bbb61203 100644 --- a/include/ntfs-3g/volume.h +++ b/include/ntfs-3g/volume.h @@ -274,7 +274,7 @@ struct _ntfs_volume { #if CACHE_LEGACY_SIZE struct CACHE_HEADER *legacy_cache; #endif - + const char *abs_mnt_point; /* Mount point */ }; extern const char *ntfs_home; diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c index 2e92fbb6..c1d226be 100644 --- a/libntfs-3g/reparse.c +++ b/libntfs-3g/reparse.c @@ -604,7 +604,7 @@ static char *ntfs_get_fulllink(ntfs_volume *vol, ntfschar *junction, * or NULL if there were some problem, as described by errno */ -static char *ntfs_get_abslink(ntfs_volume *vol, ntfschar *junction, +char *ntfs_get_abslink(ntfs_volume *vol, ntfschar *junction, int count, const char *mnt_point, BOOL isdir) { char *target; diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index b0ef839d..d005e683 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -4516,6 +4516,7 @@ int main(int argc, char *argv[]) if (ctx->blkdev && set_fuseblk_options(&parsed_options)) goto err_out; + ctx->vol->abs_mnt_point = ctx->abs_mnt_point; ctx->security.vol = ctx->vol; ctx->vol->secure_flags = ctx->secure_flags; #ifdef HAVE_SETXATTR /* extended attributes interface required */ diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index cacb1b92..b5d425e4 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -4257,6 +4257,7 @@ int main(int argc, char *argv[]) if (ctx->blkdev && set_fuseblk_options(&parsed_options)) goto err_out; + ctx->vol->abs_mnt_point = ctx->abs_mnt_point; ctx->security.vol = ctx->vol; ctx->vol->secure_flags = ctx->secure_flags; #ifdef HAVE_SETXATTR /* extended attributes interface required */