| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
as that better exercises some internal read-combining logic than the
compressed archive.
Approved by: re (blanket, libarchive testing)
|
|
|
|
|
|
|
| |
if there was more than one. In particular, this simplifies
test_tar_filenames.c, which has a tendency to be very noisy otherwise.
Approved by: re (blanket, libarchive testing)
|
|
|
|
|
|
|
| |
Without this, hardlinks get returned as symlinks.
Approved by: re (Ken Smith)
MFC after: 2 days
|
|
|
|
|
|
| |
entries. This doesn't cover everything yet, but it's a big improvement.
Approved by: re (blanket, libarchive testing)
|
|
|
|
|
|
|
|
| |
it now verifies that the returned blocks have the correct data
at the correct file offsets, ignoring any null padding that
may exist.
Approved by: re (blanket, libarchive test suite)
|
|
|
|
|
|
|
| |
behavior with truncated or damaged pax archives. This
tests most of the cases covered by the recent security advisory.
Approved by: re (blanket, libarchive test suite)
|
|
|
|
|
|
|
|
|
| |
archive_read_open_memory.c that tries to test border
cases. In particular, it copies over each returned block
so that formats or decompressors that read past the end
of a returned block will break.
Approved by: re (blanket, libarchive test suite)
|
|
|
|
| |
Approved by: re (blanket)
|
|
|
|
|
|
|
|
| |
tar archives, including a potentially exploitable buffer overflow.
Approved by: re (kensmith, security blanket)
Reviewed by: kientzle
Security: FreeBSD-SA-07:05.libarchive
|
|
|
|
|
|
|
| |
so use awk's printf for the formatting here instead.
Pointy hat: Yours Truly
Approved by: re
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARCHIVE_VERSION_STAMP to selectively disable tests that don't
apply to that version; new "skipping()" function reports skipped
tests; modify final summary to report component test failures and
skips.
Note: I don't currently intend to MFC the test suite itself;
anyone interested should just checkout and use this version
of the test suite, which should work for any library version.
Approved by: re (Ken Smith, blanket)
|
|
|
|
|
|
|
|
| |
of libarchive being used. I've been taking advantage of this
with a recent round of updates to libarchive_test so that it
can test older and newer versions of the library.
Approved by: re (Ken Smith)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
skip() callback to skip over data when reading uncompressed
archives. This gets invoked, for example, during tar -t
or tar -x with a filename argument. The revised code
only calls [lf]seek() on regular files, instead of depending
on the kernel to return an error.
Thanks to: bde for explaining the implementation of lseek()
Thanks to: Daniel O'Connor for testing
Approved by: re (Ken Smith)
MFC after: 5 days
|
|
|
|
|
|
|
| |
enabling a test that's not ready yet. <sigh>
Pointy hat: /me
Approved by: re@
|
|
|
|
|
|
|
| |
for the cpio formats.
Thanks to: Rudolf Marek
Approved by: re@
|
|
|
|
|
|
|
| |
assume yes unless seek has previously failed, but I fear I'll have to
avoid seeks under other circumstances. (For instance, tape drives on
FreeBSD seem to return garbage from lseek().) Also, optimize away
zero-byte skips.
|
| |
|
|
|
|
| |
gtar 1.16.
|
|
|
|
|
| |
-k: like make -k, try to keep going after errors.
-q: quiet
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed
Approved by: kan (mentor)
Reviewed by: ru
|
|
|
|
| |
Also, update the test harness to exercise this case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* "compression_program" support uses an external program
* Portability: no longer uses "struct stat" as a primary
data interchange structure internally
* Part of the above: refactor archive_entry to separate
out copy_stat() and stat() functions
* More complete tests for archive_entry
* Finish archive_entry_clone()
* Isolate major()/minor()/makedev() in archive_entry; remove
these from everywhere else.
* Bug fix: properly handle decompression look-ahead at end-of-data
* Bug fixes to 'ar' support
* Fix memory leak in ZIP reader
* Portability: better timegm() emulation in iso9660 reader
* New write_disk flags to suppress auto dir creation and not
overwrite newer files (for future cpio front-end)
* Simplify trailing-'/' fixup when writing tar and pax
* Test enhancements: fix various compiler warnings, improve
portability, add lots of new tests.
* Documentation: document new functions, first draft of
libarchive_internals.3
MFC after: 14 days
Thanks to: Joerg Sonnenberger (compression_program)
Thanks to: Kai Wang (ar)
Thanks to: Colin Percival (many small fixes)
Thanks to: Many others who sent me various patches and problem reports.
|
|
|
|
|
|
|
|
| |
"cache_size * sizeof(struct bucket)". The former is valid in C99 but can
confuse earlier compilers, while the latter is a standard idiom which all
C compilers understand.
Approved by: kientzle
|
|
|
|
|
|
|
|
| |
against NULL when it is first allocated) and pointless (we've already
dereferenced the pointer several times).
Found by: Coverity Prevent(tm)
CID: 3204
|
|
|
|
|
|
|
|
|
|
|
| |
going to overwrite it with a new value a few lines later.
Visual inspection of the surrounding code indicates that the code does
what it's supposed to do; i.e., the pointless code wasn't supposed to
be doing something other than what it was doing.
CID: 3323
Found by: Coverity Prevent(tm)
|
|
|
|
|
| |
Found by: Coverity Prevent
Coverity ID: CID 3132
|
|
|
|
|
|
|
| |
This is a no-op as far as FreeBSD is concerned, but makes libarchive
more autoconf-friendly.
Approved by: kientzle
|
|
|
|
| |
Thanks to: VMiklos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
occur on the write side of extracting a file to ARCHIVE_WARN errors
when returning them from archive_read_extract.
In bsdtar: Use the return code from archive_read_data_into_fd and
archive_read_extract to determine whether we should continue trying to
extract an archive after one of the entries fails.
This commit makes extracting a truncated tarball complain once about
the archive being truncated, instead of complaining twice (once when
trying to extract an entry, and once when trying to seek to the next
entry).
Discussed with: kientzle
|
| |
|
| |
|
| |
|
|
|
|
| |
suppressing the second error, it was failing to address the first.
|
|
|
|
| |
only on platforms that need them. FreeBSD doesn't.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* use "AR_GNU" as the format name instead of AR_SVR4 (it's what everyone is going to call it anyway)
* Simplify numeric parsing to unsigned (none of the numeric values should ever be negative); don't run off end of numeric fields.
* Finish parsing the common header fields before the next I/O request (which might dump the contents)
* Be smarter about format guessing and trimming filenames.
* Most of the magic values are only used in one place, so just inline them.
* Many more comments.
* Be smarter about handling damaged entries; return something reasonable.
* Call it a "filename table" instead of a "string table"
* Update tests.
Enable selection of 'ar', 'arbsd', and 'argnu' formats by name
(this allows bsdtar to create ar format archives).
The 'ar' writer still needs some work; it should reject
entries that aren't regular files and should probably also
strip leading paths from filenames.
|
|
|
|
| |
that lack utimes(2).)
|
|
|
|
| |
I can clean it up.
|
|
|
|
|
|
| |
N.B. 'ar' format support is broken right now, it's not
passing tests. If I can't find the problem soon, I'll
back out the last commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for directories. bsdtar used to add this, but that recently got
lost somehow. So now I'm adding it back in libarchive.
The only odd part of doing this in libarchive: Adding a directory to
a tar archive and then reading it back again can yield a different name.
Add a test case to exercise some boundary conditions with
tar filenames and ensure that trailing slashes are added to
dir names only as necessary.
Thanks to: Oliver Lehmann for bringing this regression to my attention.
|
|
|
|
| |
If we can't create the dir, just give up.
|
|
|
|
|
|
| |
conditionally use utime() when utimes() is not available;
allow the most common wide-char functions to be replaced
when local alternatives are lacking.
|
| |
|
|
|
|
|
|
| |
factor out the platform-specific configuration header a bit
more cleanly.
Suggested by: Joerg Sonnenberger
|
| |
|
| |
|
|
|
|
| |
enable it with _read_support_format_all().
|
|
|
|
| |
should be used instead of archive_read_data_into_buffer().
|