]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
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 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

8 years agoZip reader: Guard against 64-bit overflow for file sizes and offsets
Tim Kientzle [Sun, 12 Feb 2017 20:39:45 +0000 (12:39 -0800)] 
Zip reader:  Guard against 64-bit overflow for file sizes and offsets

We use `uint64_t` consistently when parsing values from the archive
but then assign them to `int64_t` variables.  This can result in
nonsensical negative file sizes or offsets in some cases.

Reported-By: OSS-Fuzz issue 556
8 years agoNFSv4 ACL maps: make const and deduplicate a bit
Martin Matuska [Sun, 12 Feb 2017 12:53:27 +0000 (13:53 +0100)] 
NFSv4 ACL maps: make const and deduplicate a bit

8 years agoSpelling fixes 863/head
Graham Percival [Mon, 6 Feb 2017 23:07:58 +0000 (15:07 -0800)] 
Spelling fixes

Sponsored by: Tarsnap Backup Inc.

8 years agomtree reader: limit the range of nanoseconds (0 to 999999999)
Martin Matuska [Tue, 7 Feb 2017 23:23:08 +0000 (00:23 +0100)] 
mtree reader: limit the range of nanoseconds (0 to 999999999)
Prevents a possible integer overflow in archive_entry_set_mtime()

Reported-By: OSS-Fuzz issue 538

8 years agocpio reader: compare TRAILER!!! against pathname only
Martin Matuska [Mon, 6 Feb 2017 23:57:18 +0000 (00:57 +0100)] 
cpio reader: compare TRAILER!!! against pathname only
If entry was a symlink, the old code replaced the pointer with linkname.

Reported-By: OSS-Fuzz issue 504

8 years agoWARC reader: skip whitespace and check for first digit in _warc_rdlen()
Martin Matuska [Mon, 6 Feb 2017 02:07:33 +0000 (03:07 +0100)] 
WARC reader: skip whitespace and check for first digit in _warc_rdlen()
Fixes possible heap-buffer-overflow.

Reported-By: OSS-Fuzz issue 552

8 years agoXAR reader: implement checksum_cleanup() to avoid memory leaks on error
Martin Matuska [Mon, 6 Feb 2017 01:48:24 +0000 (02:48 +0100)] 
XAR reader: implement checksum_cleanup() to avoid memory leaks on error

Reported-By: OSS-Fuzz issue 551

8 years agoAdd missing test file
Tim Kientzle [Sun, 5 Feb 2017 20:45:35 +0000 (12:45 -0800)] 
Add missing test file

8 years agoFix spelling of test file
Tim Kientzle [Sun, 5 Feb 2017 19:56:01 +0000 (11:56 -0800)] 
Fix spelling of test file

8 years agoWARC reader: additonal sanity checks
Martin Matuska [Sun, 5 Feb 2017 01:29:14 +0000 (02:29 +0100)] 
WARC reader: additonal sanity checks
- only WARC versions 0.12 to 1.0 are supported
- do not probe for unsupported types
- do not accept spaces inside URI
- verify that URI is CRLF terminated

8 years agoWARC reader: always check against valid line end
Martin Matuska [Sat, 4 Feb 2017 00:30:53 +0000 (01:30 +0100)] 
WARC reader: always check against valid line end
Change the way how WARC version number is determined.

Reported-By: OSS-Fuzz issue 511, 526, 532

8 years agoMention Mac OS NFSv4 ACL support in NEWS
Martin Matuska [Wed, 1 Feb 2017 23:11:40 +0000 (00:11 +0100)] 
Mention Mac OS NFSv4 ACL support in NEWS

8 years agoRepair detected memory leaks in libarchive tests
Martin Matuska [Wed, 1 Feb 2017 00:44:43 +0000 (01:44 +0100)] 
Repair detected memory leaks in libarchive tests
Fix test_callbacks() in test_read_disk_directory_traversals

8 years agoFree leaked archive_string in create_filesystem_object()
Martin Matuska [Tue, 31 Jan 2017 19:23:20 +0000 (20:23 +0100)] 
Free leaked archive_string in create_filesystem_object()

8 years agoISO9960 reader: free leaked archive_string in parse_file_info()
Martin Matuska [Tue, 31 Jan 2017 19:22:07 +0000 (20:22 +0100)] 
ISO9960 reader: free leaked archive_string in parse_file_info()

