- Value stored to 'line' is never read.
- Value stored to 'h' is never read.
- Value stored to 'old_entry' during its initialization is never read.
- Value stored to 'dest' is never read.
Tim Kientzle [Sun, 8 Nov 2009 07:06:02 +0000 (02:06 -0500)]
Thanks to Xavier for pointing out that the security.capability xattr
on Linux must be restored last. Let's try moving xattr restore to
after file data and see if that works any better; we may end up having
to do a full xattr restore both before and after the file data.
This also changes the behavior of xattr restore failures; they now
cause warnings when the entry is finished (which can be as late as
archive_write_close()) rather than when the header is written.
Tim Kientzle [Sun, 8 Nov 2009 02:33:34 +0000 (21:33 -0500)]
Be a little more careful about identifying mdoc-format manpages.
In particular, I recently had the update script pick up and try
to convert libarchive.so.5. Ouch.
Tim Kientzle [Sat, 7 Nov 2009 23:35:18 +0000 (18:35 -0500)]
Make the CTest integration simpler and a little more robust
by just reading list.h directly into cmake. This only requires
a suitable "DEFINE_TEST" macro.
Tim Kientzle [Sat, 7 Nov 2009 07:31:15 +0000 (02:31 -0500)]
MinGW defines a value of S_IFBLK which is both useless and wrong.
Comment out this sanity-check on MinGW. (It already doesn't apply
to VC++ because Microsoft doesn't define S_IFBLK.)
test_entry sanity-checks that S_IFBLK has the expected value on every
platform, even though libarchive per se doesn't depend on this. So far,
MinGW is the only platform that's ever broken one of these checks, which
is reassuring, since it means that clients can reasonably pass unaltered
st_mode values into libarchive. Even on MinGW, it will work, since
MinGW can never actually set S_IFBLK (Windows filesystems don't support it).
Improve detecting LZMA stream data.
- Checking of the first byte of LZMA stream.
* lzma of XZ Utils with option -e records 0x5d in the first byte.
* It is possible that lzma of LZMA SDK records various data in the
first byte.
- Checking of second and third bytes of LZMA stream.
* lzma of LZMA SDK with option -d12,-d13,-d14 and -d15 records
0x1000,0x2000,0x4000 and 0x8000 in second through fifth bytes
of LZMA stream. It means second and third bytes are not always
zero.
- Checking of sixth through fourteenth bytes of LZMA stream.
* This bytes are recorded uncompressed size and lzma of XZ Utils
always records -1 in this field.
Björn Jacke [Fri, 6 Nov 2009 11:42:45 +0000 (06:42 -0500)]
add support for setting timestamps with ns resolution. utimensat and
futimens are defined in POSIX.1-2008. They are available on Linux since
glibc 2.6 and kernel 2.6.22.
Tim Kientzle [Mon, 2 Nov 2009 04:39:11 +0000 (23:39 -0500)]
Rename LOCALE_DE to LOCALE_UTF8, since the code assumes it's a UTF8 locale. Set it to NULL on Windows, change some of the tests to skip when this is NULL. This removes most of the assertion failures in test_entry.
Tim Kientzle [Sun, 1 Nov 2009 21:46:24 +0000 (16:46 -0500)]
Extend the fuzz tester:
* Compress test_fuzz_1.iso so we can save space in source control and so we can fuzz a compressed file.
* Extract the "ar" sample file so we can use it in the fuzz tester.
The file queue which has "CL" extension(called cl_files) must use its
cl_offset(which indicates a offset of the relocated directory entry)
for heap key. The function relocate_dir()'s algorithm expects cl_files
in order of cl_offset.
Tim Kientzle [Sun, 1 Nov 2009 06:56:20 +0000 (01:56 -0500)]
Make the __FBSDID() handling more platform-agnostic by using
HAVE_SYS_CDEFS_H to control the inclusion of sys/cdefs.h and
defining a fake __FBSDID() macro if we need one. In particular,
this deals a lot more gracefully with systems that are not
FreeBSD but use FreeBSD-derived system headers.
See Issue 46 on libarchive.googlecode.com for discussion.
Submitted by: cpr420
Tim Kientzle [Sun, 1 Nov 2009 02:14:14 +0000 (22:14 -0400)]
Trying to figure out what printf modifiers to use on what platforms to
display 64-bit values is getting to be real PITA. Just roll our
own conversion and use that.
Improve handling of Rockridge extensions' rr_moved directory and
following sub directories.
Add corresponding test.
Unfortunately, some tests need tweaks due to difference of ordering of
hardlink files(which have the same offset); it's characteristic of heap.
Split a part of reading subdirectories from
archive_read_format_iso9660_read_header function.
This is preparation of support RRIP "CL" and "RE" extensions
for proper handling of "rr_moved" directory.
Fix a bug; reading extensions recorded by SUSP CE extension
did not work and sometimes stole file contents.
Add test for this case.
libarchive 2.7.* have had these following bugs.
1. When length of symlink name is longer than about 70,
it cannot get modify/access times recorded by "TF" extension
and maybe next file is stolen a part of its contents by
that process.
2. When length of file name is longer than about 80,
it cannot get modify/access times recorded by "TF" extension
and maybe it's stolen a part of its contents by that process.
3. When length of file name is longer than about 100,
it cannot get file mode, user id and group id recorded by "PX"
extension and as above.
4. When length of file name is longer than about 142,
it gets wrong file name(shorter name) and as above.
Condition of stealing file contents:
if file->offset - iso9660->current_position < file->ce_size
in next_entry_seek function, that process consumed file contents
of which were data of extensions.
That process read wrong data whether that process consumed file
contents or not.
RRIP "RR" extension is obsolete; it appeared only early version of
RRIP standard. Do not use it for seenRockridge flag. Use other
RRIP extensions instead.
The 5th parameter of RRIP "PX" extension is not inode.
RRIP Standrd says that parameter, FILE SERIAL NUMBER, shall have the same
meaning as and may be used for the st_ino field of POSIX:5.6.1.
It can treat as inode but not value of inode of directories or files.