Hello,

I noticed in the documentation (and confirmed with some random pages of
MS documentation) that reparse points are not supposed to be supported
when there are extended attributes.

This doesn't seem to be true anymore, at least for files that use
'WofCompressedData' and also come from a package. 

Should there be any danger to remove the check for EAs when setting
reparse data, or maybe it should only be done for 'small' reparse tags?

I noticed this when trying to manipulate files with reparse data to
properly copy them. What I was doing was removing the reparse data, so
symlinks could be copied correctly with the correct type (file or
directory), and the reapply it after. For WofCompressed files, I planned
to copy the data using the "streams_interface=windows" option because
sometimes the data is too large to pass with xattr. However, this failed
because after the reparse attribute was removed, it could not be put
back.

Here is an example of some files I found. They all seem to have the
0x40000 attribute. Sometimes the EA points to a package name.

thorx /mnt/c # find | while read i ; do ~doug/working/ntfs/ea_and_reparse "$i" 
; done
./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml
./Program 
Files/WindowsApps/Microsoft.Windows.Photos_2020.20110.11001.0_neutral_split.scale-100_8wekyb3d8bbwe/resources.pri
./Program 
Files/WindowsApps/Microsoft.LanguageExperiencePackfr-FR_19041.12.29.0_neutral__8wekyb3d8bbwe/Windows/System32/Speech/Engines/SR/fr-FR/srloc.dll.mui
^C
thorx /mnt/c # getfattr -h -n system.ntfs_ea -e text "./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml"
# file: Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml
system.ntfs_ea="P\000\000\000\0000\000$KERNEL.PURGE.ESBCACHE\0000\000\000\000\000��@<��fB�ps�\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000<\000\000\000\000\000$KERNEL.PURGE.APPXFICACHE\000��@<��u�\000\000\000\000\000\000\000\000\000\000\000\000"

thorx /mnt/c # getfattr -h -n system.ntfs_ea -e hex "./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml"
# file: Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml
system.ntfs_ea=0x5000000000163000244b45524e454c2e50555247452e4553424341434845003000000003000206dd1407a0403ccd01806642a57073d301020000001200120200000000000000000000000000000000003c00000000191800244b45524e454c2e50555247452e415050584649434143484500dd1407a0403ccd01c075e7870200000000000000000000000000

thorx /mnt/c # getfattr -h -n system.ntfs_reparse_data -e hex "./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml"
# file: Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml
system.ntfs_reparse_data=0x170000801000000001000000020000000100000002000000

thorx /mnt/c # stat "./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml"
  File: c/./Program 
Files/WindowsApps/Microsoft.MicrosoftSolitaireCollection_4.8.12113.0_x64__8wekyb3d8bbwe/AppxManifest.xml
 -> unsupported reparse point
  Size: 25              Blocks: 0          IO Block: 4096   symbolic link
Device: 812h/2066d      Inode: 18478       Links: 2
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-01-10 00:19:49.545437200 -0500
Modify: 2021-01-10 00:19:49.545437200 -0500
Change: 2021-01-10 00:19:49.561056900 -0500
 Birth: -
thorx /mnt/c # cd ..
thorx /mnt # umount c
thorx /mnt # ntfsinfo /dev/sdb2 -i 18478 --force
WARNING: Dirty volume mount was forced by the 'force' mount option.
Dumping Inode 18478 (0x482e)
Upd. Seq. Array Off.:    48 (0x30)
Upd. Seq. Array Count:   3 (0x3)
Upd. Seq. Number:        4 (0x4)
LogFile Seq. Number:     0x36e7c2d1a
MFT Record Seq. Numb.:   14 (0xe)
Number of Hard Links:    2 (0x2)
Attribute Offset:        56 (0x38)
MFT Record Flags:        IN_USE 
Bytes Used:              848 (0x350) bytes
Bytes Allocated:         1024 (0x400) bytes
Next Attribute Instance: 10 (0xa)
MFT Padding:    00 00 
Dumping attribute $STANDARD_INFORMATION (0x10) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      0 (0x0)
        Data size:               72 (0x48)
        Resident flags:          0x00
        File Creation Time:      Sun Jan 10 05:19:49 2021 UTC
        File Altered Time:       Sun Jan 10 05:19:49 2021 UTC
        MFT Changed Time:        Sun Jan 10 05:19:49 2021 UTC
        Last Accessed Time:      Sun Jan 10 05:19:49 2021 UTC
        File attributes:         ARCHIVE SPARSE_FILE REPARSE_POINT UNKNOWN: 
