]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
8 years agoUnify platform ACL code in single files.
Martin Matuska [Tue, 28 Mar 2017 00:52:21 +0000 (02:52 +0200)] 
Unify platform ACL code in single files.
Declare map constants static for better optimization.

8 years agoMerge pull request #892 from vapier/master
Tim Kientzle [Mon, 27 Mar 2017 00:52:01 +0000 (17:52 -0700)] 
Merge pull request #892 from vapier/master

do not make DaysInMonth static

8 years agodo not make DaysInMonth static 892/head
Mike Frysinger [Thu, 23 Mar 2017 06:31:54 +0000 (02:31 -0400)] 
do not make DaysInMonth static

Since the Feb month is written to based on arguments to this function,
it makes it not safe to use simultaneously.  Drop the static markings.

8 years agoMerge pull request #891 from vapier/master
Tim Kientzle [Sun, 26 Mar 2017 23:03:48 +0000 (16:03 -0700)] 
Merge pull request #891 from vapier/master

constify variables more

8 years agoconstify variables more 891/head
Mike Frysinger [Thu, 23 Mar 2017 06:26:52 +0000 (02:26 -0400)] 
constify variables more

A bunch of constant variables/tables are missing const markings.
Adding them allows moving more data to the read only sections, and
ends up shrinking writable data a bit by 1k on x86_64/Linux.  Not
much, but still nice.

8 years agoSupport UF_HIDDEN file flag (FreeBSD and Darwin)
Martin Matuska [Thu, 23 Mar 2017 16:30:45 +0000 (17:30 +0100)] 
Support UF_HIDDEN file flag (FreeBSD and Darwin)

8 years agoImprove extended attribute support
Martin Matuska [Thu, 23 Mar 2017 14:27:59 +0000 (15:27 +0100)] 
Improve extended attribute support

Mac OS X changes:
  - add support for extended file attributes via sys/xattr.h
  - when extracting an archive entry that has mac_metadata and
    mac_metadata is requested to be extracted, extended attributes
    are restored only from mac_metadata.
  - by default, extended attributes are stored both in mac_metadata and
    SCHILY.xattr/LIBARCHIVE.xattr. This is subject to review and change.

To match behavior on other platforms, store extended attributes on
FreeBSD with extattr_set_link() if no fd is provided.

Detection of extended attributes support in configure stage has been
rewritten.

Added xattr platform test to libarchive and xattrs option test to bsdtar.

8 years agotar: fix conditionals and add richacl support to test_option_acls
Martin Matuska [Thu, 23 Mar 2017 10:54:44 +0000 (11:54 +0100)] 
tar: fix conditionals and add richacl support to test_option_acls

8 years agoUpdate config_freebsd.h to match FreeBSD version
Martin Matuska [Tue, 21 Mar 2017 10:45:10 +0000 (11:45 +0100)] 
Update config_freebsd.h to match FreeBSD version

8 years agoAlways include extern keyword for ACL map constants
Martin Matuska [Mon, 20 Mar 2017 11:30:24 +0000 (12:30 +0100)] 
Always include extern keyword for ACL map constants

8 years agoSync documentation of archive_read_open_memory with reality.
Joerg Sonnenberger [Mon, 20 Mar 2017 11:11:00 +0000 (12:11 +0100)] 
Sync documentation of archive_read_open_memory with reality.

8 years agoMerge pull request #887 from codarrenvelvindron/master
Tim Kientzle [Sun, 19 Mar 2017 06:55:47 +0000 (23:55 -0700)] 
Merge pull request #887 from codarrenvelvindron/master

Discard 3072 bytes instead of 1024 bytes [Operation C.R]

8 years agoAs per Cryptographic Requirements published on Wikileaks on March 2017. 887/head
codarrenvelvindron [Sun, 19 Mar 2017 05:25:35 +0000 (09:25 +0400)] 
As per Cryptographic Requirements published on Wikileaks on March 2017.

We discard more bytes of the first keystream
to reduce the possibility of non-random bytes.

Similar to:
freebsd/freebsd@9395fdf

8 years agoDeduplicate working path code in archive_read_disk_entry_from_file
Martin Matuska [Thu, 16 Mar 2017 12:39:35 +0000 (13:39 +0100)] 
Deduplicate working path code in archive_read_disk_entry_from_file

