]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
7 years agotests: fix compile error with -Wshadow on older gcc releases 1087/head
Rolf Eike Beer [Wed, 21 Nov 2018 19:22:31 +0000 (20:22 +0100)] 
tests: fix compile error with -Wshadow on older gcc releases

Older gcc releases also warn when a local variable has the name of a global
function, like this output from gcc 4.6:

test_read_format_rar5.c:93:23: error: declaration of 'read' shadows a global declaration [-Werror=shadow]

7 years agoFix full-pathname for extraction with unc working directory on windows 1083/head
Guido Schulz [Wed, 7 Nov 2018 16:25:58 +0000 (17:25 +0100)] 
Fix full-pathname for extraction with unc working directory on windows

Fix full-pathname for extraction with unc working directory on windows

7 years agoFix a null pointer dereference bug in zip writer. 1085/head
Young_X [Mon, 12 Nov 2018 01:20:19 +0000 (09:20 +0800)] 
Fix a null pointer dereference bug in zip writer.

Signed-off-by: Young_X <YangX92@hotmail.com>
7 years agoMerge pull request #1084 from antekone/rar5_bugfixes_pr
Martin Matuška [Sun, 11 Nov 2018 12:01:23 +0000 (13:01 +0100)] 
Merge pull request #1084 from antekone/rar5_bugfixes_pr

RAR5 reader bugfixes

7 years agoRAR5 reader bugfixes (block-by-block, loops, warnings) 1084/head
Grzegorz Antoniak [Fri, 9 Nov 2018 05:01:24 +0000 (06:01 +0100)] 
RAR5 reader bugfixes (block-by-block, loops, warnings)

- Fixed a bug during a block-by-block reading loop. Added a test that
checks for the existence of this bug.

- Fixed 2 unlimited loops encountered when unpacking corrupted data.

- Removed some 'maybe uninitialized' warnings.

7 years agoMerge pull request #1080 from Tarsnap/spelling-upload
Martin Matuška [Sun, 4 Nov 2018 00:06:53 +0000 (01:06 +0100)] 
Merge pull request #1080 from Tarsnap/spelling-upload

Spelling fixes

7 years agoSpelling & grammar fix 1080/head
Graham Percival [Fri, 2 Nov 2018 21:19:11 +0000 (14:19 -0700)] 
Spelling & grammar fix

Sponsored by: Tarsnap Backup Inc.

7 years agoSpelling fixes
Graham Percival [Fri, 2 Nov 2018 21:16:56 +0000 (14:16 -0700)] 
Spelling fixes

Sponsored by: Tarsnap Backup Inc.

7 years agoMerge pull request #1079 from antekone/config_h_entries_for_libb2
Martin Matuška [Mon, 29 Oct 2018 20:32:13 +0000 (21:32 +0100)] 
Merge pull request #1079 from antekone/config_h_entries_for_libb2

RAR5 reader: Added missing config.h entries for libb2

7 years agoAdded missing config.h entries for libb2 1079/head
Grzegorz Antoniak [Sat, 27 Oct 2018 05:45:56 +0000 (07:45 +0200)] 
Added missing config.h entries for libb2

Symbols added: HAVE_LIBB2, HAVE_BLAKE2_H

RAR5 reader sources expect those symbols to be defined when using system
libb2, but the symbols were missing. This commit fixes that.

7 years agoRAR5 reader: more maybe-uninitialized size_t fixes for riscv64 FreeBSD build
Martin Matuska [Fri, 26 Oct 2018 20:21:04 +0000 (22:21 +0200)] 
RAR5 reader: more maybe-uninitialized size_t fixes for riscv64 FreeBSD build

7 years agoRAR5 reader: fix build errors on some FreeBSD platforms
Martin Matuska [Thu, 25 Oct 2018 22:48:19 +0000 (00:48 +0200)] 
RAR5 reader: fix build errors on some FreeBSD platforms
- "index" shadows a global declaration on powerpc(64), mips(64) and sparc64
- avoid unitialized size_t on riscv64

7 years agoRAR5 reader: comment out unused constant
Martin Matuska [Tue, 23 Oct 2018 12:40:44 +0000 (14:40 +0200)] 
RAR5 reader: comment out unused constant

