Tim Kientzle [Sun, 8 Feb 2009 22:07:22 +0000 (17:07 -0500)]
Merge r588 from trunk: Don't write more data than was read.
In particular, this causes bsdtar to write garbage data after
entries in shar archives. Other output formats seem unaffected
by this gaffe.
Tim Kientzle [Sun, 8 Feb 2009 22:05:39 +0000 (17:05 -0500)]
From FreeBSD-CURRENT: don't write more data than we just read
from the file. This seems to only impact the shar writer, since
other formats proactively truncate the output.
Tim Kientzle [Sun, 8 Feb 2009 19:13:58 +0000 (14:13 -0500)]
A critical re-examination of r584 suggested some ways to make
this a little clearer:
* The old child_in_buf/child_in_buf_avail is redundant with
the read_ahead/consume facility.
* Lots of minor renamings to try to make the code clearer.
* If there's a signature, don't inhibit subsequent bids.
Tim Kientzle [Sun, 8 Feb 2009 04:41:57 +0000 (23:41 -0500)]
Refactor the read_compression_program support to expose two new capabilities:
* Public API: You can now register a program along with a signature string;
the program will be run only on input that matches the signature
string.
* Internal API: You can now use the init() function here to run an external
program. In particular, this allows us to build decompression
handlers that use an outside program with a bidder that's more
sophisticated than just a signature check.
Tim Kientzle [Fri, 6 Feb 2009 16:25:55 +0000 (11:25 -0500)]
Rework the Joliet test just a bit by bringing the two related
variants into a single file. In particular, the test harness
doesn't like multiple test definitions, even if some of them are
commented out.
Of course, the Joliet+RR test should either be fixed or removed.
Joliet extension will currently be preferred (meaning RockRidge will not
be spotted if the iso has both, option to ignore Joliet coming soon).
This implementation limits the max filename length to 64 characters according
to spec, but there are indications about some implementations allowing more
so that might need to be bumped.
Also includes testcases for joliet and joliet+rr.
The joliet+rr testcase is currently disabled as libarchive (currently) can't
handle both extensions at the same time.
Tim Kientzle [Thu, 5 Feb 2009 07:23:45 +0000 (02:23 -0500)]
I finally rebuilt the gzip decompressor to fully take advantage of
the recent read filter refactoring. This has a much better bidder
(which actually verifies a lot more of the header), handles
concatenated gzip streams (I uncommented the test for this), and
I think is a much cleaner code organization.
I plan to work through the other read filters and use these same
techniques on them as time permits.
Tim Kientzle [Wed, 4 Feb 2009 17:53:00 +0000 (12:53 -0500)]
To verify the group name lookup capabilities, this test looks up
the name for group 0. It used to verify the result was "wheel",
but that's rather BSD-specific. Generalize this to accept any
name on a list of common names for group 0.
Tim Kientzle [Tue, 3 Feb 2009 18:21:12 +0000 (13:21 -0500)]
GCC on 64-bit Linux has 32-bit int and 64-bit size_t; not
taking this into account led to a stack overwrite that broke
most of the new decompression code on this platform.
Add support MD5/SHA1/SHA256/SHA384/SHA512 on Windows.
It use CryptoAPI. Unfortunately, SHA256 nor SHA384 nor
SHA512 are not supported on Windows XP and Windows 2000,
and therefore I haven't tested those functions yet.
Backout /set keyword handling of r514.
keep indent handling for somebody who read or edit
the mtree file, but it is a option whose name is
'indent' and default is off.
Use CMAKE_PREFIX_PATH directly by the people who use cmake.
On Windows, set "C:/Program Files/GnuWin32" to
CMAKE_PREFIX_PATH instead of "C:/Program Files/GnuWin32/lib".
Add check that path is existed.
Tim Kientzle [Thu, 29 Jan 2009 07:01:48 +0000 (02:01 -0500)]
Always swallow the PK\007\008 end-of-data marker, even if this
is a non-regular file. In particular, it seems that some "jar"
programs store directory entries using length-at-end semantics.
Which is wasteful (a directory is always zero length, so there's
no point in storing the additional data), but entirely legal.
Tim Kientzle [Thu, 22 Jan 2009 05:58:23 +0000 (00:58 -0500)]
Don't append the strerror() information here; we're returning
the errno anyway, so the client can do that if they want.
In particular, this fixes a lot of duplicated errno information.
Tim Kientzle [Mon, 19 Jan 2009 06:33:42 +0000 (01:33 -0500)]
Read extended attributes from disk on FreeBSD.
This should be the last piece needed for functional extended attribute
handling on FreeBSD. More testing is required, though.