Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2017 11:12:31 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r315633 - in vendor/libarchive/dist: . build/cmake cat/test cpio cpio/test libarchive libarchive/test tar tar/test test_utils
Message-ID:  <201703201112.v2KBCVec078526@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Mon Mar 20 11:12:31 2017
New Revision: 315633
URL: https://svnweb.freebsd.org/changeset/base/315633

Log:
  Update vendor/libarchive to git 5881c9021a85668bd945593f5ba43a0d22c53d71
  
  Vendor changes (FreeBSD-related):
    Break ACL read/write code into platform-specific source files
  
  Vendor bugfixes (FreeBSD-related):
    PR 867 (bsdcpio): show numeric uid/gid when names are not found
    PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers
    PR 880 (pax): Fix handling of "size" pax header keyword
    PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream
    OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser
    Unbreak static dependency on libbz2

Added:
  vendor/libarchive/dist/libarchive/archive_acl_maps.h   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_acl_maps_darwin.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_acl_maps_freebsd.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_acl_maps_linux.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_acl_maps_sunos.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_platform_acl.h   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_read_disk_acl_darwin.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_read_disk_acl_freebsd.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_read_disk_acl_linux.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_read_disk_acl_sunos.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_version_details.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_write_disk_acl_darwin.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_write_disk_acl_freebsd.c
     - copied, changed from r315632, vendor/libarchive/dist/libarchive/archive_write_disk_acl.c
  vendor/libarchive/dist/libarchive/archive_write_disk_acl_linux.c   (contents, props changed)
  vendor/libarchive/dist/libarchive/archive_write_disk_acl_sunos.c   (contents, props changed)
Deleted:
  vendor/libarchive/dist/libarchive/archive_write_disk_acl.c
Modified:
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/Makefile.am
  vendor/libarchive/dist/NEWS
  vendor/libarchive/dist/build/cmake/config.h.in
  vendor/libarchive/dist/cat/test/CMakeLists.txt
  vendor/libarchive/dist/configure.ac
  vendor/libarchive/dist/cpio/cpio.c
  vendor/libarchive/dist/cpio/test/CMakeLists.txt
  vendor/libarchive/dist/libarchive/CMakeLists.txt
  vendor/libarchive/dist/libarchive/archive_entry.3
  vendor/libarchive/dist/libarchive/archive_entry_acl.3
  vendor/libarchive/dist/libarchive/archive_platform.h
  vendor/libarchive/dist/libarchive/archive_random.c
  vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c
  vendor/libarchive/dist/libarchive/archive_read_disk_private.h
  vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
  vendor/libarchive/dist/libarchive/archive_util.c
  vendor/libarchive/dist/libarchive/archive_write_disk_posix.c
  vendor/libarchive/dist/libarchive/archive_write_disk_private.h
  vendor/libarchive/dist/libarchive/mtree.5
  vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c
  vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c
  vendor/libarchive/dist/tar/bsdtar.1
  vendor/libarchive/dist/tar/test/CMakeLists.txt
  vendor/libarchive/dist/tar/test/test_option_acls.c
  vendor/libarchive/dist/test_utils/test_common.h
  vendor/libarchive/dist/test_utils/test_main.c

Modified: vendor/libarchive/dist/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/CMakeLists.txt	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/CMakeLists.txt	Mon Mar 20 11:12:31 2017	(r315633)
@@ -602,6 +602,7 @@ LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE
 LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H)
 LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
 LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H)
+LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H)
 LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H)
 LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
 LA_CHECK_INCLUDE_FILE("sys/statfs.h" HAVE_SYS_STATFS_H)
@@ -619,6 +620,9 @@ LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WC
 LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H)
 IF(ENABLE_CNG)
   LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H)
+  IF(HAVE_BCRYPT_H)
+    LIST(APPEND ADDITIONAL_LIBS "Bcrypt")
+  ENDIF(HAVE_BCRYPT_H)
 ELSE(ENABLE_CNG)
   UNSET(HAVE_BCRYPT_H CACHE)
 ENDIF(ENABLE_CNG)
@@ -1593,83 +1597,212 @@ ENDIF(ENABLE_XATTR)
 # which makes the following checks rather more complex than I would like.
 #
 IF(ENABLE_ACL)
+  # Solaris and derivates ACLs
+  CHECK_FUNCTION_EXISTS(acl HAVE_ACL)
+  CHECK_FUNCTION_EXISTS(facl HAVE_FACL)
+
+  # Libacl
   CHECK_LIBRARY_EXISTS(acl "acl_get_file" "" HAVE_LIBACL)
   IF(HAVE_LIBACL)
     SET(CMAKE_REQUIRED_LIBRARIES "acl")
     FIND_LIBRARY(ACL_LIBRARY NAMES acl)
     LIST(APPEND ADDITIONAL_LIBS ${ACL_LIBRARY})
   ENDIF(HAVE_LIBACL)