8 years agoPlug memory leak in zip_read_local_file_header()
Martin Matuska [Tue, 31 Jan 2017 03:03:31 +0000 (04:03 +0100)] 
Plug memory leak in zip_read_local_file_header()

8 years agoPlug memory leak in __archive_read_program()
Martin Matuska [Tue, 31 Jan 2017 02:51:49 +0000 (03:51 +0100)] 
Plug memory leak in __archive_read_program()

8 years agoProperly free memory allocated by acl_get_qualifier()
Martin Matuska [Tue, 31 Jan 2017 00:20:20 +0000 (01:20 +0100)] 
Properly free memory allocated by acl_get_qualifier()
Plug memory leaks in acl tests

8 years agoPlug memory leak in XAR reader and one in XAR writer
Martin Matuska [Mon, 30 Jan 2017 15:46:29 +0000 (16:46 +0100)] 
Plug memory leak in XAR reader and one in XAR writer

8 years agoDisable automatic detection of liblzo2
Martin Matuska [Mon, 30 Jan 2017 00:39:03 +0000 (01:39 +0100)] 
Disable automatic detection of liblzo2
Replace liblzo with lzop in Travis CI builds
Fix lzop tests

Distribution of libarchive binaries linked against LZO violates
LZO GPL license. liblzo2 can still be linked with --with-lzo2

8 years agoFree data->program_name in __archive_write_program_free()
Martin Matuska [Sun, 29 Jan 2017 23:52:13 +0000 (00:52 +0100)] 
Free data->program_name in __archive_write_program_free()
(memory leak introduced in 67028d9f3c484810c3485f13737f01dbaa204ea8)

8 years agoAdd NFSv4 ACL support for Mac OS X
Martin Matuska [Sun, 29 Jan 2017 14:51:02 +0000 (15:51 +0100)] 
Add NFSv4 ACL support for Mac OS X

Mac OS X supports user and group NFSv4-style ACLs only (extended ACLs).
File-mode ACLs (owner@, group@ and everyone@) are not supported.

Behavior on Mac OS X:
- libarchive does not store GUID of Mac OS X extended ACLs. Only
  uid or gid (and the corresponding user or group name) are stored.
- When extracting an archive entry that has mac_metadata, NFSv4 ACLs
  are not written to disk (mac_metadata already contains ACLs)
- When writing ACLs to disk from an archive entry with NFSv4 ACLs
  owner@, group@ and everyone@ ACLs are ignored. User and group ids
  are converted to a GUID (this may lead to a fabricated GUID if
  the user or group ID is not present on the system)
- When reading ACL from disk and there is at least one user or group
  extended ACL entry, owner@, group@ and everyone@ entries mirroring
  the file mode are added to the end of the entry's ACL.

8 years agoIssue #857: Clarify the padding/blocking behavior of the convenience functions
Tim Kientzle [Sun, 29 Jan 2017 05:15:37 +0000 (21:15 -0800)] 
Issue #857: Clarify the padding/blocking behavior of the convenience functions

This is a more expansive documentation change than the one suggested
by @bigpet in PR#857.

8 years agoMerge pull request #805 from bsergean/patch-1
Tim Kientzle [Sun, 29 Jan 2017 04:56:20 +0000 (20:56 -0800)] 
Merge pull request #805 from bsergean/patch-1

Fix compiler warning about comparison of integers of different signs

This specifically works around a bug in Android, whose `struct stat` does not satisfy POSIX.

8 years agoMerge pull request #844 from yaneurabeya/tar-coverity-fixes
Tim Kientzle [Sun, 29 Jan 2017 04:48:55 +0000 (20:48 -0800)] 
Merge pull request #844 from yaneurabeya/tar-coverity-fixes

Fix coverity issues with tar

8 years agoMerge pull request #845 from yaneurabeya/libarchive-coverity-fixes
Tim Kientzle [Sun, 29 Jan 2017 04:42:29 +0000 (20:42 -0800)] 
Merge pull request #845 from yaneurabeya/libarchive-coverity-fixes

Fix coverity issues with libarchive/

8 years agoMerge pull request #858 from SixTrack/fix_CYGWIN64-MSYS
Tim Kientzle [Sun, 29 Jan 2017 04:25:36 +0000 (20:25 -0800)] 
Merge pull request #858 from SixTrack/fix_CYGWIN64-MSYS

Fix cygwin64 compilation

8 years agoCorrectly convert 32-bit time_t to __time64_t 858/head
Kyrre Sjobak [Thu, 26 Jan 2017 13:36:56 +0000 (14:36 +0100)] 
Correctly convert 32-bit time_t to __time64_t