8 years agoDo not treat archive_read_disk_entry_setup_acls() as static
Martin Matuska [Thu, 16 Mar 2017 11:25:53 +0000 (12:25 +0100)] 
Do not treat archive_read_disk_entry_setup_acls() as static

8 years agoAdd NFSv4 ACL support for Linux via librichacl
Martin Matuska [Wed, 15 Mar 2017 22:27:48 +0000 (23:27 +0100)] 
Add NFSv4 ACL support for Linux via librichacl

Richacls are interpreted as NFSv4 ACLs and stored in archive_acl (Richacl
flags and masks are not stored). Analog to mac_metadata, NFSv4 ACLs do not
get extracted when the extraction of extended attributes is enabled and the
"trusted.richacl" extended attribute is present.

RichACL masks and are calculated from file mode on extraction.

mac_metadata acl check has been moved in the code to be together with the
richacl check.

8 years agoMove platform-specific ACL code to individual source files.
Martin Matuska [Mon, 13 Mar 2017 14:49:38 +0000 (15:49 +0100)] 
Move platform-specific ACL code to individual source files.

This makes the code much more readable and eases the addition of new
ACL implementatons in the future.

Additional changes:
- most of ACL detection is now done at configure stage
- configuration now reports what ACL was detected
- NFSv4 ACL tests now test INHERIT_ONLY and NO_PROPAGATE_INHERIT

8 years agoMerge pull request #870 from phillipberndt/master
Tim Kientzle [Sun, 12 Mar 2017 01:57:04 +0000 (17:57 -0800)] 
Merge pull request #870 from phillipberndt/master

Seekable zip backend: Accept files with valid ZIP64 EOCD headers

8 years agoMerge pull request #841 from JPeterMugaas/cng_enable
Tim Kientzle [Sun, 12 Mar 2017 01:51:38 +0000 (17:51 -0800)] 
Merge pull request #841 from JPeterMugaas/cng_enable

Changes to configure.ac from MSYS2 Pacman project for mingw-w64.  Thi…

8 years agoMerge pull request #867 from praiskup/cpio-getgrgid
Tim Kientzle [Sun, 12 Mar 2017 01:48:51 +0000 (17:48 -0800)] 
Merge pull request #867 from praiskup/cpio-getgrgid

bsdcpio: show numeric uid/gid when names are not found

8 years agoBreak out the library version functions into a separate source file.
Tim Kientzle [Sat, 11 Mar 2017 23:30:38 +0000 (15:30 -0800)] 
Break out the library version functions into a separate source file.

This breaks a static dependency on libbz2.  Before this,
any use of libarchive that ended up linking archive_util.c would
require libbz2.  (And since archive_util.c contains a bunch of
very core functions, this is pretty much everybody.)
Now you only require libbz2 if you request library version information
or actually use some other feature that involves bzip2 support.

Note that most of the libraries provide version information via
compile-time macros -- libbz2 only provides such information via
a function call, which is why this issue only arises with libbz2.
In particular, the libbz2 version reports the version that we
are currently linked against; the other library versions report
the version we were compiled with (which may not be the same as
what we are currently using).

8 years agoOSS-Fuzz Issue 806: integer overflow in mtree_atol10
Tim Kientzle [Sat, 11 Mar 2017 23:13:23 +0000 (15:13 -0800)] 
OSS-Fuzz Issue 806: integer overflow in mtree_atol10

Rework the mtree_atol10 integer parser so it can parse
INT64_MIN without overflowing the intermediate value.

While here, make this function behave a little more predictably for
too-large input: It now always advances the pointer to the first
non-digit character.

8 years agoDarwin ACL: fix legacy support in tar/test_option_acls.c
Martin Matuska [Wed, 8 Mar 2017 20:46:27 +0000 (21:46 +0100)] 
Darwin ACL: fix legacy support in tar/test_option_acls.c
Remove ACL_FLAG_DEFER_INHERIT and ACL_FLAG_NO_INHERIT

8 years agoDarwin ACL: avoid unnecessary use of getpwuuid() and getgruuid()
Martin Matuska [Wed, 8 Mar 2017 00:02:20 +0000 (01:02 +0100)] 
Darwin ACL: avoid unnecessary use of getpwuuid() and getgruuid()