-  #
-  CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY)
-  CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT)
-  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD)
-  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd_np HAVE_ACL_SET_FD_NP)
-  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE)
-  CHECK_TYPE_EXISTS(acl_permset_t "${INCLUDES}"    HAVE_ACL_PERMSET_T)
-
-  # The "acl_get_perm()" function was omitted from the POSIX draft.
-  # (It's a pretty obvious oversight; otherwise, there's no way to
-  # test for specific permissions in a permset.)  Linux uses the obvious
-  # name, FreeBSD adds _np to mark it as "non-Posix extension."
-  # Test for both as a double-check that we really have POSIX-style ACL support.
-  CHECK_FUNCTION_EXISTS(acl_get_fd_np HAVE_ACL_GET_FD_NP)
-  CHECK_FUNCTION_EXISTS(acl_get_perm HAVE_ACL_GET_PERM)
-  CHECK_FUNCTION_EXISTS(acl_get_perm_np HAVE_ACL_GET_PERM_NP)
-  CHECK_FUNCTION_EXISTS(acl_get_link HAVE_ACL_GET_LINK)
-  CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP)
-  CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP)
-  CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP)
-  CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "${INCLUDES}" HAVE_DECL_ACL_TYPE_NFS4)
-
-  # MacOS has an acl.h that isn't POSIX.  It can be detected by
-  # checking for ACL_USER
-  CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_DECL_ACL_USER)
-  CHECK_C_SOURCE_COMPILES("#include <sys/types.h>
+
+  CHECK_TYPE_EXISTS(acl_t "sys/types.h;sys/acl.h" HAVE_ACL_T)
+  CHECK_TYPE_EXISTS(acl_entry_t "sys/types.h;sys/acl.h" HAVE_ACL_ENTRY_T)
+  CHECK_TYPE_EXISTS(acl_permset_t "sys/types.h;sys/acl.h" HAVE_ACL_PERMSET_T)
+  CHECK_TYPE_EXISTS(acl_tag_t "sys/types.h;sys/acl.h" HAVE_ACL_TAG_T)
+
+  IF(HAVE_ACL AND HAVE_FACL)
+    CHECK_TYPE_EXISTS(aclent_t "sys/acl.h" HAVE_ACLENT_T)
+    IF(HAVE_ACLENT_T)
+      CHECK_SYMBOL_EXISTS(GETACL "sys/acl.h" HAVE_DECL_GETACL)
+      CHECK_SYMBOL_EXISTS(GETACLCNT "sys/acl.h" HAVE_DECL_GETACLCNT)
+      CHECK_SYMBOL_EXISTS(SETACL "sys/acl.h" HAVE_DECL_SETACL)
+      IF(HAVE_DECL_GETACL AND
+         HAVE_DECL_GETACLCNT AND
+         HAVE_DECL_SETACL)
+        SET(ARCHIVE_ACL_SUNOS TRUE)
+      ENDIF()
+      CHECK_TYPE_EXISTS(ace_t "sys/acl.h" HAVE_ACE_T)
+      IF(HAVE_ACE_T)
+        CHECK_SYMBOL_EXISTS(ACE_GETACL "sys/acl.h" HAVE_DECL_ACE_GETACL)
+        CHECK_SYMBOL_EXISTS(ACE_GETACLCNT "sys/acl.h" HAVE_DECL_ACE_GETACLCNT)
+        CHECK_SYMBOL_EXISTS(ACE_SETACL "sys/acl.h" HAVE_DECL_ACE_SETACL)
+        IF(HAVE_DECL_ACE_GETACL AND
+           HAVE_DECL_ACE_GETACLCNT AND
+           HAVE_DECL_ACE_SETACL)
+          SET(ARCHIVE_ACL_SUNOS_NFS4 TRUE)
+        ENDIF()
+      ENDIF(HAVE_ACE_T)
+    ENDIF(HAVE_ACLENT_T)
+  ENDIF(HAVE_ACL AND HAVE_FACL)
+
+  IF(HAVE_ACL_T AND HAVE_ACL_ENTRY_T AND HAVE_ACL_PERMSET_T AND HAVE_ACL_TAG_T)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_add_perm HAVE_ACL_ADD_PERM)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_clear_perms HAVE_ACL_CLEAR_PERMS)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_delete_def_file HAVE_ACL_DELETE_DEF_FILE)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_free HAVE_ACL_FREE)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_entry HAVE_ACL_GET_ENTRY)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_fd HAVE_ACL_GET_FD)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_file HAVE_ACL_GET_FILE)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_permset HAVE_ACL_GET_PERMSET)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_qualifier HAVE_ACL_GET_QUALIFIER)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_tag_type HAVE_ACL_GET_TAG_TYPE)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_set_qualifier HAVE_ACL_SET_QUALIFIER)
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_set_tag_type HAVE_ACL_SET_TAG_TYPE)
+    IF(HAVE_ACL_ADD_PERM AND
+       HAVE_ACL_CLEAR_PERMS AND
+       HAVE_ACL_CREATE_ENTRY AND
+       HAVE_ACL_DELETE_DEF_FILE AND
+       HAVE_ACL_FREE AND
+       HAVE_ACL_GET_ENTRY AND
+       HAVE_ACL_GET_FD AND
+       HAVE_ACL_GET_FILE AND
+       HAVE_ACL_GET_PERMSET AND
+       HAVE_ACL_GET_QUALIFIER AND
+       HAVE_ACL_GET_TAG_TYPE AND
+       HAVE_ACL_INIT AND
+       HAVE_ACL_SET_FD AND
+       HAVE_ACL_SET_FILE AND
+       HAVE_ACL_SET_QUALIFIER AND
+       HAVE_ACL_SET_TAG_TYPE)
+         SET(HAVE_POSIX_ACL_FUNCS 1)
+    ENDIF()
+
+    CHECK_FUNCTION_EXISTS_GLIBC(acl_get_perm HAVE_ACL_GET_PERM)
+
+    IF(HAVE_POSIX_ACL_FUNCS AND HAVE_ACL_LIBACL_H AND HAVE_LIBACL AND
+       HAVE_ACL_GET_PERM)
+      SET(ARCHIVE_ACL_LIBACL TRUE)
+    ELSE()
+      CHECK_FUNCTION_EXISTS(acl_add_flag_np HAVE_ACL_ADD_FLAG_NP)
+      CHECK_FUNCTION_EXISTS(acl_clear_flags_np HAVE_ACL_CLEAR_FLAGS_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_brand_np HAVE_ACL_GET_BRAND_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_entry_type_np HAVE_ACL_GET_ENTRY_TYPE_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_flag_np HAVE_ACL_GET_FLAG_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_flagset_np HAVE_ACL_GET_FLAGSET_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_fd_np HAVE_ACL_GET_FD_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP)
+      CHECK_FUNCTION_EXISTS(acl_get_perm_np HAVE_ACL_GET_PERM_NP)
+      CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP)
+      CHECK_FUNCTION_EXISTS(acl_set_entry_type_np HAVE_ACL_SET_ENTRY_TYPE_NP)
+      CHECK_FUNCTION_EXISTS(acl_set_fd_np HAVE_ACL_SET_FD_NP)
+      CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP)
+      CHECK_FUNCTION_EXISTS(mbr_gid_to_uuid HAVE_MBR_GID_TO_UUID)
+      CHECK_FUNCTION_EXISTS(mbr_uid_to_uuid HAVE_MBR_UID_TO_UUID)
+      CHECK_FUNCTION_EXISTS(mbr_uuid_to_id HAVE_MBR_UUID_TO_ID)
+
+      CHECK_C_SOURCE_COMPILES("#include <sys/types.h>
 #include <sys/acl.h>
 int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_DECL_ACL_TYPE_EXTENDED)
