summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Use 'int' for certain wide-character conversions instead of wchar_t.kientzle2004-08-082-4/+8
| | | | | That quiets some compiler warnings on platforms with 16-bit wchar_t. With this change, libarchive now compiles cleanly on Win32/cygwin.
* The configure-built Makefile wasn't installing archive.hkientzle2004-08-081-2/+3
|
* If you don't need a header, don't bother including it.kientzle2004-08-081-1/+0
|
* Split archive_{read,write}_finish into separate "close" (finish the archivekientzle2004-08-076-22/+67
| | | | | | | and close it) and "finish" (destroy the object) functions. For backwards compat and simplicity, have "finish" invoke "close" transparently if needed. This allows clients to close the archive and check end-of-operation statistics before destroying the object.
* Don't forget to count the end-of-file padding as part of the finishedkientzle2004-08-072-0/+2
| | | | file size.
* Having implemented read support for it, I now know how to document thekientzle2004-08-071-3/+13
| | | | GNU sparse file extension.
* Correct an mdoc error; add a sentence about tar's ancestors "tp" and "tap."kientzle2004-08-071-1/+6
|
* Fix the calculation of the most negative int64_t value, whichkientzle2004-08-072-3/+3
| | | | is used on systems that lack C99 headers (such as FreeBSD 4).
* libarchive now has two complete build systems. The usual "Makefile"kientzle2004-08-0711-506/+444
| | | | | | | | | | | | | | is present for FreeBSD. If you "make distfile" on FreeBSD, you will soon have a tar.gz file suitable for deploying to other systems (complete with the expected "configure" script, etc). This latter relies (at least for now) on the GNU auto??? tools. (I like autoconf okay, but someday I hope to write a custom Makefile.in and dispense with automake, which is somewhat odious.) As part of this, I've cleaned up some of the conditional compilation options, added make-foo to construct archive.h dynamically (it now contains some version constants), and added some useful informational files.
* Pass the pointy hat, please: Don't blow away the high-orderkientzle2004-08-071-3/+3
| | | | | | | mode bits when setting permissions from ACL data. Thanks to: David Gilbert for first reporting this and Jimmy Olgeni for noticing that it only occurred on ACL-enabled filesystems.
* Beef up the "cannot archive this" error message with thekientzle2004-08-072-2/+4
| | | | actual mode that failed, to help track down a bug.
* Correct the names and descriptions of the man pages.kientzle2004-08-041-1/+3
|
* For the "portable" distribution, the configure script will overwritekientzle2004-08-011-159/+1
| | | | | | "Makefile," so I'm moving all the FreeBSD build machinery to "Makefile.freebsd", with the default "Makefile" containing a single include.
* C standard does not permit empty initializer list.kientzle2004-08-011-6/+6
| | | | Thanks to: Stefan Farfeleder
* Conditionalize the bzip2/gzip compression/decompressionkientzle2004-07-305-0/+29
| | | | | | | | | | | code on the existence of the relevant libraries (actually, the existence of the include files). This will allow the library to be easily ported to systems that don't have these libraries. (Of course, it also means that clients using the library on such systems will not be able to take advantage of the automatic compression format detection.)
* When writing "pax" format, readers are supposed to ignore fieldskientzle2004-07-265-25/+117
| | | | | | | | | | | | | | | | | | in the regular ustar header that are overridden by the pax extended attributes. As a result, it makes perfect sense to use numeric extensions in the regular ustar header so that readers that don't understand pax extensions but do understand some other extensions can still get useful information out of it. This is especially important for filesizes, as the failure to read a file size correctly can get the reader out of sync. This commit introduces a "non-strict" option into the internal function to format a ustar header. In non-strict mode, the formatter will use longer octal values (overwriting terminators) or binary ("base-256") values as needed to ensure that large file sizes, negative mtimes, etc, have the correct values stored in the regular ustar header.
* Allow "posix" as a synonym for "pax". (The gtar folks chose "posix",kientzle2004-07-251-0/+1
| | | | | which is really, really dumb and just going to cause confusion among people who understand that "ustar" is also a POSIX standard tar format.)
* We were forcing a pax extension header for files >= 1G. Set thatkientzle2004-07-251-1/+1
| | | | cutoff to >= 8G, as it should be.
* Minor style nits.kientzle2004-07-241-2/+2
|
* Rework the feature-detection logic in archive_platform.h so thatkientzle2004-07-241-63/+116
| | | | it will work cleanly with autoconf.
* Define the PACKAGE_NAME and PACKAGE_VERSION macros.kientzle2004-07-242-0/+6
|
* Suppress a minor compiler warning if the platform doesn't support hi-reskientzle2004-07-241-0/+2
| | | | timestamps.
* Add some functions to query basic facts about the library:kientzle2004-07-243-12/+66
| | | | | | | | | | | | | | | archive_version: Returns a text string, e.g., "libarchive 1.00.000" archive_api_version: Returns the SHLIB major version archive_api_feature: Returns a feature number useful for answering questions such as "Is this recent enough to do XXX?" The last two also have macros defined in archive.h, so you can compare the compile-time and run-time environments. (In particular, you can compare ARCHIVE_API_VERSION to archive_api_version() to detect library version mismatches.) With these in hand, it will soon be time to turn on the shared-library version of libarchive... stay tuned.
* Use "linux" instead of "LINUX" to control Linux-specific code.kientzle2004-07-243-8/+18
| | | | | | | | Thanks to: David O'Brien for pointing this out. Also, add in a few additional portability tweaks and make a few more things conditional on features (HAVE_XXXX macros) rather than platform.
* Fix the handling of signed values when parsing base-256 header values.kientzle2004-07-241-32/+68
| | | | | | | | | | | | In particular, this means we can now correctly read gtar archives that contain timestamps prior to the start of the Epoch. Also, make the code in this area more portable. ANSI C99 headers are not yet ubiquitous (for example, FreeBSD 4 still lacks them), so be prepared for systems that don't have the INT64_MAX, INT64_MIN, and UINT64_MAX macros. This version still requires int64_t and uint64_t be defined (which can be done in archive_platform.h if necessary), but doesn't require them to be exactly 64 bits.
* Style: rename 'mkdirpath' so it's clearer exactly what it does.kientzle2004-07-151-22/+27
| | | | (To be precise, it creates the parent dir of the provided path.)
* Update the README notes to include the current list of supportedkientzle2004-07-121-49/+47
| | | | formats and remove some outdated comments about library limitations.
* Correct a brain-o in extract_dir: mkdirpath() and mkdir(2) arekientzle2004-07-101-2/+4
| | | | not interchangable.
* I think this is my fourth complete rewrite of the dir-creationkientzle2004-07-081-139/+213
| | | | | | | | | | | | | | | code. <whew!> This version handles all of the following edge cases: * Restoring explicit dirs with 000 permissions (star fails this test) * Restore of implicit or explicit dirs when umask=777 (gtar and star both fail this test) * Restoring dir paths containing "." and ".." components This version initially creates all dirs with permission 700 (ignoring umask), then does a post-extract "fixup" pass to set the correct permissions (which may or may not depend on umask, depending on the restore flags and whether it's an explicit or implicit dir). Permissions are restored depth-first so that permissions within non-writable dirs can be correctly restored. (The depth-sorting does correctly account for dirs with ".." components.)
* Minor wordsmithing; remove a controversial colon.kientzle2004-07-051-3/+2
|
* Add convenience functions to retrieve the atime fields directly,kientzle2004-07-053-0/+20
| | | | without having to first pull the stat structure.
* ru@'s ambitious sweep through the manpages is mostly a good thing,kientzle2004-07-051-1/+1
| | | | but some colons are supposed to be followed by uppercase letters.
* Fix the NAME section making whatis(1) happy in particular.ru2004-07-051-52/+52
|
* Fixed cross-references in SEE ALSO.ru2004-07-046-20/+28
| | | | Emininated double space and hard sentence breaks.
OpenPOWER on IntegriCloud