8 years agoDarwin ACL: avoid using mbr_identifier_to_uuid()
Martin Matuska [Mon, 6 Mar 2017 23:50:12 +0000 (00:50 +0100)] 
Darwin ACL: avoid using mbr_identifier_to_uuid()
Use mbr_uid_to_uuid() and mbr_gid_to_uuid() for backwards compatibility
instead. These functions have been introduced together with membership.h.

Fixes #882

8 years agoThe "size" pax header keyword overrides tar header's size field.
Martin Matuska [Sun, 5 Mar 2017 22:46:37 +0000 (23:46 +0100)] 
The "size" pax header keyword overrides tar header's size field.

Fixes #880

8 years agoMerge branch 'master' of https://github.com/libarchive/libarchive into cng_enable 841/head
J. Peter Mugaas [Sun, 5 Mar 2017 14:59:25 +0000 (09:59 -0500)] 
Merge branch 'master' of https://github.com/libarchive/libarchive into cng_enable

8 years agoMerge pull request #879 from jwilk/spelling
Martin Matuška [Fri, 3 Mar 2017 00:40:06 +0000 (01:40 +0100)] 
Merge pull request #879 from jwilk/spelling

Fix typos

8 years agotar: test_option_fflags adjustments
Martin Matuska [Thu, 2 Mar 2017 22:28:40 +0000 (23:28 +0100)] 
tar: test_option_fflags adjustments
  - Clear fflags on created directories
  - FreeBSD ZFS workaround - ZFS sets uarch on all touched files

8 years agoSolaris: use aclp instead of acl to not shadow global acl()
Martin Matuska [Thu, 2 Mar 2017 16:37:11 +0000 (17:37 +0100)] 
Solaris: use aclp instead of acl to not shadow global acl()

8 years agoNew tar test: test_option_acls
Martin Matuska [Thu, 2 Mar 2017 13:19:38 +0000 (14:19 +0100)] 
New tar test: test_option_acls
Add sunacl_get() and setTestAcl() to common test code
Test for membership.h on Mac OS X and make it a requirement for ACLs

8 years agoReorganize ACL defines and fix detection of ACL_SYNCHRONIZE on Mac OS
Martin Matuska [Thu, 2 Mar 2017 03:34:43 +0000 (04:34 +0100)] 
Reorganize ACL defines and fix detection of ACL_SYNCHRONIZE on Mac OS
Adjust MacOS part of test_acl_platform_nfs4

8 years agoChange Solaris ACL support to use acl() and facl()
Martin Matuska [Thu, 2 Mar 2017 03:27:39 +0000 (04:27 +0100)] 
Change Solaris ACL support to use acl() and facl()

This removes dependency on libsec and enables compilation on Solaris 10.

8 years agoFix typos 879/head
Jakub Wilk [Tue, 28 Feb 2017 17:24:54 +0000 (18:24 +0100)] 
Fix typos

8 years agoFix compilation on Mac OS X versions without ACL_SYNCHRONIZE
Martin Matuska [Tue, 28 Feb 2017 16:02:50 +0000 (17:02 +0100)] 
Fix compilation on Mac OS X versions without ACL_SYNCHRONIZE

8 years agoCompare full file flags in test_option_fflags
Martin Matuska [Tue, 28 Feb 2017 16:01:38 +0000 (17:01 +0100)] 
Compare full file flags in test_option_fflags

8 years agoMissing commas
Joerg Sonnenberger [Tue, 28 Feb 2017 10:38:46 +0000 (11:38 +0100)] 
Missing commas

8 years agoFix markup
Joerg Sonnenberger [Tue, 28 Feb 2017 10:37:43 +0000 (11:37 +0100)] 
Fix markup

8 years agoFix markup
Joerg Sonnenberger [Tue, 28 Feb 2017 10:36:36 +0000 (11:36 +0100)] 
Fix markup

8 years agoMove documentation from archive_write_disk(3) into individual man pages.
Joerg Sonnenberger [Tue, 28 Feb 2017 00:21:44 +0000 (01:21 +0100)] 
Move documentation from archive_write_disk(3) into individual man pages.