-  CHECK_C_SOURCE_COMPILES("#include <sys/types.h>
+      CHECK_C_SOURCE_COMPILES("#include <sys/types.h>
 #include <sys/acl.h>
 int main(void) { return ACL_SYNCHRONIZE; }" HAVE_DECL_ACL_SYNCHRONIZE)
+      CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "sys/acl.h" HAVE_DECL_ACL_TYPE_NFS4)
+      CHECK_SYMBOL_EXISTS(ACL_USER "sys/acl.h" HAVE_DECL_ACL_USER)
+
+      IF(HAVE_POSIX_ACL_FUNCS AND
+         HAVE_ACL_GET_FD_NP AND
+         HAVE_ACL_GET_PERM_NP AND
+         NOT HAVE_ACL_GET_PERM AND
+         HAVE_ACL_SET_FD_NP)
+        IF(HAVE_DECL_ACL_USER)
+          SET(ARCHIVE_ACL_FREEBSD TRUE)
+          IF(HAVE_DECL_ACL_TYPE_NFS4 AND
+             HAVE_ACL_ADD_FLAG_NP AND
+             HAVE_ACL_CLEAR_FLAGS_NP AND
+             HAVE_ACL_GET_BRAND_NP AND
+             HAVE_ACL_GET_ENTRY_TYPE_NP AND
+             HAVE_ACL_GET_FLAGSET_NP AND
+             HAVE_ACL_SET_ENTRY_TYPE_NP)
+            SET(ARCHIVE_ACL_FREEBSD_NFS4 TRUE)
+          ENDIF()
+        ELSEIF(HAVE_DECL_ACL_TYPE_EXTENDED AND
+               HAVE_MEMBERSHIP_H AND
+               HAVE_ACL_ADD_FLAG_NP AND
+               HAVE_ACL_CLEAR_FLAGS_NP AND
+               HAVE_ACL_GET_FLAGSET_NP AND
+               HAVE_ACL_GET_LINK_NP AND
+               HAVE_ACL_SET_LINK_NP AND
+               HAVE_MBR_UID_TO_UUID AND
+               HAVE_MBR_GID_TO_UUID AND
+               HAVE_MBR_UUID_TO_ID)
+          SET(ARCHIVE_ACL_DARWIN TRUE)
+        ENDIF()
+      ENDIF()
+    ENDIF()
+  ENDIF(HAVE_ACL_T AND HAVE_ACL_ENTRY_T AND HAVE_ACL_PERMSET_T AND
+        HAVE_ACL_TAG_T)
+
+  # Richacl
+  CHECK_LIBRARY_EXISTS(richacl "richacl_get_file" "" HAVE_LIBRICHACL)
+  IF(HAVE_LIBRICHACL)
+    SET(CMAKE_REQUIRED_LIBRARIES "richacl")
+    FIND_LIBRARY(RICHACL_LIBRARY NAMES richacl)
+    LIST(APPEND ADDITIONAL_LIBS ${RICHACL_LIBRARY})
+  ENDIF(HAVE_LIBRICHACL)
+
+  CHECK_STRUCT_HAS_MEMBER("struct richace" e_type "sys/richacl.h"
+    HAVE_STRUCT_RICHACE)
+  CHECK_STRUCT_HAS_MEMBER("struct richacl" a_flags "sys/richacl.h"
+    HAVE_STRUCT_RICHACL)
+
+  IF(HAVE_LIBRICHACL AND HAVE_STRUCT_RICHACL AND HAVE_STRUCT_RICHACE)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_alloc HAVE_RICHACL_ALLOC)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_equiv_mode HAVE_RICHACL_EQUIV_MODE)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_free HAVE_RICHACL_FREE)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_get_fd HAVE_RICHACL_GET_FD)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_get_file HAVE_RICHACL_GET_FILE)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_set_fd HAVE_RICHACL_SET_FD)
+    CHECK_FUNCTION_EXISTS_GLIBC(richacl_set_file HAVE_RICHACL_SET_FILE)
+    IF(HAVE_RICHACL_ALLOC AND
+       HAVE_RICHACL_EQUIV_MODE AND
+       HAVE_RICHACL_FREE AND
+       HAVE_RICHACL_GET_FD AND
+       HAVE_RICHACL_GET_FILE AND
+       HAVE_RICHACL_SET_FD AND
+       HAVE_RICHACL_SET_FILE)
+      SET(ARCHIVE_ACL_LIBRICHACL TRUE)
+    ENDIF()
+  ENDIF(HAVE_LIBRICHACL AND HAVE_STRUCT_RICHACL AND HAVE_STRUCT_RICHACE)
+
+  IF(ARCHIVE_ACL_DARWIN)
+    MESSAGE(STATUS "ACL support: Darwin (limited NFSv4)")
+  ELSEIF(ARCHIVE_ACL_FREEBSD_NFS4)
+    MESSAGE(STATUS "ACL support: FreeBSD (POSIX.1e and NFSv4)")
+  ELSEIF(ARCHIVE_ACL_FREEBSD)
+    MESSAGE(STATUS "ACL support: FreeBSD (POSIX.1e)")
+  ELSEIF(ARCHIVE_ACL_LIBACL OR ARCHIVE_ACL_LIBRICHACL)
+    IF(ARCHIVE_ACL_LIBACL AND ARCHIVE_ACL_LIBRICHACL)
+      MESSAGE(STATUS "ACL support: libacl (POSIX.1e) + librichacl (NFSv4)")
+    ELSEIF(ARCHIVE_ACL_LIBRICHACL)
+      MESSAGE(STATUS "ACL support: librichacl (NFSv4)")
+    ELSE()
+      MESSAGE(STATUS "ACL support: libacl (POSIX.1e)")
+    ENDIF()
+  ELSEIF(ARCHIVE_ACL_SUNOS_NFS4)
+    MESSAGE(STATUS "ACL support: Solaris (POSIX.1e and NFSv4)")
+  ELSEIF(ARCHIVE_ACL_SUNOS)
+    MESSAGE(STATUS "ACL support: Solaris (POSIX.1e)")
+  ELSE()
+    MESSAGE(STATUS "ACL support: none")
+  ENDIF()
 
-  # Solaris and derivates ACLs
-  CHECK_TYPE_EXISTS(aclent_t "${INCLUDES}" HAVE_ACLENT_T)
-  CHECK_TYPE_EXISTS(ace_t "${INCLUDES}" HAVE_ACE_T)
-  CHECK_FUNCTION_EXISTS(acl HAVE_ACL)
-  CHECK_FUNCTION_EXISTS(facl HAVE_FACL)
-  CHECK_SYMBOL_EXISTS(GETACL "${INCLUDES}" HAVE_DECL_GETACL)
-  CHECK_SYMBOL_EXISTS(GETACLCNT "${INCLUDES}" HAVE_DECL_GETACLCNT)
-  CHECK_SYMBOL_EXISTS(SETACL "${INCLUDES}" HAVE_DECL_SETACL)
-  CHECK_SYMBOL_EXISTS(ACE_GETACL "${INCLUDES}" HAVE_DECL_ACE_GETACL)
-  CHECK_SYMBOL_EXISTS(ACE_GETACLCNT "${INCLUDES}" HAVE_DECL_ACE_GETACLCNT)
-  CHECK_SYMBOL_EXISTS(ACE_SETACL "${INCLUDES}" HAVE_DECL_ACE_SETACL)
 ELSE(ENABLE_ACL)
   # If someone runs cmake, then disables ACL support, we need
   # to forcibly override the cached values for these.
