diff --git a/include/ntfs-3g/layout.h b/include/ntfs-3g/layout.h index 1df07b98..fd6ad2c6 100644 --- a/include/ntfs-3g/layout.h +++ b/include/ntfs-3g/layout.h @@ -2412,8 +2412,13 @@ typedef struct { * be slow. (E.g. the data is stored on a tape drive.) * bit 31: Microsoft bit. If set, the tag is owned by Microsoft. User * defined tags have to use zero here. + * 4. However, on Windows 10 : + * Some flags may be used in bits 12 to 15 to further describe the + * reparse point, and bit 28 may be set, probably to signal the + * presence of these flags. */ typedef enum { + IO_REPARSE_TAG_WITH_FLAGS = const_cpu_to_le32(0x10000000), IO_REPARSE_TAG_IS_ALIAS = const_cpu_to_le32(0x20000000), IO_REPARSE_TAG_IS_HIGH_LATENCY = const_cpu_to_le32(0x40000000), IO_REPARSE_TAG_IS_MICROSOFT = const_cpu_to_le32(0x80000000), @@ -2436,10 +2441,12 @@ typedef enum { IO_REPARSE_TAG_DFM = const_cpu_to_le32(0x80000016), IO_REPARSE_TAG_WOF = const_cpu_to_le32(0x80000017), IO_REPARSE_TAG_WCI = const_cpu_to_le32(0x80000018), + IO_REPARSE_TAG_CLOUD = const_cpu_to_le32(0x9000001A), IO_REPARSE_TAG_GVFS = const_cpu_to_le32(0x9000001C), IO_REPARSE_TAG_LX_SYMLINK = const_cpu_to_le32(0xA000001D), IO_REPARSE_TAG_VALID_VALUES = const_cpu_to_le32(0xf000ffff), + IO_REPARSE_PLUGIN_SELECT = const_cpu_to_le32(0xffff0fff), } PREDEFINED_REPARSE_TAGS; /** diff --git a/ntfsprogs/ntfsinfo.c b/ntfsprogs/ntfsinfo.c index 94660b95..0eb7bae9 100644 --- a/ntfsprogs/ntfsinfo.c +++ b/ntfsprogs/ntfsinfo.c @@ -8,7 +8,7 @@ * Copyright (c) 2004-2005 Yuval Fledel * Copyright (c) 2004-2007 Yura Pakhuchiy * Copyright (c) 2005 Cristian Klein - * Copyright (c) 2011-2017 Jean-Pierre Andre + * Copyright (c) 2011-2018 Jean-Pierre Andre * * This utility will dump a file's attributes. * @@ -119,7 +119,7 @@ static void version(void) printf(" 2003 Leonard NorrgÄrd\n"); printf(" 2004-2005 Yuval Fledel\n"); printf(" 2004-2007 Yura Pakhuchiy\n"); - printf(" 2011-2017 Jean-Pierre Andre\n"); + printf(" 2011-2018 Jean-Pierre Andre\n"); printf("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } @@ -411,8 +411,12 @@ static char *ntfs_attr_get_name_mbs(ATTR_RECORD *attr) static const char *reparse_type_name(le32 tag) { const char *name; + le32 seltag; - switch (tag) { + seltag = tag; + if (tag & IO_REPARSE_TAG_WITH_FLAGS) + seltag &= IO_REPARSE_PLUGIN_SELECT; + switch (seltag) { case IO_REPARSE_TAG_MOUNT_POINT : name = " (mount point)"; break; @@ -428,6 +432,9 @@ static const char *reparse_type_name(le32 tag) case IO_REPARSE_TAG_WCI : name = " (Windows container)"; break; + case IO_REPARSE_TAG_CLOUD : + name = " (Cloud)"; + break; case IO_REPARSE_TAG_NFS : name = " (NFS symlink)"; break; diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index 8fd7ee11..7f3247df 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -1,7 +1,7 @@ /** * ntfs-3g_common.c - Common definitions for ntfs-3g and lowntfs-3g. * - * Copyright (c) 2010-2016 Jean-Pierre Andre + * Copyright (c) 2010-2018 Jean-Pierre Andre * Copyright (c) 2010 Erik Larsson * * This program/include file is free software; you can redistribute it and/or @@ -801,7 +801,7 @@ const struct plugin_operations *select_reparse_plugin(ntfs_fuse_context_t *ctx, const struct plugin_operations *ops; void *handle; REPARSE_POINT *reparse; - le32 tag; + le32 tag, seltag; plugin_list_t *plugin; plugin_init_t pinit; @@ -809,7 +809,10 @@ const struct plugin_operations *select_reparse_plugin(ntfs_fuse_context_t *ctx, reparse = ntfs_get_reparse_point(ni); if (reparse) { tag = reparse->reparse_tag; - for (plugin=ctx->plugins; plugin && (plugin->tag != tag); + seltag = tag; + if (tag & IO_REPARSE_TAG_WITH_FLAGS) + seltag &= IO_REPARSE_PLUGIN_SELECT; + for (plugin=ctx->plugins; plugin && (plugin->tag != seltag); plugin = plugin->next) { } if (plugin) { ops = plugin->ops; @@ -819,12 +822,12 @@ const struct plugin_operations *select_reparse_plugin(ntfs_fuse_context_t *ctx, snprintf(name,sizeof(name), PLUGIN_DIR "/ntfs-plugin-%08lx.so", - (long)le32_to_cpu(tag)); + (long)le32_to_cpu(seltag)); #else char name[64]; snprintf(name,sizeof(name), "ntfs-plugin-%08lx.so", - (long)le32_to_cpu(tag)); + (long)le32_to_cpu(seltag)); #endif handle = dlopen(name, RTLD_LAZY); if (handle) { @@ -833,7 +836,7 @@ const struct plugin_operations *select_reparse_plugin(ntfs_fuse_context_t *ctx, /* pinit() should set errno if it fails */ ops = (*pinit)(tag); if (ops && register_reparse_plugin(ctx, - tag, ops, handle)) + seltag, ops, handle)) ops = (struct plugin_operations*)NULL; } else errno = ELIBBAD;