7 years agoRAR5 reader: mark some constants static
Martin Matuska [Tue, 23 Oct 2018 11:30:32 +0000 (13:30 +0200)] 
RAR5 reader: mark some constants static

7 years agoDon't #undef stat and #define stat(). stat is one of those unfortunate 1076/head
Joel Uckelman [Thu, 18 Oct 2018 15:02:47 +0000 (16:02 +0100)] 
Don't #undef stat and #define stat(). stat is one of those unfortunate
identifiers for which there is both a struct and a function. MinGW uses
a #define for setting struct stat to be the right struct, so doing #undef
stat to clear the way for a #define for stat() the function
inadvertantly clobbers the selected stat struct. To avoid this, we
define la_stat() to _la_stat on Windows and stat() elsewhere, and then
use la_stat() instead of stat().

7 years agoHandle ZIP files with padding in the extra fields 1074/head
Joe Damato [Fri, 12 Oct 2018 00:40:45 +0000 (17:40 -0700)] 
Handle ZIP files with padding in the extra fields

Some ZIP files (certain android AAR packages) include ZIP extra fields
that appear to be padded with 0s. This is technically incorrect, however
other ZIP implementations appear to deal with these type of technically
malformed files. It appears that these broken implementations may be
padding the field to end on a word-aligned boundary.

Instead of generating an error if the length of the extra field is less
than the minimum size (4 bytes), consume the 1 - 3 bytes while checking that
each byte is zero. If all bytes are zero, no error is raised.

7 years agoAdded a test demonstrating for GitHub issue 998.
Grzegorz Antoniak [Mon, 26 Feb 2018 19:23:57 +0000 (20:23 +0100)] 
Added a test demonstrating for GitHub issue 998.

Fixes #1013
Fixes #998

7 years agoFix for GitHub issue 998.
Grzegorz Antoniak [Mon, 26 Feb 2018 19:26:33 +0000 (20:26 +0100)] 
Fix for GitHub issue 998.

7 years agoMerge pull requeset #1070 from zweger/master
Martin Matuska [Sat, 6 Oct 2018 20:43:37 +0000 (22:43 +0200)] 
Merge pull requeset #1070 from zweger/master

Don't default XAR entry atime/mtime to the current time

7 years agoAdd RAR 5.0 support to NEWS and README.md
Martin Matuska [Sat, 6 Oct 2018 20:30:41 +0000 (22:30 +0200)] 
Add RAR 5.0 support to NEWS and README.md

7 years agoAdd information about BLAKE2 multi-license to COPYING
Martin Matuska [Sat, 6 Oct 2018 20:13:44 +0000 (22:13 +0200)] 
Add information about BLAKE2 multi-license to COPYING

The BLAKE2 source files are multi-licensed with the ability to choose
between CC0 1.0 Universal, OpenSSL or Apache 2.0 licenses. For libarchive
the CC0 1.0 Universal Public Domain Dedication should be acceptable.

7 years agoarchive_read_support_format_rar5: enable blake2 support via libb2
Martin Matuska [Sat, 6 Oct 2018 19:43:30 +0000 (21:43 +0200)] 
archive_read_support_format_rar5: enable blake2 support via libb2

7 years agoMerge pull request #1061 from antekone/unrar5
Martin Matuska [Thu, 4 Oct 2018 22:42:40 +0000 (00:42 +0200)] 
Merge pull request #1061 from antekone/unrar5

Support for extraction of RAR v5 archives

7 years agoAdd missing RAR5 files to Makefile.am
Martin Matuska [Tue, 2 Oct 2018 00:08:34 +0000 (02:08 +0200)] 
Add missing RAR5 files to Makefile.am

7 years agoRemoved usage of __attribute__ macros and unsafe cast in debug code 1061/head
Grzegorz Antoniak [Thu, 4 Oct 2018 20:01:35 +0000 (22:01 +0200)] 
Removed usage of __attribute__ macros and unsafe cast in debug code

7 years agoFixed broken unit tests in other parts of the project.
Grzegorz Antoniak [Thu, 4 Oct 2018 05:01:51 +0000 (07:01 +0200)] 
Fixed broken unit tests in other parts of the project.

The problem was a bad return value for the set_option() function. This
commit changes this return value to ARCHIVE_WARN, as there currently are
no options to be handled by the decompressor.