8 years agoAvoid endless loop when parsing MSZIP signature in cab archives
Martin Matuska [Wed, 25 Jan 2017 22:14:59 +0000 (23:14 +0100)] 
Avoid endless loop when parsing MSZIP signature in cab archives

Reported-By: OSS-Fuzz issue 335

8 years agocpio reader: use strncmp() when comparing against TRAILER!!!
Martin Matuska [Wed, 25 Jan 2017 21:54:14 +0000 (22:54 +0100)] 
cpio reader: use strncmp() when comparing against TRAILER!!!

Reported-By: OSS-Fuzz issue 422

8 years agomtree reader: check line length when looking for /set and /unset
Martin Matuska [Wed, 25 Jan 2017 01:41:54 +0000 (02:41 +0100)] 
mtree reader: check line length when looking for /set and /unset
Fixes possible heap-buffer-overflow.

Reported-By: OSS-Fuzz issue 421, 443

8 years agoWARC reader: do not consider CR or LF as space in xstrpisotime()
Martin Matuska [Wed, 25 Jan 2017 00:29:16 +0000 (01:29 +0100)] 
WARC reader: do not consider CR or LF as space in xstrpisotime()
Fixes possible heap-buffer-overflow.

Reported-By: OSS-Fuzz issue 382, 458

8 years agoFix possible null pointer dereference in lz4_filter_read_legacy_stream()
Martin Matuska [Tue, 24 Jan 2017 22:50:04 +0000 (23:50 +0100)] 
Fix possible null pointer dereference in lz4_filter_read_legacy_stream()

Reported-By: OSS-Fuzz issue 453

8 years agoFix typo in comment
Kyrre Sjobak [Tue, 24 Jan 2017 15:58:07 +0000 (16:58 +0100)] 
Fix typo in comment

8 years agoSilence unused-parameter compiler warnings.
Kyrre Sjobak [Tue, 24 Jan 2017 15:09:23 +0000 (16:09 +0100)] 
Silence unused-parameter compiler warnings.

8 years agoFix signed/unsigned comparison warnings.
Kyrre Sjobak [Tue, 24 Jan 2017 15:04:08 +0000 (16:04 +0100)] 
Fix signed/unsigned comparison warnings.

8 years agoAvoid multiple #DEFINEs with the same name
Kyrre Sjobak [Tue, 24 Jan 2017 15:08:04 +0000 (16:08 +0100)] 
Avoid multiple #DEFINEs with the same name

8 years agoCMakelists.txt: disable new acl variables if acl is not requested
Martin Matuska [Tue, 24 Jan 2017 12:08:36 +0000 (13:08 +0100)] 
CMakelists.txt: disable new acl variables if acl is not requested

8 years agoMerge pull request #856 from DerDakon/cmake-man-install
Tim Kientzle [Sun, 22 Jan 2017 19:59:44 +0000 (11:59 -0800)] 
Merge pull request #856 from DerDakon/cmake-man-install

CMake: install all manpages

8 years agoFail with negative lha->compsize in lha_read_file_header_1()
Martin Matuska [Thu, 19 Jan 2017 21:00:18 +0000 (22:00 +0100)] 
Fail with negative lha->compsize in lha_read_file_header_1()
Fixes a heap buffer overflow reported in Secunia SA74169

8 years agoReplace archive_acl_count() with archive_acl_types() where possible
Martin Matuska [Wed, 18 Jan 2017 23:40:36 +0000 (00:40 +0100)] 
Replace archive_acl_count() with archive_acl_types() where possible
Report all types of ACLs in archive_entry_strmode()
Simplify archive_write_disk_set_acls()

8 years agoUse HAVE_ACL_TYPE_NFS4 instead of checking against system constant
Martin Matuska [Tue, 17 Jan 2017 14:04:43 +0000 (15:04 +0100)] 
Use HAVE_ACL_TYPE_NFS4 instead of checking against system constant
Verify ACL types in test_acl_platform_nfs4.c
Add missing inheritance flag to test_acl_platform_nfs4.c

8 years ago- Don't check for `mine` being NULL; it's already been dereferenced 845/head
Ngie Cooper [Tue, 13 Dec 2016 08:11:51 +0000 (00:11 -0800)] 
- Don't check for `mine` being NULL; it's already been dereferenced
- Don't leak `fd`; close when done
- Remove useless frees (one would just involve freeing a NULL pointer;
  the other would involve freeing memory which is free'd elsewhere)

Reported by: Coverity
CID: 101675410167551018902

8 years agoAlways free `file` on failure in `parse_file_info`
Ngie Cooper [Tue, 13 Dec 2016 07:59:56 +0000 (23:59 -0800)] 
Always free `file` on failure in `parse_file_info`

Reported by: Coverity
CID: 1016754

8 years agoFree attr, name, and value on memory allocation failure in
Ngie Cooper [Tue, 13 Dec 2016 07:53:43 +0000 (23:53 -0800)] 
Free attr, name, and value on memory allocation failure in
expat_xmlattr_setup to avoid leaking the storage

Reported by: Coverity
CID: 1229979-1229981

8 years agoFree `temp` immediately after use in archive_write_gnutar_header(..)
Ngie Cooper [Tue, 13 Dec 2016 07:33:22 +0000 (23:33 -0800)] 
Free `temp` immediately after use in archive_write_gnutar_header(..)

This prevents it from being leaked if the function returns early

Reported by: Coverity
CID: 1016752

8 years agoFix up some minor whitespace issues in archive_write_gnutar_header(..)
Ngie Cooper [Tue, 13 Dec 2016 07:19:34 +0000 (23:19 -0800)] 
Fix up some minor whitespace issues in archive_write_gnutar_header(..)

8 years agoClarify that calling memset with '0' is intentional by casting the
Ngie Cooper [Tue, 13 Dec 2016 07:16:25 +0000 (23:16 -0800)] 
Clarify that calling memset with '0' is intentional by casting the
value to (int)

Reported by: Coverity
CID: 1017786

8 years agoMerge branch 'master' into tar-coverity-fixes 844/head
ngie [Tue, 17 Jan 2017 02:14:31 +0000 (18:14 -0800)] 
Merge branch 'master' into tar-coverity-fixes

8 years agoCMake: install all manpages 856/head
Rolf Eike Beer [Mon, 16 Jan 2017 10:44:28 +0000 (11:44 +0100)] 
CMake: install all manpages

This was fixed in commit d6ccad60de8f51615ae2abccf37c125b12402107 for automake,
but not for CMake.

8 years agoRework sun_acl_is_trivial() once again
Martin Matuska [Sun, 15 Jan 2017 22:51:46 +0000 (23:51 +0100)] 
Rework sun_acl_is_trivial() once again

Make the NFSv4 ACL part more readable
Declare constants as constants
ACE_DELETE_CHILD for write perms was introduced by illumos in
illumos/illumos-gate@d316fffc9c361532a482208561bbb614dac7f916
The best solution is to treat both types of write perms as trivial

8 years agoFix two tests on Solaris if compiling with -m64
Alexander Pyhalov [Sun, 15 Jan 2017 01:09:28 +0000 (02:09 +0100)] 
Fix two tests on Solaris if compiling with -m64

8 years agoFix sun_acl_is_trivial() for directories
Martin Matuska [Sun, 15 Jan 2017 00:56:26 +0000 (01:56 +0100)] 
Fix sun_acl_is_trivial() for directories
Directory write permission includes ACE_DELETE_CHILD on Solaris

8 years agoSupport extracting NFSv4 ACLs from Solaris tar archives
Martin Matuska [Sun, 15 Jan 2017 00:44:34 +0000 (01:44 +0100)] 
Support extracting NFSv4 ACLs from Solaris tar archives
Fix read of default ACLs from Solaris tar archives
Update Solaris tar ACL test to test all ACL types

8 years agoStyle fix: replace spaces with tabs
Martin Matuska [Fri, 13 Jan 2017 10:54:22 +0000 (11:54 +0100)] 
Style fix: replace spaces with tabs

8 years agoFix ci_test_driver error status on non-FreeBSD
Martin Matuska [Thu, 12 Jan 2017 15:55:31 +0000 (16:55 +0100)] 
Fix ci_test_driver error status on non-FreeBSD

8 years agoUse uid 18 instead of 17 for test_option_uid_uname
Martin Matuska [Thu, 12 Jan 2017 15:12:01 +0000 (16:12 +0100)] 
Use uid 18 instead of 17 for test_option_uid_uname
Uid 17 is assigned on Solaris

8 years agoImplement ACL triviality check for Solaris
Martin Matuska [Thu, 12 Jan 2017 15:07:15 +0000 (16:07 +0100)] 
Implement ACL triviality check for Solaris

8 years agoAllow setting custom make and cmake in build/ci_build.sh
Martin Matuska [Wed, 11 Jan 2017 22:20:58 +0000 (23:20 +0100)] 
Allow setting custom make and cmake in build/ci_build.sh

8 years agoUnify platform ACL tests
Martin Matuska [Wed, 11 Jan 2017 12:25:39 +0000 (13:25 +0100)] 
Unify platform ACL tests

Enable POSIX.1e tests on Linux systems with libacl
Add POSIX.1e default ACL test

8 years agoTravis CI: use container based infrastructre
Martin Matuska [Tue, 10 Jan 2017 21:28:37 +0000 (22:28 +0100)] 
Travis CI: use container based infrastructre
All required packages are now supported via the "apt" addon.
Install missing libacl1-dev libraries.

8 years agoMake acl_perm_map[] and acl_inherit_map[] more readable
Martin Matuska [Tue, 10 Jan 2017 20:50:37 +0000 (21:50 +0100)] 
Make acl_perm_map[] and acl_inherit_map[] more readable
Fix missing acl_inherit_map[] in archive_write_disk_acl.c
Add comments to translate_acl()

8 years agoAdd POSIX.1e and NFSv4 ACL support for Solaris and derivates
Martin Matuska [Tue, 10 Jan 2017 16:03:17 +0000 (17:03 +0100)] 
Add POSIX.1e and NFSv4 ACL support for Solaris and derivates

8 years agoDo not fallback from failed acl_set_fd() to acl_set_file()
Martin Matuska [Tue, 10 Jan 2017 11:37:38 +0000 (12:37 +0100)] 
Do not fallback from failed acl_set_fd() to acl_set_file()
Do not fallback from failed acl_set_fd_np() to acl_set_link_np()

8 years agoFix id handling in archive_acl_(from|to)_text* for NFSv4 ACLs
Martin Matuska [Mon, 9 Jan 2017 23:36:58 +0000 (00:36 +0100)] 
Fix id handling in archive_acl_(from|to)_text* for NFSv4 ACLs

Always append id if ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID flag is set.
Try interpreting the name field as a numeric id.

This matches behavior of the "star" archiver.

8 years agoMerge pull request #691 from stefanberger/master
Tim Kientzle [Mon, 9 Jan 2017 14:06:09 +0000 (06:06 -0800)] 
Merge pull request #691 from stefanberger/master

Add support for extracting SCHILY.xattr extended attributes

8 years agoWrite xattr as LIBARCHIVE.xattr and/or SCHILY.xattr 691/head
Stefan Berger [Fri, 6 May 2016 20:24:27 +0000 (16:24 -0400)] 
Write xattr as LIBARCHIVE.xattr and/or SCHILY.xattr

Introduce flags to write extended attributes either with the prefix
LIBARCHIVE.xattr or SCHIL.xattr. For the existing bsdtar formats
'pax' and 'posix' we now choose to write both. This enables backwards
compatibility and allow us to exchange tar files carrying extended
attributes with GNU tar.

8 years agoIntroduce add_pax_attr_binary and have add_pax_attr call it
Stefan Berger [Fri, 6 May 2016 18:34:01 +0000 (14:34 -0400)] 
Introduce add_pax_attr_binary and have add_pax_attr call it

To prepare for being able to write binary values in the PAX extended
header, introduce add_pax_attr_binary and have add_pax_attr call it
by determining the length of the string being passed.

8 years agoIntroduce archive_array_append to append a raw array to an archive_string
Stefan Berger [Fri, 6 May 2016 19:20:30 +0000 (15:20 -0400)] 
Introduce archive_array_append to append a raw array to an archive_string

Introduce archive_array_append to append a raw array to an archive_string.
We need this for binary values in the PAX header.

We can append arbitray data to the archive_string since its string append
operations simply append at the end pointer rather than walking the string
and appending at the zero byte.

8 years agoAdd test case for SCHILY.xattr support
Stefan Berger [Fri, 6 May 2016 17:51:56 +0000 (13:51 -0400)] 
Add test case for SCHILY.xattr support

Add a test case for the SCHILY.xattr support. We test whether the
provided archive's PAX header is parsed correctly.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
8 years agoWhen trying to write ACLs do not warn if filesystem has no ACL support
Martin Matuska [Sun, 8 Jan 2017 21:24:40 +0000 (22:24 +0100)] 
When trying to write ACLs do not warn if filesystem has no ACL support

8 years agoWhen writing ACLs use acl_set_fd_np() if available before acl_set_fd()
Martin Matuska [Fri, 6 Jan 2017 02:50:43 +0000 (03:50 +0100)] 
When writing ACLs use acl_set_fd_np() if available before acl_set_fd()

8 years agoAdd missing entries to acl_inherit_map[]
Martin Matuska [Wed, 4 Jan 2017 15:30:34 +0000 (16:30 +0100)] 
Add missing entries to acl_inherit_map[]

8 years agoIf possible read default ACLs with acl_get_fd_np()
Martin Matuska [Wed, 4 Jan 2017 13:07:50 +0000 (14:07 +0100)] 
If possible read default ACLs with acl_get_fd_np()

8 years agoAdd support for extracting SCHIL.xattr extended attributes
Stefan Berger [Mon, 25 Apr 2016 14:41:01 +0000 (10:41 -0400)] 
Add support for extracting SCHIL.xattr extended attributes

This patch adds support for extracting SCHIL.xattr extended attributes
found in the PAX extended header. Since some of the attributes found
there can be binary data, we extend the parser for support of binary data.

One example for an attribute with binary data is SCHILY.xattr.security.ima,
which contains a digital signature.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
8 years agoMerge pull request #854 from Tarsnap/spelling-upload
Martin Matuska [Tue, 3 Jan 2017 23:19:42 +0000 (00:19 +0100)] 
Merge pull request #854 from Tarsnap/spelling-upload

Spelling fixes

8 years agoFix build on Solaris-based systems
Martin Matuska [Mon, 2 Jan 2017 15:51:00 +0000 (16:51 +0100)] 
Fix build on Solaris-based systems

8 years agoSpelling fix in "trad_enc_decypt_byte" code 854/head
Graham Percival [Sat, 31 Dec 2016 00:28:01 +0000 (16:28 -0800)] 
Spelling fix in "trad_enc_decypt_byte" code

Sponsored by: Tarsnap Backup Inc.

8 years agoSpelling fixes
Graham Percival [Fri, 30 Dec 2016 23:21:09 +0000 (15:21 -0800)] 
Spelling fixes

Sponsored by: Tarsnap Backup Inc.

8 years agoUse __LA_DEPRECATED for functions deprecated in 379867e
Martin Matuska [Fri, 30 Dec 2016 22:44:27 +0000 (23:44 +0100)] 
Use __LA_DEPRECATED for functions deprecated in 379867e

Reported-By: Jamie Kenyon

8 years agoMerge pull request #851 from Tarsnap/spelling-upload
Martin Matuska [Fri, 30 Dec 2016 01:10:05 +0000 (02:10 +0100)] 
Merge pull request #851 from Tarsnap/spelling-upload

Spelling fixes

8 years agoMerge pull request #843 from yaneurabeya/cpio-coverity-fixes
Martin Matuska [Fri, 30 Dec 2016 00:30:13 +0000 (01:30 +0100)] 
Merge pull request #843 from yaneurabeya/cpio-coverity-fixes
Fix memory leak of struct archive_entry in cpio/cpio.c

8 years agoFix prototypes to match headers. From Thomas Klausner.
Joerg Sonnenberger [Thu, 29 Dec 2016 23:55:09 +0000 (00:55 +0100)] 
Fix prototypes to match headers. From Thomas Klausner.

8 years agoFix style typo in tar.5
Martin Matuska [Thu, 29 Dec 2016 01:04:04 +0000 (02:04 +0100)] 
Fix style typo in tar.5

8 years agoSpelling fixes 851/head
Graham Percival [Wed, 28 Dec 2016 04:32:44 +0000 (20:32 -0800)] 
Spelling fixes

Sponsored by: Tarsnap Backup Inc.

8 years agoExtend NFSv4 ACL support in libarchive
Martin Matuska [Tue, 27 Dec 2016 22:21:39 +0000 (23:21 +0100)] 
Extend NFSv4 ACL support in libarchive
Break up, simplify and improve OS-independent ACL code
Add star-compatible NFSv4 ACL read/write support to pax (SCHILY.acl.ace)
Remap ARCHIVE_ACL_ENTRY_STYLE_* flags

New functions:
  archive_entry_acl_from_text()
  archive_entry_acl_from_text_w()
  archive_entry_acl_to_text()
  archive_entry_acl_to_text_w()

Deprecated functions:
  archive_entry_acl_text()
  archive_entry_acl_text_w()

Closes #771