summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_entry.h
Commit message (Collapse)AuthorAgeFilesLines
* Use contrib sources for building libarchive, tar and cpio.mm2011-12-221-524/+0
| | | | | | Make "make test" fully operational. MFC after: 2 weeks
* Various portability fixes, plus:kientzle2009-12-281-4/+28
| | | | | * New "ino64" field. * New UTF8 interfaces for hardlink/symlink updates
* Merge from libarchive.googlecode.com: Mostly a bunch ofkientzle2009-04-121-2/+2
| | | | | | | | | | | | | corrections to the Windows support to reconcile differences between Visual Studio and Cygwin. Includes parts of revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886. Of particular note, r886 overhauled the UTF-8/Unicode conversions to work correctly regardless of whether the local system uses 16-bit or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision also added a preference for wcrtomb() (which is thread-safe) on platforms that support it.
* Structure declarations can't be dllexported.kientzle2008-12-061-1/+1
|
* MfP4: Support for storing birthtime in archive_entry objects.kientzle2008-09-301-0/+5
| | | | | Submitted by: Pedro Giffuni MFC after: 30 days
* MfP4: Generalize int64_t in the public headers to support compilerskientzle2008-09-181-2/+4
| | | | which have a 64-bit integer type but don't provide standard C99 definitions.
* MfP4: set/unset tracking for atime, ctime, mtime, and size fields.kientzle2008-09-011-2/+30
| | | | | | | | | | | | | This generalizes the existing set/unset tracking for hardlink/symlink fields and extends it to cover non-string fields. Eventually, this will be further extended to cover most fields. In particular, this is needed to correctly detect when time fields are missing (for example, reading ustar archives doesn't set atime or ctime) for proper time restore and is helpful when trying to determine whether to overwrite data when restoring hardlinks. This commit updates the tests but not the docs.
* MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit morekientzle2008-05-261-106/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | feedback, but the 2.5 branch is shaping up nicely.) In addition to many small bug fixes and code improvements: * Another iteration of versioning; I think I've got it right now. * Portability: A lot of progress on Windows support (though I'm not committing all of the Windows support files to FreeBSD CVS) * Explicit tracking of MBS, WCS, and UTF-8 versions of strings in archive_entry; the archive_entry routines now correctly return NULL only when something is unset, setting NULL properly clears string values. Most charset conversions have been pushed down to archive_string. * Better handling of charset conversion failure when writing or reading UTF-8 headers in pax archives * archive_entry_linkify() provides multiple strategies for hardlink matching to suit different format expectations * More accurate bzip2 format detection * Joerg Sonnenberger's extensive improvements to mtree support * Rough support for self-extracting ZIP archives. Not an ideal approach, but it works for the archives I've tried. * New "sparsify" option in archive_write_disk converts blocks of nulls into seeks. * Better default behavior for the test harness; it now reports all failures by default instead of coredumping at the first one.
* New public functions archive_entry_copy_link() and archive_entry_copy_link_w()kientzle2008-03-141-0/+2
| | | | | override the currently set link value, whether that's a hardlink or a symlink. Plus documentation update and tests.
* Update some comments, comment out argument names to guard againstkientzle2008-03-141-16/+50
| | | | namespace problems.
* Update libarchive to 2.4.10. This includes a number of improvementskientzle2007-12-301-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | that I've been working on but put off committing until after the RELENG_7 branch, including: * New manpages: cpio.5 mtree.5 * New archive_entry_strmode() * New archive_entry_link_resolver() * New read support: mtree format * Internal API change: read format auction only runs once * Running the auction only once allowed simplifying a lot of bid logic. * Cpio robustness: search for next header after a sync error * Support device nodes on ISO9660 images * Eliminate a lot of unnecessary copies for uncompressed archives * Corrected handling of new GNU --sparse --posix formats * Correctly handle a zero-byte write to a compressed archive * Fixed memory leaks Many of these improvements were motivated by the upcoming bsdcpio front-end. There have also been extensive improvements to the libarchive_test test harness, which I'll commit separately.
* Add archive_entry_copy_gname() and archive_entry_copy_uname()kientzle2007-07-151-0/+2
| | | | | | | functions. Approved by: re (bmah) MFC after: 3 days
* libarchive 2.2.3kientzle2007-05-291-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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.
* Because the buffer gets released immediately, I need tokientzle2007-03-011-0/+1
| | | | | | | | copy the symlink target name, not just copy the reference. This problem sometimes caused crashes when extracting symlinks from ISO9660 images. Thanks to: Diego "Flameeyes" Pettenò
* Fix the copyright notice; it was always intended to bekientzle2007-01-091-3/+2
| | | | | | | | | a vanilla 2-clause BSD license, but somehow some confusing extra verbage get copied from somewhere. Also, update the copyright dates to 2007 for all of the files. Prompted by: several questions about what those extra words really mean
* POSIX.1e-style Extended Attribute supportkientzle2006-03-211-0/+19
| | | | | | | | | | | This commit implements storing/reading POSIX.1e-style extended attribute information in "pax" format archives. An outline of the storage format is in the tar.5 manpage. The archive_read_extract() function has code to restore those archives to disk for Linux; FreeBSD implementation is forthcoming. Many thanks to Jaakko Heinonen for finding flaws in earlier proposals and doing the bulk of the coding in this work.
* In pax interchange format, use UTF8 for writingkientzle2005-10-121-0/+4
| | | | | | | | | | link names, usernames, or group names that contain non-ASCII characters. In particular, this corrects an inconsistency reported by Ed Maste when archiving symlinks with odd characters: long symlinks would get preserved, short ones would be changed.
* Style issue: Don't include <wchar.h> where it is not actually needed.kientzle2005-09-101-2/+1
| | | | | | | | | (wchar_t is defined in stddef.h, and only two files need more than that.) Portability: Since the wchar requirements are really quite modest, it's easy to define basic replacements for wcslen, wcscmp, wcscpy, etc, for use on systems that lack <wchar.h>. In particular, this allows libarchive to be used on older OpenBSD systems.
* Support libarchive with C++ by adding appropriate conditionalkientzle2005-06-041-0/+11
| | | | extern "C" declarations.
* <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-011-0/+2
| | | | | | | | 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
* Support extracting entries with pathnames longer than PATH_MAX. Inkientzle2005-03-131-0/+1
| | | | | testing, I've archived and restored dir trees with ~1MB pathnames. Most formats, of course, have much smaller limits.
* Add archive_entry_set_mtime()kientzle2004-08-081-0/+1
|
* Add convenience functions to retrieve the atime fields directly,kientzle2004-07-051-0/+2
| | | | without having to first pull the stat structure.
* Add two new convenience functions to query the uid/gid from ankientzle2004-06-271-3/+3
| | | | | | | | | archive_entry. Update the Makefile MLINKS and manpage to bring it up-to-date with the current status of archive_entry. At least the manpage actually lists all of the functions now, even if it doesn't really yet explain them all.
* Clean up some consistent confusion between "dev" and "rdev."kientzle2004-06-271-4/+7
| | | | | | | | Mostly, these were being used correctly even though a lot of variables and function names were mis-named. In the process, I found and fixed a couple of latent bugs and added a guard against adding an archive to itself.
* Consistify: #define gets 1 tab character afterwardskientzle2004-05-031-3/+3
| | | | Pointed out by: Simon Nielsen
* Update file flag handling.kientzle2004-04-261-4/+10
| | | | | | | | | | | | | | | | The new fflags support in archive_entry supports Linux and FreeBSD file flags and is a bit more gracious about unrecognized flag names than strtofflags(3). This involves some minor API breakage. The default tar format ("restricted pax") now enables pax extensions when archiving files that have flags. In particular, copying dir heirarchies with 'bsdtar cf - -C src . | bsdtar xpf - -C dest' now preserves file flags. (Note the "p" on extract!) While I'm here, fill in some additional explanation in the archive_entry.3 manpage, fill in some missing MLINKS, mark some overlooked internal functions 'static', and make a few minor style fixes.
* * Plug a buffer overrun in ACL parsing. (archive_entry.c)kientzle2004-04-131-0/+1
| | | | | | | * Re-use a single buffer for shar output formatting rather than hammering the heap. (archive_write_set_format_shar.c) * Fix a handful of minor memory leaks and clean up some of the memory-management code.
* More work on ACLs: fix error in archive_entry's ACL parsing code,kientzle2004-04-121-8/+18
| | | | | | | | | | | | | | try to set ACLs even if fflag restore fails, first cut at reading Solaris tar ACLs Code improvement: merge gnu tar read support into main tar reader; this eliminates a lot of duplicate code and generalizes the tar reader to handle formats with GNU-like extensions. Style: Makefile cleanup, eliminate 'dmalloc' references, remove 'tartype' from archive_entry (this makes archive_entry more format-agnostic) Thanks to: David Magda for providing Solaris tar test files
* Fix some issues with ACL handling:kientzle2004-04-061-0/+15
| | | | | | | | | | * ACL storage is no longer erased before a group of entries are added. * ACL text creation no longer tries to skip over non-existent text. * UTF8 encoder no longer blows up on invalid wide characters. * Fixed ACL state management for default ACLs. Also, publicize function for obtaining text-format ACL in various formats. The interface is now extensible through a "flags" argument that allows you to select a variant format.
* Overhauled ACL support. This makes us compatiblekientzle2004-04-051-6/+64
| | | | | | | | | | | | with 'star' ACL handling, though there's still a bit more work needed in this area. Added 'write_open_fd' and 'read_open_fd' to simplify, e.g., tar's u and r modes. Eliminated old 'write_open_file_position' as a bad idea. (It required closing/reopening files to do updates, which led to unpleasant implications.) Various other minor fixes, API tweaks, etc.
* Many fixes:kientzle2004-03-191-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disabled shared-library building, as some API breakage is still likely. (I didn't realize it was turned on by default.) If you have an existing /usr/lib/libarchive.so.2, I recommend deleting it. * Pax interchange format now correctly stores and reads UTF8 for extended attributes. In particular, pax format can portably handle arbitrarily long pathnames containing arbitrary characters. * Library compiles cleanly at -O2, -O3, and WARNS=6 on all FreeBSD-CURRENT platforms. * Minor portability improvements inspired by Juergen Lock and Greg Lewis. (Less reliance on stdint.h, isolating of various portability-challenged constructs.) * archive_entry transparently converts multi-byte <-> wide character strings, allowing clients and format handlers to deal with either one, as appropriate. * Support for reading 'L' and 'K' entries in standard tar archives for star compatibility. * Recognize (but don't yet handle) ACL entries from Solaris tar. * Pushed format-specific data for format readers down into format-specific storage and out of library-global storage. This should make it easier to maintain individual formats without mucking with the core library management. * Documentation updates to track the above changes. * Updates to tar.5 to correct a few mistakes and add some additional information about GNU tar and Solaris tar formats. Notes: * The basic 'tar' reader is getting more general; there's not much point in keeping the 'gnutar' reader separate. Merging the two would lose a bunch of duplicate code. * The libc ACL support is looking increasingly inadequate for my needs here. I might need to assemble some fairly significant code for parsing and building ACLs. <sigh>
* Initial import of libarchive.kientzle2004-02-091-0/+111
What it is: A library for reading and writing various streaming archive formats, especially tar and cpio. Being a library, it should be easy to incorporate into pkg_* tools, sysinstall, and any other place that needs to read or write such archives. Features: * Full automatic detection of both compression and archive format. * Extensible internal architecture to make it easy to add new formats. * Support for "pax interchange format," a new POSIX-standard tar format that eliminates essentially all of the restrictions of historic formats. * BSD license Thanks to: jkh for pushing me to start this work, gordon for encouraging me to commit it, bde for answering endless style questions, and many others for feedback and encouragement. Status: Pretty good overall, though there are still a few rough edges and the library could always use more testing. Feedback eagerly solicited.
OpenPOWER on IntegriCloud