7 years agoDon't default XAR entry atime/mtime to the current time 1070/head
Zack Weger [Tue, 2 Oct 2018 22:19:27 +0000 (18:19 -0400)] 
Don't default XAR entry atime/mtime to the current time

7 years agoRefactored tests a little bit, added 2 more tests.
Grzegorz Antoniak [Tue, 2 Oct 2018 05:14:41 +0000 (07:14 +0200)] 
Refactored tests a little bit, added 2 more tests.

7 years agoRevert "xar: fix bad seek in move_reading_point()"
Grzegorz Antoniak [Mon, 1 Oct 2018 09:13:08 +0000 (11:13 +0200)] 
Revert "xar: fix bad seek in move_reading_point()"

This reverts commit 5a837b80fe94cec2aeee77751a9b14386167c509.

7 years agoAdded some unit tests, fixed some bugs, added more comments.
Grzegorz Antoniak [Mon, 1 Oct 2018 05:37:43 +0000 (07:37 +0200)] 
Added some unit tests, fixed some bugs, added more comments.

7 years agoMerge branch 'unrar5' of github.com:antekone/libarchive into unrar5
Grzegorz Antoniak [Wed, 26 Sep 2018 04:25:53 +0000 (06:25 +0200)] 
Merge branch 'unrar5' of github.com:antekone/libarchive into unrar5

7 years agoMerge branch 'unrar5' of github.com:antekone/libarchive into unrar5
Grzegorz Antoniak [Tue, 25 Sep 2018 04:58:51 +0000 (06:58 +0200)] 
Merge branch 'unrar5' of github.com:antekone/libarchive into unrar5

7 years agoAdded support for extraction of RAR v5 archives
Grzegorz Antoniak [Sat, 8 Sep 2018 04:41:28 +0000 (06:41 +0200)] 
Added support for extraction of RAR v5 archives

This is an initial implementation of a stream-oriented unpacker. Things
that should work:

- Extraction of any compression level (stored or compressed), file
  enumeration, skipping through files,
- Support for any dictionary sizes,
- CRC32 and BLAKE2sp checksums,
- Solid archives,
- Multi-volume archives (part001, part002, etc),
- Solid multi-volume archives,
- DELTA, x86 and ARM filter support: other filters are not used
  in version 5 of the format.

Things that are missing from this implementation:

- Encryption support,
- NTFS ACL permission settings,
- Parsing the Reed-Solomon recovery record.

7 years agoMerge branch 'master' of http://github.com/libarchive/libarchive into upstream
Grzegorz Antoniak [Tue, 25 Sep 2018 04:14:37 +0000 (06:14 +0200)] 
Merge branch 'master' of http://github.com/libarchive/libarchive into upstream

7 years agoCorrectly process and verify integer arguments passed to bsdcpio and bsdtar
Martin Matuska [Sat, 22 Sep 2018 22:04:36 +0000 (00:04 +0200)] 
Correctly process and verify integer arguments passed to bsdcpio and bsdtar

Fixes #1068

7 years agoUse PATH_MAX if available for temporary path buffer
Martin Matuska [Thu, 20 Sep 2018 14:52:34 +0000 (16:52 +0200)] 
Use PATH_MAX if available for temporary path buffer
Check if temporary file path fits into buffer

Fixes #1067

7 years agoMerge pull request #1066 from Young-X/master
Martin Matuška [Thu, 20 Sep 2018 12:23:14 +0000 (14:23 +0200)] 
Merge pull request #1066 from Young-X/master

fix several potential vulnerabilities of libarchive

7 years agofix out of bounds read on empty string () filename for guntar, pax and v7tar 1066/head
Young_X [Tue, 18 Sep 2018 12:18:08 +0000 (20:18 +0800)] 
fix out of bounds read on empty string () filename for guntar, pax and v7tar

7 years agoHandle whitespace-only ACL fields correctly.
Joerg Sonnenberger [Sun, 9 Sep 2018 18:31:59 +0000 (20:31 +0200)] 
Handle whitespace-only ACL fields correctly.

The logic would result in possible reads before the start of a buffer.

Reported-By: OSS-Fuzz issue 10192
7 years agoMerge branch 'master' of github.com:antekone/libarchive into upstream
Grzegorz Antoniak [Sun, 9 Sep 2018 07:32:30 +0000 (09:32 +0200)] 
Merge branch 'master' of github.com:antekone/libarchive into upstream

