summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
Commit message (Collapse)AuthorAgeFilesLines
* Assorted markup fixes.ru2005-06-152-2/+3
| | | | Approved by: re
* Minor clean up for flags restoration: Use fchflags/lchflags whenkientzle2005-06-044-13/+52
| | | | | available, stub out flags restore on platforms that don't support it, update autoconf to probe for fchflags and lchflags support.
* Sort archive_entry_ctime/archive_entry_ctime_nsec correctly.kientzle2005-06-041-13/+13
|
* Support libarchive with C++ by adding appropriate conditionalkientzle2005-06-042-4/+25
| | | | extern "C" declarations.
* Fix one error in the example usage of the archive_write API and fillkientzle2005-06-041-27/+52
| | | | | in a few missing details. The example code here is now a complete, functioning example program.
* Provide missing implementations for archive_entry_ctime() andscottl2005-06-011-0/+13
| | | | archive_entry_ctime_nano()
* Remove the C99-specific __func__ that is one of the few barrier tokientzle2005-06-017-37/+39
| | | | | | | | | compiling on IRIX and Solaris. Remove the "archive_check_magic" macro that existed only to provide __func__ to the underlying __archive_check_magic function. Thanks to: Darin Broady MFC after: 14 days
* <Ooops> Two lines got dropped from the previous commit. Apologies.kientzle2005-06-011-0/+2
| | | | MFC after: 14 days
* A minor refinement to "pax" output: Remove suid/sgid/sticky bitskientzle2005-06-013-0/+38
| | | | | | | | from mode before using mode for extended attributes entry, copy mtime/atime/ctime to extended attributes entry so it's a little more clear that it corresponds to the like-named regular entry. MFC after: 14 days
* Start to address the race issue between restoring a file's contentskientzle2005-05-214-105/+204
| | | | | | | | | | | | | | and restoring the metadata. In particular, the metadata-restore functions now all accept a file descriptor and a pathname. If the file descriptor is set and the platform supports the appropriate syscall, restore the metadata through the file descriptor. Otherwise, restore it through the pathname. This is complicated by varying syscall support (FreeBSD has an fchmod(2) but no fchflags(2), for example) and because non-file entries don't have an fd to use in restoring attributes (for example, mknod(2) doesn't return a file handle). MFC after: 14 days
* Correct return values in myopen() and myclose() in Example code.kientzle2005-05-211-2/+2
| | | | | | Bug: docs/79318 Thanks to: Derek Tattersall MFC after: 7 days
* archive_entry_set_link is supposed to update whichever link fieldkientzle2005-05-081-1/+2
| | | | | | | | | (symlink or hardlink) is already set. Instead, it was always setting the hardlink field. In particular, this caused GNU tar format long symlinks to be interpreted as hardlinks. Thanks to: Brooks Davis MFC after: 7 days
* Fix broken ACL configuration on FreeBSD 4 and Linux.kientzle2005-04-233-7/+19
| | | | Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
* Certain filenames between 245 and 255 characters long would cause ankientzle2005-04-231-71/+72
| | | | | | | | | | | | | | | | | internal error if pax extended attributes were being generated. Being < 255 characters, the first-pass path editing (to generate a ustar-compatible name for the main entry) wouldn't occur, and the second-pass path editing (to generate a ustar name for the pax attributes entry) assumed the input was already < 245 chars. The core problem here was using an abbreviated algorithm for the second pass that relied on the first pass having already run. The rewritten code is much simpler: It just uses the full path-shortening algorithm for building both ustar pathnames. This way, the second ustar pathname will always be short enough. Thanks to: Mark Cammidge Related to: bin/74385
* Portability enhancement: MS Windows won't restore metadata if the filekientzle2005-04-171-1/+1
| | | | | | | is still open, so close the file as soon as we've written the file contents, before we attempt to restore metadata. Thanks to: Kees Zeelenberg
* Update "make distfile" to use newest automake/autoconf from ports.kientzle2005-04-171-2/+2
| | | | Thanks to: Juergen Lock
* A number of improvements to ZIP support.kientzle2005-04-066-67/+338
| | | | | | | | | | | | | * Handles entries with compressed size >2GB (signed/unsigned cleanup) * Handles entries with compressed size >4GB ("ZIP64" extension) * Handles Unix extensions (ctime, atime, mtime, mode, uid, etc) * Format-specific "skip data" override allows ZIP reader to skip entries without decompressing them, which makes "tar -t" a lot faster. * Handles "length-at-end" entries generated by, e.g., "zip -r - foo" Many thanks to: Dan Nelson, who contributed the code and test files for the first three items above and suggested the fourth.
* Clean up the support for extracting very long pathnames.kientzle2005-03-292-14/+18
|
* Support extracting entries with pathnames longer than PATH_MAX. Inkientzle2005-03-134-27/+104
| | | | | testing, I've archived and restored dir trees with ~1MB pathnames. Most formats, of course, have much smaller limits.
* When rejecting rediculously large pax attributes (such as pathnameskientzle2005-03-131-2/+5
| | | | | over 1MB), issue a warning instead of forcing an internal assertion failure.
* Correctly pass low-level I/O errors back up to the caller whenkientzle2005-03-131-1/+4
| | | | reading cpio format.
* Better error messages on read and file-open errors.kientzle2005-03-132-6/+30
|
* Include detailed error message from zlib after a decompression error.kientzle2005-03-131-0/+3
|
* If the output is not a regular file, it's okay to add it to the archive.kientzle2005-03-132-4/+18
| | | | | | In particular, /dev/st0 can be added to an archive being written to /dev/st0. Thanks to: Jaakko Heinonen
* Use correct byte order when parsing the size of the gzip "Extra data" field.kientzle2005-03-021-1/+1
| | | | | | | In particular, this correctly allows bsdtar (and pkg_add) to skip package signatures. Thanks to: Theo Schlossnagle
* Fix a misplaced .Elkientzle2005-02-231-1/+1
|
* Don't return NULL if there's no error message;kientzle2005-02-231-1/+1
| | | | | | | | return a generic text message instead. (Someday, I'll track down all the places that are generating errors but not recording messages. ;-/ Thanks to: Jaakko Heinonen
* Expand contractions.ru2005-02-131-2/+2
|
* Fix a buffer overflow in the "none" decompression handler thatkientzle2005-02-132-68/+76
| | | | | | occurred with large read-ahead requests. This only affected formats that incorrectly make large requests (ZIP did this until recently) or with block sizes over 32k.
* Expand *n't contractions.ru2005-02-132-2/+2
|
* Oops. I missed a 0 => '\0' correction.kientzle2005-02-122-2/+2
| | | | Thanks to: Ruslan
* Clear the error message buffer on entry to major routines.kientzle2005-02-121-0/+3
| | | | This avoids having error messages get concatenated over multiple calls.
* Update the format descriptions to include ISO9660 and ZIP support.kientzle2005-02-123-4/+19
| | | | Also remove some unnecessary blank lines from archive_read.3.
* Performance optimization, code clarification, and bug workaround.kientzle2005-02-121-28/+36
| | | | | | | | | | | When reading the bodies of Zip archive entries, request a minimum of 1 byte, rather than a minimum of the full entry size. This is faster (since it does not force the decompression layer to combine reads) and works around a bug in the "none" decompression handler (which I'm testing a separate fix for now). I've also renamed "bytes_read" to "bytes_avail" in several places to more accurately reflect that the value returned from (a->compression_read_ahead) is the number of bytes available, not necessarily the number of bytes requested.
* Fill in some more Rockridge details in ISO9660 support: Ignore PDkientzle2005-02-121-1/+51
| | | | | | | | | | | | (padding) entries, extract inode value from PX entry, recognize SP and ST (start/end of SUSP extensions). I don't enforce SP yet, as I've seen CDROMs which use Rockridge extensions but don't have the SP record (which is officially required). The ISO9660 support is now mature enough to extract FreeBSD distribution CDROMs created with mkisofs.
* Flush input when reading from pipe to avoid "broken pipe" warnings.kientzle2005-02-124-20/+70
| | | | | | | For example, when using 'gunzip | tar' to decompress. Also, fix some style issues (write null character as '\0'). Thanks to: Jaakko Heinonen
* This should (finally) fix the 64-bit build. <sigh>kientzle2005-01-261-1/+1
|
* Fix some signed/unsigned mismatches.kientzle2005-01-251-12/+14
| | | | | Reported by: tinderbox Pointy hat: me
* Basic support for ZIP archives.kientzle2005-01-256-8/+566
| | | | | | | Only supports "deflate" and "none" compression for now. Also, add a few clarifications to the archive_read.3 manpage as requested by William Dean DeVries.
* spell "file system" correctlycharnier2005-01-242-4/+4
| | | | Approved by: ru
* Set the format code and name correctly for:kientzle2005-01-232-2/+14
| | | | | * ISO9660 CDROM images * ISO9660 images with Rockridge extensions
* Fixed xrefs.ru2005-01-211-1/+1
|
* Support 'CE' records in Rockridge extensionskientzle2005-01-201-59/+155
| | | | | (specifies that record is extended elsewhere on the disk).
* Implement a custom print formatter (archive_string_vsprintf)kientzle2005-01-164-14/+90
| | | | | | | | | | | | | | for libarchive error messages. Mostly, this avoids a portability headache related to copying va_list arguments (some FreeBSD 5 platforms require va_copy; FreeBSD 4 doesn't support va_copy at all). It also dramatically reduces the size of libarchive for embedded applications: a minimal "untar" program using libarchive can now be under 64k statically linked (as opposed to ~100k using library *printf() functions). MFC after: 14 days
* Removed empty line.ru2005-01-151-1/+0
|
* Bring some file descriptions in line with reality.kientzle2005-01-121-6/+31
| | | | | Also, add some hints to help people understand which functions are most appropriate for typical uses.
* Scheduled mdoc(7) sweep.ru2005-01-111-1/+1
|
* libarchive does much more than just tar ;-)kientzle2005-01-101-1/+1
|
* Recognize and parse symlinks in ISO9660 CDROM images with Rockridge extensions.kientzle2005-01-081-17/+75
|
* Documentation improvements. In particular,kientzle2005-01-085-52/+145
| | | | | | | expand and clarify the description of the client callback functions and how they should handle errors. Thanks to: Antony Dovgal
OpenPOWER on IntegriCloud