-  SET(HAVE_ACL_CREATE_ENTRY FALSE)
-  SET(HAVE_ACL_GET_LINK FALSE)
-  SET(HAVE_ACL_GET_LINK_NP FALSE)
-  SET(HAVE_ACL_GET_PERM FALSE)
-  SET(HAVE_ACL_GET_PERM_NP FALSE)
-  SET(HAVE_ACL_INIT FALSE)
-  SET(HAVE_ACL_LIB FALSE)
-  SET(HAVE_ACL_PERMSET_T FALSE)
-  SET(HAVE_ACL_SET_FD FALSE)
-  SET(HAVE_ACL_SET_FD_NP FALSE)
-  SET(HAVE_ACL_SET_FILE FALSE)
-  SET(HAVE_ACL_TYPE_EXTENDED FALSE)
-  SET(HAVE_ACLENT_T FALSE)
-  SET(HAVE_ACE_T FALSE)
-  SET(HAVE_DECL_ACL_TYPE_NFS4 FALSE)
-  SET(HAVE_DECL_ACL_USER FALSE)
-  SET(HAVE_DECL_ACL_SYNCHRONIZE FALSE)
-  SET(HAVE_DECL_GETACL FALSE)
-  SET(HAVE_DECL_GETACLCNT FALSE)
-  SET(HAVE_DECL_SETACL FALSE)
-  SET(HAVE_DECL_ACE_GETACL FALSE)
-  SET(HAVE_DECL_ACE_GETACLCNT FALSE)
-  SET(HAVE_DECL_ACE_SETACL FALSE)
-  SET(HAVE_ACL FALSE)
-  SET(HAVE_FACL FALSE)
+  SET(ARCHIVE_ACL_DARWIN FALSE)
+  SET(ARCHIVE_ACL_FREEBSD FALSE)
+  SET(ARCHIVE_ACL_FREEBSD_NFS4 FALSE)
+  SET(ARCHIVE_ACL_LIBACL FALSE)
+  SET(ARCHIVE_ACL_SUNOS FALSE)
+  SET(ARCHIVE_ACL_SUNOS_NFS4 FALSE)
 ENDIF(ENABLE_ACL)
 
 #

Modified: vendor/libarchive/dist/Makefile.am
==============================================================================
--- vendor/libarchive/dist/Makefile.am	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/Makefile.am	Mon Mar 20 11:12:31 2017	(r315633)
@@ -127,6 +127,7 @@ libarchive_la_SOURCES= \
 	libarchive/archive_pathmatch.c \
 	libarchive/archive_pathmatch.h \
 	libarchive/archive_platform.h \
+	libarchive/archive_platform_acl.h \
 	libarchive/archive_ppmd_private.h \
 	libarchive/archive_ppmd7.c \
 	libarchive/archive_ppmd7_private.h \
@@ -186,9 +187,9 @@ libarchive_la_SOURCES= \
 	libarchive/archive_string_composition.h \
 	libarchive/archive_string_sprintf.c \
 	libarchive/archive_util.c \
+	libarchive/archive_version_details.c \
 	libarchive/archive_virtual.c \
 	libarchive/archive_write.c \
-	libarchive/archive_write_disk_acl.c \
 	libarchive/archive_write_disk_posix.c \
 	libarchive/archive_write_disk_private.h \
 	libarchive/archive_write_disk_set_standard_lookup.c \
@@ -247,6 +248,38 @@ libarchive_la_SOURCES+= \
 	libarchive/filter_fork_windows.c
 endif
 
+if INC_LINUX_ACL
+libarchive_la_SOURCES+= \
+	libarchive/archive_acl_maps.h \
+	libarchive/archive_acl_maps_linux.c \
+	libarchive/archive_read_disk_acl_linux.c \
+	libarchive/archive_write_disk_acl_linux.c
+else
+if INC_SUNOS_ACL
+libarchive_la_SOURCES+= \
+	libarchive/archive_acl_maps.h \
+	libarchive/archive_acl_maps_sunos.c \
+	libarchive/archive_read_disk_acl_sunos.c \
+	libarchive/archive_write_disk_acl_sunos.c
+else
+if INC_DARWIN_ACL
+libarchive_la_SOURCES+= \
+	libarchive/archive_acl_maps.h \
+	libarchive/archive_acl_maps_darwin.c \
+	libarchive/archive_read_disk_acl_darwin.c \
+	libarchive/archive_write_disk_acl_darwin.c
+else
+if INC_FREEBSD_ACL
+libarchive_la_SOURCES+= \
+	libarchive/archive_acl_maps.h \
+	libarchive/archive_acl_maps_freebsd.c \
+	libarchive/archive_read_disk_acl_freebsd.c \
+	libarchive/archive_write_disk_acl_freebsd.c
+endif
+endif
+endif
+endif
+
 # -no-undefined marks that libarchive doesn't rely on symbols
 # defined in the application.  This is mandatory for cygwin.
 libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)

Modified: vendor/libarchive/dist/NEWS
==============================================================================
--- vendor/libarchive/dist/NEWS	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/NEWS	Mon Mar 20 11:12:31 2017	(r315633)
@@ -1,3 +1,5 @@
+Mar 16, 2017: NFSv4 ACL support for Linux (librichacl)
+
 Feb 26, 2017: libarchive 3.3.1 released
     Security & Feature release
 
@@ -293,7 +295,7 @@ May 04, 2008: libarchive 2.5.3b released
 	* libarchive: Mark which entry strings are set; be accurate about
 	  distinguishing empty strings ("") from unset ones (NULL)
 	* tar: Don't crash reading entries with empty filenames
-	* libarchive_test, bsdtar_test, bsdcpio_test:  Better detaults:
+	* libarchive_test, bsdtar_test, bsdcpio_test:  Better defaults:
 	  run all tests, delete temp dirs, summarize repeated failures
 	* -no-undefined to libtool for Cygwin
 	* libarchive_test: Skip large file tests on systems with 32-bit off_t

Modified: vendor/libarchive/dist/build/cmake/config.h.in
==============================================================================
--- vendor/libarchive/dist/build/cmake/config.h.in	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/build/cmake/config.h.in	Mon Mar 20 11:12:31 2017	(r315633)
@@ -179,6 +179,27 @@ typedef uint64_t uintmax_t;
 /* Define ZLIB_WINAPI if zlib was built on Visual Studio. */
 #cmakedefine ZLIB_WINAPI 1
 
+/* Darwin ACL support */
+#cmakedefine ARCHIVE_ACL_DARWIN 1
+
+/* FreeBSD ACL support */
+#cmakedefine ARCHIVE_ACL_FREEBSD 1
+
+/* FreeBSD NFSv4 ACL support */
+#cmakedefine ARCHIVE_ACL_FREEBSD_NFS4 1
+
+/* Linux POSIX.1e ACL support via libacl */
+#cmakedefine ARCHIVE_ACL_LIBACL 1
+
+/* Linux NFSv4 ACL support via librichacl */
+#cmakedefine ARCHIVE_ACL_LIBRICHACL 1
+
+/* Solaris ACL support */
+#cmakedefine ARCHIVE_ACL_SUNOS 1
+
+/* Solaris NFSv4 ACL support */
+#cmakedefine ARCHIVE_ACL_SUNOS_NFS4 1
+
 /* MD5 via ARCHIVE_CRYPTO_MD5_LIBC supported. */
 #cmakedefine ARCHIVE_CRYPTO_MD5_LIBC 1
 
@@ -1013,6 +1034,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <sys/poll.h> header file. */
 #cmakedefine HAVE_SYS_POLL_H 1
 
+/* Define to 1 if you have the <sys/richacl.h> header file. */
+#cmakedefine HAVE_SYS_RICHACL_H 1
+
 /* Define to 1 if you have the <sys/select.h> header file. */
 #cmakedefine HAVE_SYS_SELECT_H 1
 

Modified: vendor/libarchive/dist/cat/test/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/cat/test/CMakeLists.txt	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/cat/test/CMakeLists.txt	Mon Mar 20 11:12:31 2017	(r315633)
@@ -30,9 +30,14 @@ IF(ENABLE_CAT AND ENABLE_TEST)
   #
   ADD_EXECUTABLE(bsdcat_test ${bsdcat_test_SOURCES})
   IF(ENABLE_ACL)
+    SET(TEST_ACL_LIBS "")
     IF(HAVE_LIBACL)
-      TARGET_LINK_LIBRARIES(bsdcat_test ${ACL_LIBRARY})
+      LIST(APPEND TEST_ACL_LIBS ${ACL_LIBRARY})
     ENDIF(HAVE_LIBACL)
+    IF(HAVE_LIBRICHACL)
+      LIST(APPEND TEST_ACL_LIBS ${RICHACL_LIBRARY})
+    ENDIF(HAVE_LIBRICHACL)
+    TARGET_LINK_LIBRARIES(bsdcat_test ${TEST_ACL_LIBS})
   ENDIF(ENABLE_ACL)
   SET_PROPERTY(TARGET bsdcat_test PROPERTY COMPILE_DEFINITIONS LIST_H)
 

Modified: vendor/libarchive/dist/configure.ac
==============================================================================
--- vendor/libarchive/dist/configure.ac	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/configure.ac	Mon Mar 20 11:12:31 2017	(r315633)
@@ -253,6 +253,7 @@ esac
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([acl/libacl.h])
 AC_CHECK_HEADERS([copyfile.h ctype.h])
 AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h])
 
@@ -283,16 +284,16 @@ AS_VAR_IF([ac_cv_have_decl_FS_IOC_GETFLA
     [AC_DEFINE_UNQUOTED([HAVE_WORKING_FS_IOC_GETFLAGS], [1],
                     [Define to 1 if you have a working FS_IOC_GETFLAGS])])
 
-AC_CHECK_HEADERS([locale.h paths.h poll.h pthread.h pwd.h])
+AC_CHECK_HEADERS([locale.h membership.h paths.h poll.h pthread.h pwd.h])
 AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h])
 AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h])
-AC_CHECK_HEADERS([sys/cdefs.h sys/extattr.h])
+AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h])
 AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h])
-AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h])
+AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h])
+AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h])
 AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h])
 AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h])
 AC_CHECK_HEADERS([windows.h])
-AC_CHECK_HEADERS([Bcrypt.h])
 # check windows.h first; the other headers require it.
 AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[],
 [[#ifdef HAVE_WINDOWS_H
@@ -399,6 +400,9 @@ if test "x$with_lzo2" = "xyes"; then
   AC_CHECK_LIB(lzo2,lzo1x_decompress_safe)
 fi
 
+AC_ARG_WITH([cng],
+  AS_HELP_STRING([--without-cng], [Don't build support of CNG(Crypto Next Generation)]))
+
 AC_ARG_WITH([nettle],
   AS_HELP_STRING([--without-nettle], [Don't build with crypto support from Nettle]))
 AC_ARG_WITH([openssl],
@@ -697,66 +701,212 @@ AC_ARG_ENABLE([acl],
 		[Disable ACL support (default: check)]))
 
 if test "x$enable_acl" != "xno"; then
-   AC_CHECK_HEADERS([acl/libacl.h])
-   AC_CHECK_HEADERS([sys/acl.h])
-   AC_CHECK_HEADERS([membership.h])
-   AC_CHECK_LIB([acl],[acl_get_file])
-   AC_CHECK_FUNCS([acl_create_entry acl_get_fd_np])
-   AC_CHECK_FUNCS([acl_init acl_set_fd acl_set_fd_np acl_set_file])
+    # Libacl
+    AC_CHECK_LIB([acl], [acl_get_file])
 
-   AC_CHECK_TYPES(acl_permset_t,,,
-	[#if HAVE_SYS_TYPES_H
-	#include <sys/types.h>
-	#endif
-	#if HAVE_SYS_ACL_H
-	#include <sys/acl.h>
-	#endif
-	])
+    AC_CHECK_TYPES([acl_t, acl_entry_t, acl_permset_t, acl_tag_t], [], [], [
+      #if HAVE_SYS_TYPES_H
+      #include <sys/types.h>
+      #endif
+      #if HAVE_SYS_ACL_H
+      #include <sys/acl.h>
+      #endif
+    ])
+
+    AC_CHECK_LIB([richacl], [richacl_get_file])
+
+    AC_CHECK_TYPES([[struct richace], [struct richacl]], [], [], [
+      #if HAVE_SYS_RICHACL_H
+      #include <sys/richacl.h>
+      #endif
+    ])
 
-    # The "acl_get_perm()" function was omitted from the POSIX draft.
-    # (It's a pretty obvious oversight; otherwise, there's no way to
-    # test for specific permissions in a permset.)  Linux uses the obvious
-    # name, FreeBSD adds _np to mark it as "non-Posix extension."
-    # Test for both as a double-check that we really have POSIX-style ACL
-    # support.
-    AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np,,,
-	[#if HAVE_SYS_TYPES_H
-	#include <sys/types.h>
-	#endif
-	#if HAVE_SYS_ACL_H
-	#include <sys/acl.h>
-	#endif
-	])
+    # Solaris and derivates ACLs
+    AC_CHECK_FUNCS(acl facl)
 
-    # Check for acl_is_trivial_np on FreeBSD
-    AC_CHECK_FUNCS(acl_is_trivial_np,,,
-	[#if HAVE_SYS_TYPES_H
-	#include <sys/types.h>
-	#endif
-	#if HAVE_SYS_ACL_H
-	#include <sys/acl.h>
-	#endif
+    if test "x$ac_cv_lib_richacl_richacl_get_file" = "xyes" \
+	 -a "x$ac_cv_type_struct_richace" = "xyes" \
+	 -a "x$ac_cv_type_struct_richacl" = "xyes"; then
+	AC_CACHE_VAL([ac_cv_archive_acl_librichacl],
+	  [AC_CHECK_FUNCS(richacl_alloc \
+			  richacl_equiv_mode \
+			  richacl_free \
+			  richacl_get_fd \
+			  richacl_get_file \
+			  richacl_set_fd \
+			  richacl_set_file,
+	  [ac_cv_archive_acl_librichacl=yes], [ac_cv_archive_acl_librichacl=no],	  [#include <sys/richacl.h>])])
+    fi
+
+    if test "x$ac_cv_func_acl" = "xyes" \
+	 -a "x$ac_cv_func_facl" = "xyes"; then
+	AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]])
+	if test "x$ac_cv_type_aclent_t" = "xyes"; then
+	    AC_CACHE_VAL([ac_cv_archive_acl_sunos],
+	      [AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT],
+	      [ac_cv_archive_acl_sunos=yes], [ac_cv_archive_acl_sunos=no],
+	      [#include <sys/acl.h>])])
+	    AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]])
+	    if test "x$ac_cv_type_ace_t" = "xyes"; then
+		AC_CACHE_VAL([ac_cv_archive_acl_sunos_nfs4],
+		  [AC_CHECK_DECLS([ACE_GETACL, ACE_SETACL, ACE_GETACLCNT],
+		  [ac_cv_archive_acl_sunos_nfs4=yes],
+		  [ac_cv_archive_acl_sonos_nfs4=no],
+		  [#include <sys/acl.h>])])
+	    fi
+	fi
+    elif test "x$ac_cv_type_acl_t" = "xyes" \
+	 -a "x$ac_cv_type_acl_entry_t" = "xyes" \
+	 -a "x$ac_cv_type_acl_permset_t" = "xyes" \
+	 -a "x$ac_cv_type_acl_tag_t" = "xyes"; then
+	# POSIX.1e ACL functions
+	AC_CACHE_VAL([ac_cv_posix_acl_funcs],
+	  [AC_CHECK_FUNCS(acl_add_perm \
+			  acl_clear_perms \
+			  acl_create_entry \
+			  acl_delete_def_file \
+			  acl_free \
+			  acl_get_entry \
+			  acl_get_fd \
+			  acl_get_file \
+			  acl_get_permset \
+			  acl_get_qualifier \
+			  acl_get_tag_type \
+			  acl_init \
+			  acl_set_fd \
+			  acl_set_file \
+			  acl_set_qualifier \
+			  acl_set_tag_type,
+	  [ac_cv_posix_acl_funcs=yes], [ac_cv_posix_acl_funcs=no],
+	  [#if HAVE_SYS_TYPES_H
+	   #include <sys/types.h>
+	   #endif
+	   #if HAVE_SYS_ACL_H
+	   #include <sys/acl.h>
+	   #endif
+	  ])
 	])
 
-    # FreeBSD and POSIX
-    # MacOS has no ACL_USER in acl.h
-    AC_CHECK_DECLS([ACL_TYPE_NFS4, ACL_USER],
-		[], [],
-		[#include <sys/types.h>
-		#include <sys/acl.h>])
-
-    # FreeBSD and MacOS ACL support
-    AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_SYNCHRONIZE], [], [],
-		[#include <sys/types.h>
-		#include <sys/acl.h>])
+	AC_CHECK_FUNCS(acl_get_perm)
 
-    # Solaris and derivates ACLs
-    AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]])
-    AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]])
-    AC_CHECK_FUNCS(acl facl)
-    AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT, ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], [], [], [#include <sys/acl.h>])
+	if test "x$ac_cv_posix_acl_funcs" = "xyes" \
+	     -a "x$ac_cv_header_acl_libacl_h" = "xyes" \
+	     -a "x$ac_cv_lib_acl_acl_get_file" = "xyes" \
+	     -a "x$ac_cv_func_acl_get_perm"; then
+	    AC_CACHE_VAL([ac_cv_archive_acl_libacl],
+	      [ac_cv_archive_acl_libacl=yes])
+	    AC_DEFINE([ARCHIVE_ACL_LIBACL], [1],
+	      [POSIX.1e ACL support via libacl])
+	else
+	     # FreeBSD/Darwin
+	     AC_CHECK_FUNCS(acl_add_flag_np \
+			    acl_clear_flags_np \
+			    acl_get_brand_np \
+			    acl_get_entry_type_np \
+			    acl_get_flag_np \
+			    acl_get_flagset_np \
+			    acl_get_fd_np \
+			    acl_get_link_np \
+			    acl_get_perm_np \
+			    acl_is_trivial_np \
+			    acl_set_entry_type_np \
+			    acl_set_fd_np \
+			    acl_set_link_np,,,
+	      [#include <sys/types.h>
+	       #include <sys/acl.h>])
+
+	    AC_CHECK_FUNCS(mbr_uid_to_uuid \
+			   mbr_uuid_to_id \
+			   mbr_gid_to_uuid,,,
+	      [#include <membership.h>])
+
+	    AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_TYPE_NFS4, ACL_USER,
+	      ACL_SYNCHRONIZE], [], [],
+	      [#include <sys/types.h>
+	       #include <sys/acl.h>])
+	    if test "x$ac_cv_posix_acl_funcs" = "xyes" \
+	         -a "x$ac_cv_func_acl_get_fd_np" = "xyes" \
+                 -a "x$ac_cv_func_acl_get_perm" != "xyes" \
+	         -a "x$ac_cv_func_acl_get_perm_np" = "xyes" \
+	         -a "x$ac_cv_func_acl_set_fd_np" = "xyes"; then
+		if test "x$ac_cv_have_decl_ACL_USER" = "xyes"; then
+		    AC_CACHE_VAL([ac_cv_archive_acl_freebsd],
+		      [ac_cv_archive_acl_freebsd=yes])
+		    if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = "xyes" \
+		         -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \
+		         -a "x$ac_cv_func_acl_get_brand_np" = "xyes" \
+		         -a "x$ac_cv_func_acl_get_entry_type_np" = "xyes" \
+		         -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \
+		         -a "x$ac_cv_func_acl_set_entry_type_np" = "xyes"; then
+			AC_CACHE_VAL([ac_cv_archive_acl_freebsd_nfs4],
+			  [ac_cv_archive_acl_freebsd_nfs4=yes])
+		    fi
+	        elif test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = "xyes" \
+		       -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \
+		       -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \
+		       -a "x$ac_cv_func_acl_get_link_np" = "xyes" \
+		       -a "x$ac_cv_func_acl_set_link_np" = "xyes" \
+		       -a "x$ac_cv_func_mbr_uid_to_uuid" = "xyes" \
+		       -a "x$ac_cv_func_mbr_uuid_to_id" = "xyes" \
+		       -a "x$ac_cv_func_mbr_gid_to_uuid" = "xyes"; then
+		    AC_CACHE_VAL([ac_cv_archive_acl_darwin],
+		      [ac_cv_archive_acl_darwin=yes])
+	        fi
+	    fi
+	fi
+    fi
+    AC_MSG_CHECKING([for ACL support])
+    if test "x$ac_cv_archive_acl_libacl" = "xyes" \
+	 -a "x$ac_cv_archive_acl_librichacl" = "xyes"; then
+	AC_MSG_RESULT([libacl (POSIX.1e) + librichacl (NFSv4)])
+	AC_DEFINE([ARCHIVE_ACL_LIBACL], [1],
+	  [Linux POSIX.1e ACL support via libacl])
+	AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1],
+	  [Linux NFSv4 ACL support via librichacl])
+    elif test "x$ac_cv_archive_acl_libacl" = "xyes"; then
+	AC_MSG_RESULT([libacl (POSIX.1e)])
+	AC_DEFINE([ARCHIVE_ACL_LIBACL], [1],
+	  [Linux POSIX.1e ACL support via libacl])
+    elif test "x$ac_cv_archive_acl_librichacl" = "xyes"; then
+	AC_MSG_RESULT([librichacl (NFSv4)])
+	AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1],
+	  [Linux NFSv4 ACL support via librichacl])
+    elif test "x$ac_cv_archive_acl_darwin" = "xyes"; then
+	AC_DEFINE([ARCHIVE_ACL_DARWIN], [1], [Darwin ACL support])
+	AC_MSG_RESULT([Darwin (limited NFSv4)])
+    elif test "x$ac_cv_archive_acl_sunos" = "xyes"; then
+	AC_DEFINE([ARCHIVE_ACL_SUNOS], [1], [Solaris ACL support])
+	if test "x$ac_cv_archive_acl_sunos_nfs4" = "xyes"; then
+	    AC_DEFINE([ARCHIVE_ACL_SUNOS_NFS4], [1],
+	      [Solaris NFSv4 ACL support])
+	    AC_MSG_RESULT([Solaris (POSIX.1e and NFSv4)])
+	else
+	    AC_MSG_RESULT([Solaris (POSIX.1e)])
+	fi
+    elif test "x$ac_cv_archive_acl_freebsd" = "xyes"; then
+	AC_DEFINE([ARCHIVE_ACL_FREEBSD], [1], [FreeBSD ACL support])
+	if test "x$ac_cv_archive_acl_freebsd_nfs4" = "xyes"; then
+	    AC_DEFINE([ARCHIVE_ACL_FREEBSD_NFS4], [1],
+	      [FreeBSD NFSv4 ACL support])
+	    AC_MSG_RESULT([FreeBSD (POSIX.1e and NFSv4)])
+	else
+	    AC_MSG_RESULT([FreeBSD (POSIX.1e)])
+	fi
+    else
+	AC_MSG_RESULT([none])
+    fi
 fi
 
+
+AM_CONDITIONAL([INC_LINUX_ACL],
+  [test "x$ac_cv_archive_acl_libacl" = "xyes" \
+     -o "x$ac_cv_archive_acl_librichacl" = "xyes"])
+AM_CONDITIONAL([INC_SUNOS_ACL], [test "x$ac_cv_archive_acl_sunos" = "xyes"])
+AM_CONDITIONAL([INC_DARWIN_ACL],
+	  [test "x$ac_cv_archive_acl_darwin" = "xyes"])
+AM_CONDITIONAL([INC_FREEBSD_ACL],
+	  [test "x$ac_cv_archive_acl_freebsd" = "xyes"])
+
 # Additional requirements
 AC_SYS_LARGEFILE
 
@@ -845,6 +995,16 @@ case "$host_os" in
 	;;
 esac
 
+if test "x$with_cng" != "xno"; then
+    AC_CHECK_HEADERS([bcrypt.h],[
+        LIBS="$LIBS -lbcrypt"
+    ],[],
+    [[#ifdef HAVE_WINDOWS_H
+    # include <windows.h>
+    #endif
+    ]])
+fi
+
 if test "x$with_nettle" != "xno"; then
     AC_CHECK_HEADERS([nettle/md5.h nettle/ripemd160.h nettle/sha.h])
     AC_CHECK_HEADERS([nettle/pbkdf2.h nettle/aes.h nettle/hmac.h])

Modified: vendor/libarchive/dist/cpio/cpio.c
==============================================================================
--- vendor/libarchive/dist/cpio/cpio.c	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/cpio/cpio.c	Mon Mar 20 11:12:31 2017	(r315633)
@@ -1344,23 +1344,23 @@ lookup_name(struct cpio *cpio, struct na
 		cache->cache[slot].name = NULL;
 	}
 
-	if (lookup_fn(cpio, &name, id) == 0) {
-		if (name == NULL || name[0] == '\0') {
-			/* If lookup failed, format it as a number. */
-			snprintf(asnum, sizeof(asnum), "%u", (unsigned)id);
-			name = asnum;
-		}
-		cache->cache[slot].name = strdup(name);
-		if (cache->cache[slot].name != NULL) {
-			cache->cache[slot].id = id;
-			return (cache->cache[slot].name);
-		}
-		/*
-		 * Conveniently, NULL marks an empty slot, so
-		 * if the strdup() fails, we've just failed to
-		 * cache it.  No recovery necessary.
-		 */
-	}
+	if (lookup_fn(cpio, &name, id)) {
+		/* If lookup failed, format it as a number. */
+		snprintf(asnum, sizeof(asnum), "%u", (unsigned)id);
+		name = asnum;
+	}
+
+	cache->cache[slot].name = strdup(name);
+	if (cache->cache[slot].name != NULL) {
+		cache->cache[slot].id = id;
+		return (cache->cache[slot].name);
+	}
+
+	/*
+	 * Conveniently, NULL marks an empty slot, so
+	 * if the strdup() fails, we've just failed to
+	 * cache it.  No recovery necessary.
+	 */
 	return (NULL);
 }
 
@@ -1381,15 +1381,14 @@ lookup_uname_helper(struct cpio *cpio, c
 	errno = 0;
 	pwent = getpwuid((uid_t)id);
 	if (pwent == NULL) {
-		*name = NULL;
-		if (errno != 0 && errno != ENOENT)
+		if (errno && errno != ENOENT)
 			lafe_warnc(errno, "getpwuid(%s) failed",
 			    cpio_i64toa((int64_t)id));
-		return (errno);
+		return 1;
 	}
 
 	*name = pwent->pw_name;
-	return (0);
+	return 0;
 }
 
 static const char *
@@ -1409,15 +1408,14 @@ lookup_gname_helper(struct cpio *cpio, c
 	errno = 0;
 	grent = getgrgid((gid_t)id);
 	if (grent == NULL) {
-		*name = NULL;
-		if (errno != 0)
+		if (errno && errno != ENOENT)
 			lafe_warnc(errno, "getgrgid(%s) failed",
 			    cpio_i64toa((int64_t)id));
-		return (errno);
+		return 1;
 	}
 
 	*name = grent->gr_name;
-	return (0);
+	return 0;
 }
 
 /*

Modified: vendor/libarchive/dist/cpio/test/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/cpio/test/CMakeLists.txt	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/cpio/test/CMakeLists.txt	Mon Mar 20 11:12:31 2017	(r315633)
@@ -63,9 +63,14 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
   #
   ADD_EXECUTABLE(bsdcpio_test ${bsdcpio_test_SOURCES})
   IF(ENABLE_ACL)
+    SET(TEST_ACL_LIBS "")
     IF(HAVE_LIBACL)
-      TARGET_LINK_LIBRARIES(bsdcpio_test ${ACL_LIBRARY})
+      LIST(APPEND TEST_ACL_LIBS ${ACL_LIBRARY})
     ENDIF(HAVE_LIBACL)
+    IF(HAVE_LIBRICHACL)
+      LIST(APPEND TEST_ACL_LIBS ${RICHACL_LIBRARY})
+    ENDIF(HAVE_LIBRICHACL)
+    TARGET_LINK_LIBRARIES(bsdcpio_test ${TEST_ACL_LIBS})
   ENDIF(ENABLE_ACL)
   SET_PROPERTY(TARGET bsdcpio_test PROPERTY COMPILE_DEFINITIONS LIST_H)
 

Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/libarchive/CMakeLists.txt	Mon Mar 20 10:48:10 2017	(r315632)
+++ vendor/libarchive/dist/libarchive/CMakeLists.txt	Mon Mar 20 11:12:31 2017	(r315633)
@@ -14,6 +14,7 @@ SET(include_HEADERS
 # Sources and private headers
 SET(libarchive_SOURCES
   archive_acl.c
+  archive_acl_private.h
   archive_check_magic.c
   archive_cmdline.c
   archive_cmdline_private.h
@@ -47,6 +48,7 @@ SET(libarchive_SOURCES
   archive_pathmatch.c
   archive_pathmatch.h
   archive_platform.h
+  archive_platform_acl.h
   archive_ppmd_private.h
   archive_ppmd7.c
   archive_ppmd7_private.h
@@ -106,9 +108,9 @@ SET(libarchive_SOURCES
   archive_string_composition.h
   archive_string_sprintf.c
   archive_util.c
+  archive_version_details.c
   archive_virtual.c
   archive_write.c
-  archive_write_disk_acl.c
   archive_write_disk_posix.c
   archive_write_disk_private.h
   archive_write_disk_set_standard_lookup.c
@@ -210,6 +212,28 @@ IF(WIN32 AND NOT CYGWIN)
   LIST(APPEND libarchive_SOURCES filter_fork_windows.c)
 ENDIF(WIN32 AND NOT CYGWIN)
 
+IF(ARCHIVE_ACL_DARWIN)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps.h)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps_darwin.c)
+  LIST(APPEND libarchive_SOURCES archive_read_disk_acl_darwin.c)
+  LIST(APPEND libarchive_SOURCES archive_write_disk_acl_darwin.c)
+ELSEIF(ARCHIVE_ACL_FREEBSD)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps.h)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps_freebsd.c)
+  LIST(APPEND libarchive_SOURCES archive_read_disk_acl_freebsd.c)
+  LIST(APPEND libarchive_SOURCES archive_write_disk_acl_freebsd.c)
+ELSEIF(ARCHIVE_ACL_LIBACL)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps.h)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps_linux.c)
+  LIST(APPEND libarchive_SOURCES archive_read_disk_acl_linux.c)
+  LIST(APPEND libarchive_SOURCES archive_write_disk_acl_linux.c)
+ELSEIF(ARCHIVE_ACL_SUNOS)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps.h)
+  LIST(APPEND libarchive_SOURCES archive_acl_maps_sunos.c)
+  LIST(APPEND libarchive_SOURCES archive_read_disk_acl_sunos.c)
+  LIST(APPEND libarchive_SOURCES archive_write_disk_acl_sunos.c)
+ENDIF()
+
 # Libarchive is a shared library
 ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS})
 TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS})

Added: vendor/libarchive/dist/libarchive/archive_acl_maps.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libarchive/dist/libarchive/archive_acl_maps.h	Mon Mar 20 11:12:31 2017	(r315633)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2017 Martin Matuska
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __LIBARCHIVE_BUILD
+#error This header is only to be used internally to libarchive.
+#endif
+
+#ifndef ARCHIVE_ACL_MAPS_H_INCLUDED
+#define ARCHIVE_ACL_MAPS_H_INCLUDED
+
+#include "archive_platform_acl.h"
+
+typedef struct {
+	const int a_perm;	/* Libarchive permission or flag */
+	const int p_perm;	/* Platform permission or flag */
+} acl_perm_map_t;
+
+#ifndef _ARCHIVE_ACL_MAPS_DEFS
+#if ARCHIVE_ACL_POSIX1E
+extern const acl_perm_map_t acl_posix_perm_map[];
+extern const int acl_posix_perm_map_size;
+#endif
+#if ARCHIVE_ACL_NFS4
+extern const acl_perm_map_t acl_nfs4_perm_map[];
+extern const int acl_nfs4_perm_map_size;
+extern const acl_perm_map_t acl_nfs4_flag_map[];
+extern const int acl_nfs4_flag_map_size;
+#endif
+#endif /* !_ARCHIVE_ACL_MAPS_DEFS */
+#endif /* ARCHIVE_ACL_MAPS_H_INCLUDED */

Added: vendor/libarchive/dist/libarchive/archive_acl_maps_darwin.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libarchive/dist/libarchive/archive_acl_maps_darwin.c	Mon Mar 20 11:12:31 2017	(r315633)
@@ -0,0 +1,76 @@
+/*-
+ * Copyright (c) 2017 Martin Matuska
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_ACL_H

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703201112.v2KBCVec078526>