7 years agoMerge pull request #1019 from donmeyer/add_allocation_check
Tim Kientzle [Sat, 8 Sep 2018 19:27:00 +0000 (12:27 -0700)] 
Merge pull request #1019 from donmeyer/add_allocation_check

Add allocation check for the zip_entry struct.

7 years agoMerge pull request #1032 from anthonybrandon/master
Tim Kientzle [Sat, 8 Sep 2018 19:26:03 +0000 (12:26 -0700)] 
Merge pull request #1032 from anthonybrandon/master

Android.mk: update libarchive sources

7 years agoMerge pull request #1037 from NamedKitten/patch-1
Tim Kientzle [Sat, 8 Sep 2018 19:24:51 +0000 (12:24 -0700)] 
Merge pull request #1037 from NamedKitten/patch-1

Remove duplicate line in README.md

7 years agoFix OpenSSL version number
Tim Kientzle [Sat, 8 Sep 2018 19:23:50 +0000 (12:23 -0700)] 
Fix OpenSSL version number

7 years agoMore information about sparse test failures
Tim Kientzle [Sat, 8 Sep 2018 18:26:48 +0000 (11:26 -0700)] 
More information about sparse test failures

7 years agoUse plain OPENSSL_VERSION_NUMBER and also block LibreSSL crap.
Joerg Sonnenberger [Wed, 5 Sep 2018 13:04:12 +0000 (15:04 +0200)] 
Use plain OPENSSL_VERSION_NUMBER and also block LibreSSL crap.

7 years agoRedo OPENSSL_VERSION_AT_LEAST check to deal with CPP idiosyncrasies
Joerg Sonnenberger [Wed, 5 Sep 2018 09:48:07 +0000 (11:48 +0200)] 
Redo OPENSSL_VERSION_AT_LEAST check to deal with CPP idiosyncrasies

7 years agoCheck for OPENSSL_VERSION_AT_LEAST before using it.
Joerg Sonnenberger [Tue, 4 Sep 2018 17:56:58 +0000 (19:56 +0200)] 
Check for OPENSSL_VERSION_AT_LEAST before using it.

As all useful things in the OpenSSL API, it is too new to be used
unconditionally. Ignore OpenSSL 1.1.0 compat for now until someone
complains.

7 years agoDon't disable -lcrypto if all hashes are provided by libc
Joerg Sonnenberger [Tue, 4 Sep 2018 13:50:17 +0000 (15:50 +0200)] 
Don't disable -lcrypto if all hashes are provided by libc

Since libarchive contains AES support nowadays, libcrypto will be needed
even if all hashes are provided otherwise.

7 years agoAvoid ctype warnings.
Joerg Sonnenberger [Tue, 4 Sep 2018 13:45:19 +0000 (15:45 +0200)] 
Avoid ctype warnings.

7 years agoEVP_CIPHER_CTX_init is deprecated, so avoid it for OpenSSL 1.1+
Joerg Sonnenberger [Tue, 4 Sep 2018 13:34:44 +0000 (15:34 +0200)] 
EVP_CIPHER_CTX_init is deprecated, so avoid it for OpenSSL 1.1+

7 years agoSet file type explicitly for all entries.
Joerg Sonnenberger [Tue, 4 Sep 2018 13:34:13 +0000 (15:34 +0200)] 
Set file type explicitly for all entries.

7 years agoSet up 3.3.4dev
Tim Kientzle [Tue, 4 Sep 2018 03:15:01 +0000 (20:15 -0700)] 
Set up 3.3.4dev

7 years ago3.3.3
Tim Kientzle [Tue, 4 Sep 2018 03:07:16 +0000 (20:07 -0700)] 
3.3.3

7 years agoUpdate README and NEWS
Tim Kientzle [Mon, 3 Sep 2018 22:45:28 +0000 (15:45 -0700)] 
Update README and NEWS

7 years agoCpio test: Expected error message depends on local strerror()
Tim Kientzle [Sun, 2 Sep 2018 07:25:08 +0000 (00:25 -0700)] 
Cpio test: Expected error message depends on local strerror()

7 years agoCheck for and include sys/sysmacros.h for GNU libc based systems.
Tim Kientzle [Sun, 2 Sep 2018 06:49:08 +0000 (23:49 -0700)] 
Check for and include sys/sysmacros.h for GNU libc based systems.

7 years agoMac OS X: Handle changed behavior of CCCryptorReset()
Martin Matuska [Sun, 19 Aug 2018 00:50:01 +0000 (02:50 +0200)] 
Mac OS X: Handle changed behavior of CCCryptorReset()

Fixes #951
Fixes #1049

7 years agoiso9660: unduplicate and simplify code in parse_file_info()
Martin Matuska [Sun, 5 Aug 2018 00:58:07 +0000 (02:58 +0200)] 
iso9660: unduplicate and simplify code in parse_file_info()

7 years agoiso9660: validate directory record length
John Starks [Wed, 25 Jul 2018 19:16:34 +0000 (12:16 -0700)] 
iso9660: validate directory record length

7 years agoReject LHA archive entries with negative size.
Joerg Sonnenberger [Thu, 19 Jul 2018 19:14:53 +0000 (21:14 +0200)] 
Reject LHA archive entries with negative size.

7 years agoSwitch mtree reader from hash table to RB tree.
Joerg Sonnenberger [Thu, 19 Jul 2018 13:59:23 +0000 (15:59 +0200)] 
Switch mtree reader from hash table to RB tree.

This avoids easily triggerable super-linear performance on malformed
input. It is the first iteration towards better performance for
duplicate entries.

7 years agoBe consistent about la_ssize_t and ssize_t (#1010).
Joerg Sonnenberger [Thu, 19 Jul 2018 13:54:45 +0000 (15:54 +0200)] 
Be consistent about la_ssize_t and ssize_t (#1010).

7 years agoAdded support for extraction of RAR v5 archives
Grzegorz Antoniak [Sat, 8 Sep 2018 04:41:28 +0000 (06:41 +0200)] 
Added support for extraction of RAR v5 archives

This is an initial implementation of a stream-oriented unpacker. Things
that should work:

- Extraction of any compression level (stored or compressed), file
  enumeration, skipping through files,
- Support for any dictionary sizes,
- CRC32 and BLAKE2sp checksums,
- Solid archives,
- Multi-volume archives (part001, part002, etc),
- Solid multi-volume archives,
- DELTA, x86 and ARM filter support: other filters are not used
  in version 5 of the format.

Things that are missing from this implementation:

- Encryption support,
- NTFS ACL permission settings,
- Parsing the Reed-Solomon recovery record.

7 years agoUse plain OPENSSL_VERSION_NUMBER and also block LibreSSL crap.
Joerg Sonnenberger [Wed, 5 Sep 2018 13:04:12 +0000 (15:04 +0200)] 
Use plain OPENSSL_VERSION_NUMBER and also block LibreSSL crap.

7 years agoRedo OPENSSL_VERSION_AT_LEAST check to deal with CPP idiosyncrasies
Joerg Sonnenberger [Wed, 5 Sep 2018 09:48:07 +0000 (11:48 +0200)] 
Redo OPENSSL_VERSION_AT_LEAST check to deal with CPP idiosyncrasies

7 years agoCheck for OPENSSL_VERSION_AT_LEAST before using it.
Joerg Sonnenberger [Tue, 4 Sep 2018 17:56:58 +0000 (19:56 +0200)] 
Check for OPENSSL_VERSION_AT_LEAST before using it.

As all useful things in the OpenSSL API, it is too new to be used
unconditionally. Ignore OpenSSL 1.1.0 compat for now until someone
complains.

7 years agoDon't disable -lcrypto if all hashes are provided by libc
Joerg Sonnenberger [Tue, 4 Sep 2018 13:50:17 +0000 (15:50 +0200)] 
Don't disable -lcrypto if all hashes are provided by libc

Since libarchive contains AES support nowadays, libcrypto will be needed
even if all hashes are provided otherwise.

7 years agoAvoid ctype warnings.
Joerg Sonnenberger [Tue, 4 Sep 2018 13:45:19 +0000 (15:45 +0200)] 
Avoid ctype warnings.

7 years agoEVP_CIPHER_CTX_init is deprecated, so avoid it for OpenSSL 1.1+
Joerg Sonnenberger [Tue, 4 Sep 2018 13:34:44 +0000 (15:34 +0200)] 
EVP_CIPHER_CTX_init is deprecated, so avoid it for OpenSSL 1.1+

7 years agoSet file type explicitly for all entries.
Joerg Sonnenberger [Tue, 4 Sep 2018 13:34:13 +0000 (15:34 +0200)] 
Set file type explicitly for all entries.

7 years agoSet up 3.3.4dev
Tim Kientzle [Tue, 4 Sep 2018 03:15:01 +0000 (20:15 -0700)] 
Set up 3.3.4dev

7 years ago3.3.3 v3.3.3
Tim Kientzle [Tue, 4 Sep 2018 03:07:16 +0000 (20:07 -0700)] 
3.3.3

7 years agoUpdate README and NEWS
Tim Kientzle [Mon, 3 Sep 2018 22:45:28 +0000 (15:45 -0700)] 
Update README and NEWS

7 years agoCpio test: Expected error message depends on local strerror()
Tim Kientzle [Sun, 2 Sep 2018 07:25:08 +0000 (00:25 -0700)] 
Cpio test: Expected error message depends on local strerror()

7 years agoCheck for and include sys/sysmacros.h for GNU libc based systems.
Tim Kientzle [Sun, 2 Sep 2018 06:49:08 +0000 (23:49 -0700)] 
Check for and include sys/sysmacros.h for GNU libc based systems.

7 years agoMac OS X: Handle changed behavior of CCCryptorReset()
Martin Matuska [Sun, 19 Aug 2018 00:50:01 +0000 (02:50 +0200)] 
Mac OS X: Handle changed behavior of CCCryptorReset()

Fixes #951
Fixes #1049

7 years agoiso9660: unduplicate and simplify code in parse_file_info()
Martin Matuska [Sun, 5 Aug 2018 00:58:07 +0000 (02:58 +0200)] 
iso9660: unduplicate and simplify code in parse_file_info()

7 years agoMerge pull request #1042 from jstarks:iso9660_cve
Martin Matuska [Sun, 5 Aug 2018 00:49:56 +0000 (02:49 +0200)] 
Merge pull request #1042 from jstarks:iso9660_cve

iso9660: validate directory record length

Fixes CVE-2017-14501

7 years agowindows: Support UTF-8 locale 1043/head
John Starks [Mon, 23 Jul 2018 22:37:09 +0000 (15:37 -0700)] 
windows: Support UTF-8 locale

Newer versions of the Windows CRT can return locales that are suffixed
with .utf8 instead of an integer code page.

7 years agoiso9660: validate directory record length 1042/head
John Starks [Wed, 25 Jul 2018 19:16:34 +0000 (12:16 -0700)] 
iso9660: validate directory record length

7 years agoReject LHA archive entries with negative size.
Joerg Sonnenberger [Thu, 19 Jul 2018 19:14:53 +0000 (21:14 +0200)] 
Reject LHA archive entries with negative size.

7 years agoSwitch mtree reader from hash table to RB tree.
Joerg Sonnenberger [Thu, 19 Jul 2018 13:59:23 +0000 (15:59 +0200)] 
Switch mtree reader from hash table to RB tree.

This avoids easily triggerable super-linear performance on malformed
input. It is the first iteration towards better performance for
duplicate entries.

7 years agoBe consistent about la_ssize_t and ssize_t (#1010).
Joerg Sonnenberger [Thu, 19 Jul 2018 13:54:45 +0000 (15:54 +0200)] 
Be consistent about la_ssize_t and ssize_t (#1010).

7 years agoRemove duplicate line in README.md 1037/head
NamedKitten [Tue, 17 Jul 2018 16:29:11 +0000 (17:29 +0100)] 
Remove duplicate line in README.md

The format ""POSIX octet-oriented cpio was listed twice in the same list.

7 years agoMake warning-as-error optional but retain current defaults 1033/head
Mike Ellery [Fri, 29 Jun 2018 17:07:26 +0000 (10:07 -0700)] 
Make warning-as-error optional but retain current defaults

7 years agoAndroid.mk: update libarchive sources 1032/head
Anthony Brandon [Thu, 21 Jun 2018 11:38:15 +0000 (13:38 +0200)] 
Android.mk: update libarchive sources

Remove non existent file and add missing file the list of libarchive
sources in Android.mk.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
7 years agoMerge pull request #1027 from somasis/master
Tim Kientzle [Mon, 18 Jun 2018 01:04:44 +0000 (18:04 -0700)] 
Merge pull request #1027 from somasis/master

archive_entry.h: Don't use int64_t without including stdint.h

7 years agoarchive_entry.h: Fix missing int64_t type on musl libc 1027/head
Kylie McClain [Wed, 13 Jun 2018 21:11:48 +0000 (17:11 -0400)] 
archive_entry.h: Fix missing int64_t type on musl libc

7 years agoMerge pull request #1024 from phcerdan/fix_strncpy_warning
Tim Kientzle [Sun, 10 Jun 2018 16:28:29 +0000 (09:28 -0700)] 
Merge pull request #1024 from phcerdan/fix_strncpy_warning

Fix gcc 8 warning about strncpy

7 years agoCheck if root before operations. 1023/head
Eric Borisch [Tue, 5 Jun 2018 03:13:43 +0000 (22:13 -0500)] 
Check if root before operations.

No overall change to the code path when root; when not root, ensure
created files are initially user writable if we need to do XATTRs or HFS
compression. Mode is fixed later to the desired final mode in this case.

Net of one extra syscall per file to fix the mode at the end only when
all of these are true:
 * Not root
 * Final mode is not owner-writable
 * XATTRs or HFS compression are needed.

These changes make it unexpectedly pass the xattr test on freebsd.

7 years agoFix gcc 8 warning about strncpy 1024/head
Pablo Hernandez-Cerdan [Sun, 3 Jun 2018 15:01:59 +0000 (11:01 -0400)] 
Fix gcc 8 warning about strncpy

Use memcpy instead.

Fix #1020

7 years agoUse (euid == 0) as switch for xattr/mode order
Eric Borisch [Fri, 1 Jun 2018 04:51:38 +0000 (23:51 -0500)] 
Use (euid == 0) as switch for xattr/mode order

For non-root users, set xattr first. For root users (who might be
setting security xattrs liable to clear with mode) set mode first.
Certainly needs testing on other platforms, but hits the cases I've
identified so far on Darwin.

7 years agoPerform xattrs before mode on Darwin.
Eric Borisch [Fri, 1 Jun 2018 03:45:34 +0000 (22:45 -0500)] 
Perform xattrs before mode on Darwin.

Setting the mode on Darwin does not clear xattrs, but xattrs cannot be
set by a non-root user if the mode is not writable. Perform xattrs first
and then mode in _archive_write_disk_finish_entry() on Datwin. Darwin
ACLs are handled later.

Prior change handled --hfsCompression - specific xattrs, this catches
any other (encoded in the archive) attributes.

7 years agoAlways create files owner-writable.
Eric Borisch [Fri, 1 Jun 2018 02:03:06 +0000 (21:03 -0500)] 
Always create files owner-writable.

Keeps TODO_MODE around if final_mode isn't owner writable, but lets
fsetxattr() succeed for non-root users. (Required for HFS+ compression.)

7 years agoAdd some gzip header tests including RFC 1952 compression level flag
Martin Matuska [Mon, 21 May 2018 21:42:14 +0000 (23:42 +0200)] 
Add some gzip header tests including RFC 1952 compression level flag

7 years agoMerge pull request #973 from o3dwade:master
Martin Matuska [Mon, 21 May 2018 20:32:29 +0000 (22:32 +0200)] 
Merge pull request #973 from o3dwade:master

Record informational compression level in gzip header

8 years agoAdd allocation check for the zip_entry struct. 1019/head
Don Meyer [Tue, 15 May 2018 22:05:11 +0000 (15:05 -0700)] 
Add allocation check for the zip_entry struct.

8 years agoUnbreak write test for libzstd 1.3.4
Martin Matuska [Fri, 13 Apr 2018 10:21:10 +0000 (12:21 +0200)] 
Unbreak write test for libzstd 1.3.4

Fixes #1006

8 years agoRemove lzop package from Darwin testing
Martin Matuska [Fri, 13 Apr 2018 09:15:07 +0000 (11:15 +0200)] 
Remove lzop package from Darwin testing