0x00040000 (0x00040620)
        Maximum versions:        0 
        Version number:          0 
        Class ID:                0 
        User ID:                 0 (0x0)
        Security ID:             9892 (0x26a4)
        Quota charged:           0 (0x0)
        Update Sequence Number:  10870027712 (0x287e775c0)
Dumping attribute $FILE_NAME (0x30) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      3 (0x3)
        Data size:               90 (0x5a)
        Resident flags:          0x01
        Parent directory:        52860 (0xce7c)
        File Creation Time:      Sun Jan 10 05:19:49 2021 UTC
        File Altered Time:       Sun Jan 10 05:19:49 2021 UTC
        MFT Changed Time:        Sun Jan 10 05:19:49 2021 UTC
        Last Accessed Time:      Sun Jan 10 05:19:49 2021 UTC
        Allocated Size:          0 (0x0)
        Data Size:               0 (0x0)
        Filename Length:         12 (0xc)
        File attributes:         ARCHIVE (0x00000020)
        Namespace:               DOS
        Filename:                'APPXMA~1.XML'
Dumping attribute $FILE_NAME (0x30) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      2 (0x2)
        Data size:               98 (0x62)
        Resident flags:          0x01
        Parent directory:        52860 (0xce7c)
        File Creation Time:      Sun Jan 10 05:19:49 2021 UTC
        File Altered Time:       Sun Jan 10 05:19:49 2021 UTC
        MFT Changed Time:        Sun Jan 10 05:19:49 2021 UTC
        Last Accessed Time:      Sun Jan 10 05:19:49 2021 UTC
        Allocated Size:          0 (0x0)
        Data Size:               0 (0x0)
        Filename Length:         16 (0x10)
        File attributes:         ARCHIVE (0x00000020)
        Namespace:               Win32
        Filename:                'AppxManifest.xml'
Dumping attribute $DATA (0x80) from mft record 18478 (0x482e)
        Resident:                No
        Attribute flags:         0x8000
        Attribute instance:      4 (0x4)
        Compression unit:        4 (0x4)
        Data size:               13468 (0x349c)
        Allocated size:          65536 (0x10000)
        Initialized size:        13468 (0x349c)
        Compressed size:         0 (0x0)
Dumping attribute $DATA (0x80) from mft record 18478 (0x482e)
        Resident:                No
        Attribute name:          'WofCompressedData'
        Attribute flags:         0x0000
        Attribute instance:      7 (0x7)
        Compression unit:        0 (0x0)
        Data size:               3432 (0xd68)
        Allocated size:          4096 (0x1000)
        Initialized size:        3432 (0xd68)
Dumping attribute $REPARSE_POINT (0xc0) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      5 (0x5)
        Data size:               24 (0x18)
        Resident flags:          0x00
        Reparse tag:             0x80000017 (Wof compressed)
        Data length:             16 (0x10)
        Data:                    0x01000000020000000100000002000000
Dumping attribute $EA_INFORMATION (0xd0) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      8 (0x8)
        Data size:               8 (0x8)
        Resident flags:          0x00
        Packed EA length:        129 (0x81)
        NEED_EA count:           0 (0x0)
        Unpacked EA length:      140 (0x8c)
Dumping attribute $EA (0xe0) from mft record 18478 (0x482e)
        Resident:                Yes
        Attribute flags:         0x0000
        Attribute instance:      9 (0x9)
        Data size:               140 (0x8c)
        Resident flags:          0x00
End of inode reached

Thanks,

-- 
Douglas Paul




_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to