8 years agoDrop documentation for functions with their own man page.
Joerg Sonnenberger [Tue, 28 Feb 2017 00:14:45 +0000 (01:14 +0100)] 
Drop documentation for functions with their own man page.

8 years agoDrop trailing comma.
Joerg Sonnenberger [Tue, 28 Feb 2017 00:14:27 +0000 (01:14 +0100)] 
Drop trailing comma.

8 years agoFix typos.
Joerg Sonnenberger [Tue, 28 Feb 2017 00:08:06 +0000 (01:08 +0100)] 
Fix typos.

8 years agotest_main: compact canNodump() source code a bit
Martin Matuska [Sun, 26 Feb 2017 22:43:56 +0000 (23:43 +0100)] 
test_main: compact canNodump() source code a bit

8 years agomdoc should not contain empty lines.
Joerg Sonnenberger [Sun, 26 Feb 2017 17:36:03 +0000 (18:36 +0100)] 
mdoc should not contain empty lines.

8 years agoMark function that doesn't return as dead.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:56:10 +0000 (15:56 +0100)] 
Mark function that doesn't return as dead.

8 years agoAdd format function annotation.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:55:54 +0000 (15:55 +0100)] 
Add format function annotation.

8 years agoMark functions that don't return as dead.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:55:19 +0000 (15:55 +0100)] 
Mark functions that don't return as dead.

8 years agoBe more friendly to format string checkers.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:54:51 +0000 (15:54 +0100)] 
Be more friendly to format string checkers.

8 years agoUse ctype macros with unsigned char arguments.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:54:24 +0000 (15:54 +0100)] 
Use ctype macros with unsigned char arguments.

8 years agoMark functions that don't return as dead.
Joerg Sonnenberger [Sun, 26 Feb 2017 14:54:06 +0000 (15:54 +0100)] 
Mark functions that don't return as dead.

8 years agobsdtar tests: add test_option_fflags
Martin Matuska [Sun, 26 Feb 2017 00:17:54 +0000 (01:17 +0100)] 
bsdtar tests: add test_option_fflags

8 years agobsdtar manpage: be more precise what -p and --no-same-permissions does
Martin Matuska [Sat, 25 Feb 2017 21:37:48 +0000 (22:37 +0100)] 
bsdtar manpage: be more precise what -p and --no-same-permissions does

8 years agoUse types consistent with the prototypes in the header.
Joerg Sonnenberger [Sat, 25 Feb 2017 20:01:56 +0000 (21:01 +0100)] 
Use types consistent with the prototypes in the header.

8 years agoAfter the 3.3.1 release, bump the version to 3.3.2dev and go back to debug building.
Tim Kientzle [Sat, 25 Feb 2017 19:39:55 +0000 (11:39 -0800)] 
After the 3.3.1 release, bump the version to 3.3.2dev and go back to debug building.

8 years agoLibarchive 3.3.1 v3.3.1
Tim Kientzle [Sat, 25 Feb 2017 19:31:44 +0000 (11:31 -0800)] 
Libarchive 3.3.1

8 years agoCMake builds now default to "Release" in releases
Tim Kientzle [Sat, 25 Feb 2017 19:18:26 +0000 (11:18 -0800)] 
CMake builds now default to "Release" in releases

8 years agoseekable zip backend: Accept files with valid ZIP64 EOCD headers 870/head
Phillip Berndt [Mon, 20 Feb 2017 16:45:56 +0000 (17:45 +0100)] 
seekable zip backend: Accept files with valid ZIP64 EOCD headers

Previously, a ZIP64 file needed to have a valid classic EOCD header.
This is not the case at least for archives generated by PHPZipStreamer.

This commit allows for a bit more than necessary: While PHPZipStreamer
sets the classic EOCD header to all -1's, the bidding function now
succeeds also if the EOCD header values have arbitrary values, as long
as the ZIP64 EOCD header seems plausible. This simplifies the logic and
should not do any harm in practice.

This fixes #869.

8 years agoFirst round of fixing autotools build on MSYS2-MINGW
Martin Matuska [Fri, 24 Feb 2017 14:47:19 +0000 (15:47 +0100)] 
First round of fixing autotools build on MSYS2-MINGW

8 years agoWARC reader: avoid use of isblank()
Martin Matuska [Fri, 24 Feb 2017 13:53:46 +0000 (14:53 +0100)] 
WARC reader: avoid use of isblank()

Fixes #874

8 years agoMerge pull request #875 from tpgxyz/master
Martin Matuska [Fri, 24 Feb 2017 14:22:02 +0000 (15:22 +0100)] 
Merge pull request #875 from tpgxyz/master

fix liblzma.h detect

8 years agoMerge pull request #876 from bradking/bcrypt-vs2010
Martin Matuska [Fri, 24 Feb 2017 14:21:29 +0000 (15:21 +0100)] 
Merge pull request #876 from bradking/bcrypt-vs2010

Define bcrypt macro not available in Win 7 SDK

8 years agoMerge pull request #873 from bradking/avoid-decl-after-stmt
Martin Matuska [Fri, 24 Feb 2017 13:43:19 +0000 (14:43 +0100)] 
Merge pull request #873 from bradking/avoid-decl-after-stmt

Avoid using C99 declaration-after-statement syntax

8 years agoDefine bcrypt macro not available in Win 7 SDK 876/head
Brad King [Fri, 24 Feb 2017 12:26:35 +0000 (07:26 -0500)] 
Define bcrypt macro not available in Win 7 SDK

VS 2010 comes with the Win 7 SDK and its bcrypt.h does not define the
`BCRYPT_HASH_REUSABLE_FLAG` macro.  Provide the definition locally if
it is not available.

8 years agoAvoid using C99 declaration-after-statement syntax 873/head
Brad King [Thu, 23 Feb 2017 12:01:25 +0000 (07:01 -0500)] 
Avoid using C99 declaration-after-statement syntax

Add a dedicated `{}` block to contain a local variable instead.

8 years agoDo not archive NFSv4 ACLs on Mac OS X by default.
Martin Matuska [Fri, 24 Feb 2017 01:33:40 +0000 (02:33 +0100)] 
Do not archive NFSv4 ACLs on Mac OS X by default.

This avoids wrtiting ACLs to tar files twice. Preferred method is
via copyfile(3) (tar option --mac-metadata). If user wants to create
archives with portable NFSv4 ACLs only (SCHILY.acl.ace header with no
GUID data) the --acls and --no-mac-metadata options must be specified
on the command line.

In the manual page be more specific which types of ACLs are stored
with --acls and --mac-metadata options.

8 years agotar: add new options to allow fine-tuning of --preserve-permissions
Martin Matuska [Thu, 23 Feb 2017 21:56:40 +0000 (22:56 +0100)] 
tar: add new options to allow fine-tuning of --preserve-permissions

Allow enabling and disabling reading or writing of:
Access Control Lists (--acls, --no-acls)
Extended file flags (--fflags, --no-fflags)
Extended attributes (--xattrs, --no-xattrs)
Mac OS X metadata in AppleDouble (--mac-metadata, --no-mac-metadata)

Make --disable-copyfile an alias to --no-mac-metadata.

8 years agoMac OS: write ACLs to disk when ARCHIVE_EXTRACT_MAC_METADATA is not set
Martin Matuska [Thu, 23 Feb 2017 14:18:25 +0000 (15:18 +0100)] 
Mac OS: write ACLs to disk when ARCHIVE_EXTRACT_MAC_METADATA is not set

8 years agoAdd ARCHIVE_READDISK_NO_FFLAGS to suppress reading file flags from disk
Martin Matuska [Thu, 23 Feb 2017 11:02:13 +0000 (12:02 +0100)] 
Add ARCHIVE_READDISK_NO_FFLAGS to suppress reading file flags from disk

8 years agoFix broken Linux fflags code since kernel 3.7 (Dec 2012)
Martin Matuska [Fri, 24 Feb 2017 00:56:50 +0000 (01:56 +0100)] 
Fix broken Linux fflags code since kernel 3.7 (Dec 2012)

8 years agofix liblzma.h detect 875/head
tpg [Thu, 23 Feb 2017 22:38:22 +0000 (23:38 +0100)] 
fix liblzma.h detect

8 years agoFix portability of test use.
Joerg Sonnenberger [Thu, 23 Feb 2017 21:46:03 +0000 (22:46 +0100)] 
Fix portability of test use.

