schwer-q / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

XAR chokes when attempting to restore Samba/NTFS Streams-specific extended attributes #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Share a directory via SMB using Samba under Mac OS X 10.5.6
2. Using a Windows XP box, create an empty text file inside the shared
directory
3. Set the Category attribute on aforementioned text file, and let Samba
add three new Mac OS X Extended Attributes
(:DOCUMENTSUMMARYINFORMATION:$DATA:, :SUMMARYINFORMATION:$DATA: and
:{4C8CC155-6C1E-11D1-8E41-00C04FB9386D}:$DATA:)
4. Attempt to archive said text file using "xar -c -v -f NTFS1.rar
TextDoc1.txt" inside the shared directory 
5. Observe that XAR claims to have successfully archived the file
6. Dump the TOC to stdio using "xar --dump-toc=- -f NTFS.rar ", and notice
that an XML parsing error is produced

What is the expected output? What do you see instead?
I expect to see the contents of the TOC, complete with references to
aforementioned extended attributes. In addition, XAR should not simply
ignore these attributes when a directory containing multiple files with
them is archived.

Extracting the archive should result in a file with extended attributes
along the lines of:

xattr -l TextDoc1.txt 
:DOCUMENTSUMMARYINFORMATION:$DATA:
0000   FE FF 00 00 05 01 02 00 00 00 00 00 00 00 00 00    ................
0010   00 00 00 00 00 00 00 00 01 00 00 00 02 D5 CD D5    ................
0020   9C 2E 1B 10 93 97 08 00 2B 2C F9 AE 30 00 00 00    ........+,..0...
0030   4C 00 00 00 03 00 00 00 01 00 00 00 28 00 00 00    L...........(...
0040   00 00 00 80 30 00 00 00 02 00 00 00 38 00 00 00    ....0.......8...
0050   00 00 00 00 00 00 00 00 02 00 00 00 E4 04 00 00    ................
0060   13 00 00 00 09 08 00 00 1E 00 00 00 09 00 00 00    ................
0070   43 61 74 65 67 6F 72 79 00 00 00 00                Category....

:SUMMARYINFORMATION:$DATA:
0000   FE FF 00 00 05 01 02 00 00 00 00 00 00 00 00 00    ................
0010   00 00 00 00 00 00 00 00 01 00 00 00 E0 85 9F F2    ................
0020   F9 4F 68 10 AB 91 08 00 2B 27 B3 D9 30 00 00 00    .Oh.....+'..0...
0030   28 00 00 00 02 00 00 00 01 00 00 00 18 00 00 00    (...............
0040   00 00 00 80 20 00 00 00 02 00 00 00 E4 04 00 00    .... ...........
0050   13 00 00 00 09 08 00 00                            ........

:{4C8CC155-6C1E-11D1-8E41-00C04FB9386D}:$DATA:
0000   00                                                 .

Instead, I receive the following error message from XAR:
Entity: line 26: parser error : PCDATA invalid Char value 5
    <name>:SUMMARYINFORMATION:$DATA</name>
           ^
Error opening xar archive: NTFS1.xar

What version of the product are you using? On what operating system?
"xar --version" reports "xar 1.5.2". The operating system in use is Mac OS
X 10.5.6.

Please provide any additional information below.
Attached is a copy of the offending archive, that is produced as a result
of the process described initially.

Original issue reported on code.google.com by tyson....@gmail.com on 28 Dec 2009 at 8:33

Attachments: