summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Correctly document the order of argumentskientzle2005-01-082-2/+2
| | | | | | to archive_read_open and archive_write_open. Thanks to: Antony Dovgal
* Clear the error buffer on entrykientzle2005-01-081-0/+1
| | | | | | | to archive_read_next_header so the next error doesn't just get appended. MFC after: 7 days
* First cut at RockRidge support.kientzle2005-01-031-95/+288
| | | | | | Large thanks to the easy-to-read and well-documented sys/isofs/cd9660 source code, which provided many of the details I needed for this exercise.
* Next round of work on ISO9660 support:kientzle2005-01-031-79/+151
| | | | | | | | | | | | | * Reference-count the directory data so that we don't leak memory. * Correctly step through the directory records (skipping unrecognized extensions) * Use better defaults for file modes * Sort directory entries by offset of the end of the file rather than the beginning of the file. This fixes a lot of "out-of-order" problems with zero-length files, in particular. * Style fixes, remove some debug code, add some error messages.
* Enable ISO9660 support in "read_support_format_all".kientzle2005-01-021-0/+1
| | | | In particular, bsdtar should now recognize ISO9660 images.
* First cut support for extracting from ISO9660 disk images.kientzle2005-01-023-1/+524
| | | | | | | | | | | | | | | | This seems to be able to extract a TOC and extract files from the couple of ISO images I've tested it with. Treat this as experimental proof-of-concept code for the moment. There are still a bunch of debug messages (there are a few oddities in ISO9660 that I haven't yet figured out how to handle), a lot of bugs to be addressed (this code leaks memory very badly), and a lot of missing features (no Rockridge support, in particular). I'd appreciate feedback from anyone who understands ISO9660 format better than I do. ;-) Suggested by: Robert Watson
* Rewrite the code that hacks a short names to use inkientzle2004-12-291-62/+154
| | | | | | | | | | | the regular ustar entry. The old code sometimes created a too-long name that overflowed the ustar fields and triggered an internal assertion failure. This version should be more robust. Thanks to: Michal Listos Fixes: bin/74385 MFC after: 15 days
* Correct speling erors.wollman2004-12-221-2/+2
|
* Include wchar.h to improve our chances of findingkientzle2004-12-221-0/+1
| | | | | | WCHAR_MAX. This might fix a portability problem on HP_UX. Thanks to: Susan Kim
* Portability nit: Some platforms require stdio.h before bzlib.h.kientzle2004-12-221-0/+1
| | | | Thanks to: Kurt J. Lidl
* Add __archive_strappend_int to format a decimalkientzle2004-12-222-0/+19
| | | | number into a variable-length archive_string.
* Don't truncate major/minor numbers written to the legacykientzle2004-12-221-3/+15
| | | | | | | | | | | | ustar fields. Later, we're going to permit numeric extensions for these fields, so we can support large values here. In particular, this allows GNU tar to correctly extract such entries even though it doesn't support the pax extended attributes. Note: r1.18 and r1.17.2.1 of this file allowed similar treatment of the uid/gid fields. Thanks to: Ben Mesander
* Tune the bidding for tar archives. Thiskientzle2004-12-221-2/+9
| | | | | | | | improves the recognition of hardlink entries with/without bodies (which is implemented through a look-ahead that uses the bid function). MFC after: 7 days
* Be more careful about assembling/disassemblingkientzle2004-12-111-2/+2
| | | | | | | | | | device numbers. In particular, this should fix a bug where archiving a device node with a very large minor number would sometimes overflow and corrupt the major number. Thanks to: Ben Mesander MFC after: 7 days
* When determining whether filename is too long for akientzle2004-11-281-6/+6
| | | | | | | | | regular 'ustar' entry, use narrow-character version, not wide-character version, as the ustar entry always uses the narrow-character filename. Thanks to: Michal Listos Inspired by, but doesn't fix: bin/74385
* Correct the spelling of "archive_write_pax_header"kientzle2004-11-281-1/+1
| | | | | | | in an error message. Thanks to: Michal Listos Inspired by, but doesn't fix: bin/74385
* Since I'm not using the public API for writingkientzle2004-11-151-6/+8
| | | | | | | the the pax attributes, I shouldn't try using the public API for finishing out the attribute entry, either. This also removes some old dubious state manipulations.
* Pax extended headers were always failingkientzle2004-11-151-1/+1
| | | | | | | | | because the code was using the external API (archive_write_data) and assuming internal error-return conventions. Use the internal API for writing data. Thanks to: Joe Marcus Clarke
* Ooops. ssize_t != int. <sigh>kientzle2004-11-064-4/+4
| | | | Thanks to: Oliver Lehmann and Peter Wemm
* Makefile tweaks:kientzle2004-11-051-2/+3
| | | | | | * Update Version * Add a missing MLINK * Fix 'distfile' target so it works from a clean checkout
* Remove the unused archive_string_sprintf() utility function.kientzle2004-11-052-18/+0
|
* Revert 1.24: Brain glitch. <sigh>kientzle2004-11-051-1/+1
|
* Clean up the error handling in thekientzle2004-11-059-133/+213
| | | | | | write path. In particular, this should solve some problems people have seen with bsdtar not exiting on various write errors.
* archive.h gets built in ${.OBJDIR}kientzle2004-11-051-1/+1
|
* Update a comment.kientzle2004-11-051-0/+1
|
* Allow tar format to read and accept an empty (or non-existent)kientzle2004-10-271-3/+9
| | | | | | | | | | file. In particular, this allows bsdtar to append (-r) to an empty file. Thanks to: Ryan Sommers While I'm here, straighten out a misleading comment about GNU-compatible sparse file handling.
* Revert 1.18: It broke Athlon64 builds, whichkientzle2004-10-181-1/+2
| | | | | | | | | probably means it also requires a .so version bump. Defer it until I finish some related work on cleaning up error returns throughout the library. Thanks to: Conrad J. Sabatier
* Use STDERR_FILENO instead of 2, as POSIX intended.kientzle2004-10-181-1/+1
| | | | Thanks to: Alfred Perlstein
* Correctly report write errors from the lowest-levelkientzle2004-10-173-6/+21
| | | | output routines back to the compression layer.
* Refine the error-checking and reporting in thekientzle2004-10-171-6/+11
| | | | | "compress" format decompression code. In particular, distinguish between EOF and fatal data errors.
* Correct the return type of archive_write_datakientzle2004-10-171-1/+1
| | | | | | to match the documentation. MFC after: 30 days
* Don't rely on stdio here.kientzle2004-10-171-11/+20
|
* Build as a shared lib again.obrien2004-10-111-4/+0
| | | | Discussed with: kientzle
* Fix two ugly errors:kientzle2004-09-171-2/+6
| | | | | | | | | 1. The correct cutoff for large uid/gid handling is 1<<18, not 1<<20. 2. Limit the uid/gid in the 'x' extension header (where numeric extensions are not permitted) to 1<<18, but use the correct value in the regular header (where numeric extensions are permitted). Thanks to: Dan Nelson MFC after: 3 days
* Some old tar archives rely on "regular-file-plus-trailing-slash" tokientzle2004-09-041-12/+22
| | | | | | | | | | | | | | | denote a directory. Unfortunately, in the presence of GNU or POSIX extensions, this code was checking the truncated filename stored in the regular header rather than the full filename stored in the extended attribute. As a result, long filenames with '/' in just the right position would trigger this check and be erroneously marked as directories. Move the check so it only considers the full filename. Note: the check can't simply be disabled for archives that contain these extensions because there are some very broken archivers out there. Thanks to: Will Froning MFC after: 3 days
* Per Ruslan, bsd.lib.mk already has support for dynamically-generatedkientzle2004-09-011-17/+11
| | | | | | | | .h files. This simplifies the Makefile here a bit and makes it behave better in a couple of situations. While I'm here, clean up some comments and try to improve the organization a bit. Thanks to: Ruslan Ermilov (The Marvelous Makefile Guru)
* Cache uid-from-uname and gid-from-gname lookups during extraction.kientzle2004-08-271-17/+84
| | | | | | | This should provide a big performance boost for folks using NIS or LDAP. MFC after: 3 days Thanks to: Jun Kuriyama (for reminding me that this was still on my TODO list)
* Don't edit permissions of pre-existing directories during extract.kientzle2004-08-261-1/+1
| | | | | | | | This closes a security hole. Otherwise, libarchive will happily extract into directories to which it lacks write permissions by resetting the permissions during the extract. Thanks to: Kris Kennaway
* It is not legal to re-use a va_list variable. This causedkientzle2004-08-261-1/+4
| | | | | | a crash on amd64, in particular. Thanks to: Sean McNeil
* Eliminate reliance on non-portable <err.h> by implementing a verykientzle2004-08-1411-39/+104
| | | | | | | simple errx() function. Improve behavior when bzlib/zlib are missing by detecting and issuing an error message on attempts to read gzip/bzip2 compressed archives.
* We don't need <paths.h>, so don't bother including it.kientzle2004-08-142-2/+1
|
* Add archive_entry_set_mtime()kientzle2004-08-083-0/+11
|
* Oops. Use "unsigned long" instead of "int" for the intermediate variableskientzle2004-08-082-9/+7
| | | | | in wide-character conversions, since it's guaranteed to be large enough. Thanks to: Andrey Chernov
OpenPOWER on IntegriCloud