8 years agoUnbreak Mac OS build after 9aaec1f5000b26f1db00eb84a6c1f79552b12f31
Martin Matuska [Thu, 23 Feb 2017 02:02:24 +0000 (03:02 +0100)] 
Unbreak Mac OS build after 9aaec1f5000b26f1db00eb84a6c1f79552b12f31

8 years agotar: use option_flags bitfield for boolean options
Martin Matuska [Wed, 22 Feb 2017 20:39:48 +0000 (21:39 +0100)] 
tar: use option_flags bitfield for boolean options

8 years agoRevert "CMake: fix HAVE_LZMA_STREAM_ENCODER_MT test"
Martin Matuska [Wed, 22 Feb 2017 22:28:40 +0000 (23:28 +0100)] 
Revert "CMake: fix HAVE_LZMA_STREAM_ENCODER_MT test"

This reverts commit 5f70aa2252b5cee16127697f5f690648bfccfeb2.

8 years agoUse ARCHIVE_READDISK_* flags as a internal bitfield, too
Martin Matuska [Wed, 22 Feb 2017 21:42:56 +0000 (22:42 +0100)] 
Use ARCHIVE_READDISK_* flags as a internal bitfield, too

8 years agoAdd ARCHIVE_READDISK_NO_ACL option to suppress reading ACLs from disk
Martin Matuska [Wed, 22 Feb 2017 13:25:42 +0000 (14:25 +0100)] 
Add ARCHIVE_READDISK_NO_ACL option to suppress reading ACLs from disk

8 years agobsdcpio: ignore ENOENT for get{grg,pwu}id() 867/head
Pavel Raiskup [Mon, 20 Feb 2017 17:28:19 +0000 (18:28 +0100)] 
bsdcpio: ignore ENOENT for get{grg,pwu}id()

Starting from glibc 2.25, those calls set errno to ENOENT
when the requested id is not found.  So let's stop throwing
warning in this expected case.

Also rework the api of lookup_* functions so it is guaranteed that
lookup_name never returns NULL (unless ENOMEM).

8 years agoCMake: fix HAVE_LZMA_STREAM_ENCODER_MT test
tpg [Wed, 22 Feb 2017 00:20:27 +0000 (01:20 +0100)] 
CMake: fix HAVE_LZMA_STREAM_ENCODER_MT test

Fixes #816

8 years agoImprove verbosity of common functions for ACL tests
Martin Matuska [Tue, 21 Feb 2017 23:45:43 +0000 (00:45 +0100)] 
Improve verbosity of common functions for ACL tests

8 years agoMerge pull request #868 from bradking/fix-windows-build
Martin Matuska [Tue, 21 Feb 2017 20:30:30 +0000 (21:30 +0100)] 
Merge pull request #868 from bradking/fix-windows-build

Avoid using ssize_t in public header

8 years agotest suite: use a single main test file for all tests
Martin Matuska [Tue, 21 Feb 2017 15:46:45 +0000 (16:46 +0100)] 
test suite: use a single main test file for all tests

8 years agoMerge pull request #871 from praiskup/dev-in-version
Martin Matuska [Tue, 21 Feb 2017 12:12:07 +0000 (13:12 +0100)] 
Merge pull request #871 from praiskup/dev-in-version

Unify version test among tests and allow trailing "dev" in version.

8 years agotestsuite: allow 'dev' in version 871/head
Pavel Raiskup [Mon, 20 Feb 2017 19:25:24 +0000 (20:25 +0100)] 
testsuite: allow 'dev' in version

8 years agoAvoid using ssize_t in public header 868/head
Brad King [Mon, 20 Feb 2017 14:13:31 +0000 (09:13 -0500)] 
Avoid using ssize_t in public header

This type is not available on Windows compilers, so define `la_ssize_t`
for use in `archive_entry.h` as we do in `archive.h` already.

8 years agoBump version to 3.3.1dev
Tim Kientzle [Mon, 20 Feb 2017 04:39:50 +0000 (20:39 -0800)] 
Bump version to 3.3.1dev

8 years agoLibarchive 3.3.0 v3.3.0
Tim Kientzle [Mon, 20 Feb 2017 04:35:52 +0000 (20:35 -0800)] 
Libarchive 3.3.0

8 years agoCorrectly report 0 compression when nothing has yet been written.
Tim Kientzle [Sun, 19 Feb 2017 03:55:21 +0000 (19:55 -0800)] 
Correctly report 0 compression when nothing has yet been written.

8 years agoReplace archive_entry_acl_count() with archive_entry_acl_types()
Martin Matuska [Sun, 19 Feb 2017 00:45:03 +0000 (01:45 +0100)] 
Replace archive_entry_acl_count() with archive_entry_acl_types()
in one more place.

8 years agoposix writer: when creating hardinks call open() on regular files only
Martin Matuska [Sat, 18 Feb 2017 23:08:43 +0000 (00:08 +0100)] 
posix writer: when creating hardinks call open() on regular files only

Fixes #724

8 years agodisk read: improve path handling for acls, xattrs and mac_metadata
Martin Matuska [Sat, 18 Feb 2017 21:38:38 +0000 (22:38 +0100)] 
disk read: improve path handling for acls, xattrs and mac_metadata

- Do not execute pathname code at all if we have a fd. The only exception
  is setup_acls() for directory entries where default ACLs can be
  retrieved only with acl_get_file() - e.g. on Linux.
- Do not fail if tree_enter_working_dir() fails. Fallback to
  archive_entry_pathname() instead and try with path-based functions.
- Do not fail if open_on_current_dir() fails. Try with path-based
  functions.
- Pass pathname to setup_xattr() to avoid execution of duplicate code.

8 years agoTest default ACLs against a nested directory. This verifies path handling.
Martin Matuska [Sat, 18 Feb 2017 16:06:24 +0000 (17:06 +0100)] 
Test default ACLs against a nested directory. This verifies path handling.

8 years agodisk read: rework handling of paths for acls, xattrs and mac_metadata
Martin Matuska [Sat, 18 Feb 2017 01:36:20 +0000 (02:36 +0100)] 
disk read: rework handling of paths for acls, xattrs and mac_metadata

If path is read from archive_entry_sourcepath(), always enter tree
working dir. If path is read from archive_entry_pathname(), don't.
This prevents reading acls, xattrs or mac_metadata from wrong files
or not at all if no fd is provided (e.g. default ACLs on Linux can
be read only from a pathname).

Fixes #501

8 years agotar reader: fail if negative entry_bytes_remaining in gnu_sparse_10_read()
Martin Matuska [Fri, 17 Feb 2017 21:31:16 +0000 (22:31 +0100)] 
tar reader: fail if negative entry_bytes_remaining in gnu_sparse_10_read()
Do not subtract error value from entry_bytes_remaining in tar_read_header()

Fixes #864

8 years agoFix typo in archive_entry_acl.3
Martin Matuska [Wed, 15 Feb 2017 19:47:40 +0000 (20:47 +0100)] 
Fix typo in archive_entry_acl.3

8 years agoBump manpage date in archive_entry_acl.3
Martin Matuska [Wed, 15 Feb 2017 19:46:18 +0000 (20:46 +0100)] 
Bump manpage date in archive_entry_acl.3

8 years agoNew archive_acl_to_text() style flag: ARCHIVE_ENTRY_ACL_STYLE_COMPACT
Martin Matuska [Wed, 15 Feb 2017 19:43:54 +0000 (20:43 +0100)] 
New archive_acl_to_text() style flag: ARCHIVE_ENTRY_ACL_STYLE_COMPACT
- outputs NFSv4 permission and flags fields without minus characters
Use new compact format as default for the SCHILY.acl.ace pax header

8 years agoMerge pull request #863 from Tarsnap/spelling-upload
Tim Kientzle [Mon, 13 Feb 2017 01:38:51 +0000 (17:38 -0800)] 
Merge pull request #863 from Tarsnap/spelling-upload

Spelling fixes

8 years agoNFSv4 ACL parser: allow empty permission and flag fields
Martin Matuska [Sun, 12 Feb 2017 21:42:40 +0000 (22:42 +0100)] 
NFSv4 ACL parser: allow empty permission and flag fields

8 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Sun, 12 Feb 2017 20:42:38 +0000 (12:42 -0800)] 
Merge branch 'master' of github.com:libarchive/libarchive