svn commit: r311940 - in projects/clang400-import: . contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/netbsd-tests/lib/libc contrib/netbsd-tests/lib/libc/c063 contrib/netbsd...
Dimitry Andric
dim at FreeBSD.org
Wed Jan 11 21:05:18 UTC 2017
Author: dim
Date: Wed Jan 11 21:05:13 2017
New Revision: 311940
URL: https://svnweb.freebsd.org/changeset/base/311940
Log:
Merge ^/head r311812 through r311939.
Added:
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c
- copied unchanged from r311939, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu
- copied unchanged from r311939, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu
projects/clang400-import/sys/dev/e1000/em_txrx.c
- copied unchanged from r311939, head/sys/dev/e1000/em_txrx.c
projects/clang400-import/sys/dev/e1000/igb_txrx.c
- copied unchanged from r311939, head/sys/dev/e1000/igb_txrx.c
projects/clang400-import/sys/dev/sdhci/sdhci_acpi.c
- copied unchanged from r311939, head/sys/dev/sdhci/sdhci_acpi.c
projects/clang400-import/sys/modules/sdhci_acpi/
- copied from r311939, head/sys/modules/sdhci_acpi/
projects/clang400-import/tests/sys/geom/class/gate/ggate_test.sh
- copied unchanged from r311939, head/tests/sys/geom/class/gate/ggate_test.sh
projects/clang400-import/usr.bin/tail/tests/
- copied from r311939, head/usr.bin/tail/tests/
Deleted:
projects/clang400-import/sys/dev/e1000/if_igb.c
projects/clang400-import/sys/dev/e1000/if_igb.h
projects/clang400-import/sys/dev/e1000/if_lem.c
projects/clang400-import/sys/dev/e1000/if_lem.h
projects/clang400-import/sys/modules/igb/
projects/clang400-import/tests/sys/geom/class/gate/1_test.sh
projects/clang400-import/tests/sys/geom/class/gate/2_test.sh
projects/clang400-import/tests/sys/geom/class/gate/3_test.sh
projects/clang400-import/tests/sys/geom/class/gate/conf.sh
Modified:
projects/clang400-import/ObsoleteFiles.inc
projects/clang400-import/UPDATING
projects/clang400-import/contrib/libarchive/libarchive/archive_acl.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_posix.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_lha.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_warc.c
projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_zip.c
projects/clang400-import/contrib/libarchive/libarchive/archive_string.c
projects/clang400-import/contrib/libarchive/libarchive/archive_string.h
projects/clang400-import/contrib/libarchive/libarchive/archive_string_composition.h
projects/clang400-import/contrib/libarchive/libarchive/archive_write.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_add_filter_xz.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_disk_acl.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_7zip.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_pax.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c
projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_zip.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_compat_uudecode.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c
projects/clang400-import/contrib/libarchive/libarchive/test/test_sparse_basic.c
projects/clang400-import/contrib/libarchive/libarchive/xxhash.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_o_search.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_openat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_assert.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_dir.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_ftok.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_raise.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_time.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/gen/t_vis.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/regex/debug.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/stdio/t_printf.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/string/t_strchr.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/string/t_strerror.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_access.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_chroot.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/sys/t_wait.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/t_cdb.c
projects/clang400-import/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c
projects/clang400-import/crypto/openssh/serverloop.c
projects/clang400-import/crypto/openssh/ssh-agent.1
projects/clang400-import/crypto/openssh/ssh-agent.c
projects/clang400-import/crypto/openssh/ssh_config
projects/clang400-import/crypto/openssh/ssh_config.5
projects/clang400-import/crypto/openssh/sshd_config
projects/clang400-import/crypto/openssh/sshd_config.5
projects/clang400-import/crypto/openssh/version.h
projects/clang400-import/etc/mtree/BSD.tests.dist
projects/clang400-import/etc/rc.d/ntpdate
projects/clang400-import/lib/libarchive/tests/Makefile
projects/clang400-import/libexec/rtld-elf/rtld_lock.c
projects/clang400-import/sbin/camcontrol/modeedit.c
projects/clang400-import/share/misc/committers-ports.dot
projects/clang400-import/sys/amd64/amd64/pmap.c
projects/clang400-import/sys/amd64/conf/GENERIC
projects/clang400-import/sys/arm64/conf/GENERIC
projects/clang400-import/sys/boot/common/reloc_elf.c
projects/clang400-import/sys/boot/efi/Makefile.inc
projects/clang400-import/sys/boot/efi/boot1/boot_module.h
projects/clang400-import/sys/boot/efi/include/efiapi.h
projects/clang400-import/sys/boot/efi/loader/arch/arm/ldscript.arm
projects/clang400-import/sys/boot/efi/loader/arch/arm/start.S
projects/clang400-import/sys/cam/ctl/ctl.c
projects/clang400-import/sys/cam/ctl/ctl_ha.c
projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
projects/clang400-import/sys/conf/NOTES
projects/clang400-import/sys/conf/files
projects/clang400-import/sys/conf/files.arm64
projects/clang400-import/sys/conf/makeLINT.mk
projects/clang400-import/sys/contrib/dev/acpica/components/namespace/nsxfeval.c
projects/clang400-import/sys/contrib/dev/acpica/components/tables/tbxface.c
projects/clang400-import/sys/contrib/dev/acpica/include/acpixf.h
projects/clang400-import/sys/dev/ahci/ahci_generic.c
projects/clang400-import/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
projects/clang400-import/sys/dev/cxgbe/common/t4_msg.h
projects/clang400-import/sys/dev/cxgbe/iw_cxgbe/provider.c
projects/clang400-import/sys/dev/cxgbe/t4_main.c
projects/clang400-import/sys/dev/cxgbe/t4_sge.c
projects/clang400-import/sys/dev/e1000/if_em.c
projects/clang400-import/sys/dev/e1000/if_em.h
projects/clang400-import/sys/dev/ntb/if_ntb/if_ntb.c
projects/clang400-import/sys/dev/rtwn/pci/rtwn_pci_attach.c
projects/clang400-import/sys/dev/rtwn/usb/rtwn_usb_ep.c
projects/clang400-import/sys/dev/sfxge/sfxge_tx.c
projects/clang400-import/sys/dev/usb/controller/ehci_imx.c
projects/clang400-import/sys/dev/usb/misc/udbp.c
projects/clang400-import/sys/dev/usb/usbdevs
projects/clang400-import/sys/dev/usb/wlan/if_rsu.c
projects/clang400-import/sys/fs/cd9660/cd9660_vfsops.c
projects/clang400-import/sys/fs/cd9660/iso.h
projects/clang400-import/sys/fs/pseudofs/pseudofs_vncache.c
projects/clang400-import/sys/i386/conf/GENERIC
projects/clang400-import/sys/i386/i386/pmap.c
projects/clang400-import/sys/kern/vfs_bio.c
projects/clang400-import/sys/mips/conf/OCTEON1
projects/clang400-import/sys/modules/Makefile
projects/clang400-import/sys/modules/ahci/Makefile
projects/clang400-import/sys/modules/em/Makefile
projects/clang400-import/sys/net/iflib.c
projects/clang400-import/sys/net80211/_ieee80211.h
projects/clang400-import/sys/net80211/ieee80211.c
projects/clang400-import/sys/net80211/ieee80211.h
projects/clang400-import/sys/net80211/ieee80211_proto.c
projects/clang400-import/sys/net80211/ieee80211_tdma.c
projects/clang400-import/sys/net80211/ieee80211_vht.c
projects/clang400-import/sys/net80211/ieee80211_vht.h
projects/clang400-import/sys/netpfil/ipfw/ip_dummynet.c
projects/clang400-import/sys/powerpc/conf/GENERIC64
projects/clang400-import/sys/powerpc/include/asm.h
projects/clang400-import/sys/sparc64/include/atomic.h
projects/clang400-import/sys/sys/cdefs.h
projects/clang400-import/sys/tools/embed_mfs.sh
projects/clang400-import/tests/sys/geom/class/gate/Makefile
projects/clang400-import/usr.bin/calendar/calendars/calendar.freebsd
projects/clang400-import/usr.bin/tail/Makefile
projects/clang400-import/usr.bin/tail/reverse.c
projects/clang400-import/usr.sbin/crunch/crunchide/exec_elf32.c
projects/clang400-import/usr.sbin/syslogd/syslogd.c
Directory Properties:
projects/clang400-import/ (props changed)
projects/clang400-import/contrib/libarchive/ (props changed)
projects/clang400-import/contrib/netbsd-tests/ (props changed)
projects/clang400-import/crypto/openssh/ (props changed)
projects/clang400-import/sys/cddl/contrib/opensolaris/ (props changed)
projects/clang400-import/sys/contrib/dev/acpica/ (props changed)
Modified: projects/clang400-import/ObsoleteFiles.inc
==============================================================================
--- projects/clang400-import/ObsoleteFiles.inc Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/ObsoleteFiles.inc Wed Jan 11 21:05:13 2017 (r311940)
@@ -151,6 +151,11 @@ OLD_FILES+=usr/lib/clang/3.9.1/lib/freeb
OLD_DIRS+=usr/lib/clang/3.9.1/lib/freebsd
OLD_DIRS+=usr/lib/clang/3.9.1/lib
OLD_DIRS+=usr/lib/clang/3.9.1
+# 20170110: Four files from ggate tests consolidated into one
+OLD_FILES+=usr/tests/sys/geom/class/gate/1_test
+OLD_FILES+=usr/tests/sys/geom/class/gate/2_test
+OLD_FILES+=usr/tests/sys/geom/class/gate/3_test
+OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh
# 20170103: libbsnmptools.so made into an INTERNALLIB
OLD_FILES+=usr/lib/libbsnmptools.a
OLD_FILES+=usr/lib/libbsnmptools_p.a
@@ -161,8 +166,8 @@ OLD_FILES+=usr/share/man/man3/sysdecode_
# 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu
OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu
# 20161229: Three files from gnop tests consolidated into one
-OLD_FILES+=usr/tests/sys/geom/class/nop/1_test.sh
-OLD_FILES+=usr/tests/sys/geom/class/nop/2_test.sh
+OLD_FILES+=usr/tests/sys/geom/class/nop/1_test
+OLD_FILES+=usr/tests/sys/geom/class/nop/2_test
OLD_FILES+=usr/tests/sys/geom/class/nop/conf.sh
# 20161217: new clang import which bumps version from 3.9.0 to 3.9.1.
OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h
Modified: projects/clang400-import/UPDATING
==============================================================================
--- projects/clang400-import/UPDATING Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/UPDATING Wed Jan 11 21:05:13 2017 (r311940)
@@ -56,6 +56,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12
Please see the 20141231 entry below for information about prerequisites
and upgrading, if you are not already using clang 3.5.0 or higher.
+20170109:
+ The igb(4), em(4) and lem(4) ethernet drivers are now implemented via
+ IFLIB. If you have a custom kernel configuration that excludes em(4)
+ but you use igb(4), you need to re-add em(4) to your custom configuration.
+
20161217:
Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.1.
Please see the 20141231 entry below for information about prerequisites
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_acl.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_acl.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_acl.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -786,7 +786,8 @@ append_entry_w(wchar_t **wp, const wchar
} else if (tag == ARCHIVE_ENTRY_ACL_USER
|| tag == ARCHIVE_ENTRY_ACL_GROUP) {
append_id_w(wp, id);
- id = -1;
+ if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0)
+ id = -1;
}
/* Solaris style has no second colon after other and mask */
if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0)
@@ -1042,7 +1043,8 @@ append_entry(char **p, const char *prefi
} else if (tag == ARCHIVE_ENTRY_ACL_USER
|| tag == ARCHIVE_ENTRY_ACL_GROUP) {
append_id(p, id);
- id = -1;
+ if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0)
+ id = -1;
}
/* Solaris style has no second colon after other and mask */
if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0)
@@ -1328,6 +1330,7 @@ archive_acl_from_text_w(struct archive_a
tag == ARCHIVE_ENTRY_ACL_GROUP) {
n = 1;
name = field[1];
+ isint_w(name.start, name.end, &id);
} else
n = 0;
@@ -1799,6 +1802,7 @@ archive_acl_from_text_l(struct archive_a
tag == ARCHIVE_ENTRY_ACL_GROUP) {
n = 1;
name = field[1];
+ isint(name.start, name.end, &id);
} else
n = 0;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -526,6 +526,11 @@ setup_acls(struct archive_read_disk *a,
/* Only directories can have default ACLs. */
if (S_ISDIR(archive_entry_mode(entry))) {
+#if HAVE_ACL_GET_FD_NP
+ if (*fd >= 0)
+ acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT);
+ else
+#endif
acl = acl_get_file(accpath, ACL_TYPE_DEFAULT);
if (acl != NULL) {
r = translate_acl(a, entry, acl,
@@ -581,7 +586,10 @@ static struct {
{ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT},
- {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}
+ {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY},
+ {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS},
+ {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS},
+ {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}
};
#endif
static int
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_posix.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_posix.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_disk_posix.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -675,7 +675,7 @@ setup_suitable_read_buffer(struct archiv
asize = cf->min_xfer_size;
/* Increase a buffer size up to 64K bytes in
- * a proper incremant size. */
+ * a proper increment size. */
while (asize < 1024*64)
asize += incr;
/* Take a margin to adjust to the filesystem
@@ -1656,7 +1656,7 @@ setup_current_filesystem(struct archive_
archive_set_error(&a->archive, errno, "statvfs failed");
return (ARCHIVE_FAILED);
} else if (xr == 1) {
- /* Usuall come here unless NetBSD supports _PC_REC_XFER_ALIGN
+ /* Usually come here unless NetBSD supports _PC_REC_XFER_ALIGN
* for pathconf() function. */
t->current_filesystem->xfer_align = sfs.f_frsize;
t->current_filesystem->max_xfer_size = -1;
@@ -1944,7 +1944,7 @@ setup_current_filesystem(struct archive_
if (nm == -1)
# endif /* _PC_NAME_MAX */
/*
- * Some sysmtes (HP-UX or others?) incorrectly defined
+ * Some systems (HP-UX or others?) incorrectly defined
* NAME_MAX macro to be a smaller value.
*/
# if defined(NAME_MAX) && NAME_MAX >= 255
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -180,7 +180,7 @@ lz4_reader_bid(struct archive_read_filte
return (0);
bits_checked += 8;
BD = buffer[5];
- /* A block maximum size shuld be more than 3. */
+ /* A block maximum size should be more than 3. */
if (((BD & 0x70) >> 4) < 4)
return (0);
/* Reserved bits must be "0". */
@@ -417,7 +417,7 @@ lz4_filter_read_descriptor(struct archiv
/* Reserved bits must be zero. */
if (bd & 0x8f)
goto malformed_error;
- /* Get a maxinum block size. */
+ /* Get a maximum block size. */
switch (read_buf[1] >> 4) {
case 4: /* 64 KB */
state->flags.block_maximum_size = 64 * 1024;
@@ -627,7 +627,7 @@ lz4_filter_read_default_stream(struct ar
if (state->stage == SELECT_STREAM) {
state->stage = READ_DEFAULT_STREAM;
- /* First, read a desciprtor. */
+ /* First, read a descriptor. */
if((ret = lz4_filter_read_descriptor(self)) != ARCHIVE_OK)
return (ret);
state->stage = READ_DEFAULT_BLOCK;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -436,7 +436,7 @@ lzop_filter_read(struct archive_read_fil
}
/*
- * Drive lzo uncompresison.
+ * Drive lzo uncompression.
*/
out_size = (lzo_uint)state->uncompressed_size;
r = lzo1x_decompress_safe(b, (lzo_uint)state->compressed_size,
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -552,7 +552,7 @@ skip_sfx(struct archive_read *a, ssize_t
/*
* If bytes_avail > SFX_MIN_ADDR we do not have to call
* __archive_read_seek() at this time since we have
- * alredy had enough data.
+ * already had enough data.
*/
if (bytes_avail > SFX_MIN_ADDR)
__archive_read_consume(a, SFX_MIN_ADDR);
@@ -760,7 +760,7 @@ archive_read_format_7zip_read_header(str
symsize += size;
}
if (symsize == 0) {
- /* If there is no synname, handle it as a regular
+ /* If there is no symname, handle it as a regular
* file. */
zip_entry->mode &= ~AE_IFMT;
zip_entry->mode |= AE_IFREG;
@@ -3288,7 +3288,7 @@ read_stream(struct archive_read *a, cons
return (r);
/*
- * Skip the bytes we alrady has skipped in skip_stream().
+ * Skip the bytes we already has skipped in skip_stream().
*/
while (skip_bytes) {
ssize_t skipped;
@@ -3506,7 +3506,7 @@ setup_decode_folder(struct archive_read
return (ARCHIVE_FATAL);
}
- /* Allocate memory for the decorded data of a sub
+ /* Allocate memory for the decoded data of a sub
* stream. */
b[i] = malloc((size_t)zip->folder_outbytes_remaining);
if (b[i] == NULL) {
@@ -3591,7 +3591,7 @@ skip_stream(struct archive_read *a, size
if (zip->folder_index == 0) {
/*
* Optimization for a list mode.
- * Avoid unncecessary decoding operations.
+ * Avoid unnecessary decoding operations.
*/
zip->si.ci.folders[zip->entry->folderIndex].skipped_bytes
+= skip_bytes;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -322,7 +322,7 @@ struct iso9660 {
struct archive_string pathname;
char seenRockridge; /* Set true if RR extensions are used. */
- char seenSUSP; /* Set true if SUSP is beging used. */
+ char seenSUSP; /* Set true if SUSP is being used. */
char seenJoliet;
unsigned char suspOffset;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_lha.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_lha.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_lha.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -1711,7 +1711,7 @@ lha_crc16(uint16_t crc, const void *pp,
*/
for (;len >= 8; len -= 8) {
/* This if statement expects compiler optimization will
- * remove the stament which will not be executed. */
+ * remove the statement which will not be executed. */
#undef bswap16
#if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */
# define bswap16(x) _byteswap_ushort(x)
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -906,7 +906,7 @@ archive_read_format_rar_read_header(stru
sizeof(rar->reserved2));
}
- /* Main header is password encrytped, so we cannot read any
+ /* Main header is password encrypted, so we cannot read any
file names or any other info about files from the header. */
if (rar->main_flags & MHD_PASSWORD)
{
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -204,13 +204,14 @@ static int archive_read_format_tar_read_
struct archive_entry *);
static int checksum(struct archive_read *, const void *);
static int pax_attribute(struct archive_read *, struct tar *,
- struct archive_entry *, const char *key, const char *value);
+ struct archive_entry *, const char *key, const char *value,
+ size_t value_length);
static int pax_attribute_acl(struct archive_read *, struct tar *,
struct archive_entry *, const char *, int);
static int pax_attribute_xattr(struct archive_entry *, const char *,
const char *);
static int pax_header(struct archive_read *, struct tar *,
- struct archive_entry *, char *attr);
+ struct archive_entry *, struct archive_string *);
static void pax_time(const char *, int64_t *sec, long *nanos);
static ssize_t readline(struct archive_read *, struct tar *, const char **,
ssize_t limit, size_t *);
@@ -1483,7 +1484,7 @@ header_pax_extensions(struct archive_rea
* and then skip any fields in the standard header that were
* defined in the pax header.
*/
- err2 = pax_header(a, tar, entry, tar->pax_header.s);
+ err2 = pax_header(a, tar, entry, &tar->pax_header);
err = err_combine(err, err2);
tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
return (err);
@@ -1564,16 +1565,17 @@ header_ustar(struct archive_read *a, str
*/
static int
pax_header(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, char *attr)
+ struct archive_entry *entry, struct archive_string *in_as)
{
- size_t attr_length, l, line_length;
+ size_t attr_length, l, line_length, value_length;
char *p;
char *key, *value;
struct archive_string *as;
struct archive_string_conv *sconv;
int err, err2;
+ char *attr = in_as->s;
- attr_length = strlen(attr);
+ attr_length = in_as->length;
tar->pax_hdrcharset_binary = 0;
archive_string_empty(&(tar->entry_gname));
archive_string_empty(&(tar->entry_linkpath));
@@ -1638,11 +1640,13 @@ pax_header(struct archive_read *a, struc
}
*p = '\0';
- /* Identify null-terminated 'value' portion. */
value = p + 1;
+ /* Some values may be binary data */
+ value_length = attr + line_length - 1 - value;
+
/* Identify this attribute and set it in the entry. */
- err2 = pax_attribute(a, tar, entry, key, value);
+ err2 = pax_attribute(a, tar, entry, key, value, value_length);
if (err2 == ARCHIVE_FATAL)
return (err2);
err = err_combine(err, err2);
@@ -1764,6 +1768,20 @@ pax_attribute_xattr(struct archive_entry
}
static int
+pax_attribute_schily_xattr(struct archive_entry *entry,
+ const char *name, const char *value, size_t value_length)
+{
+ if (strlen(name) < 14 || (memcmp(name, "SCHILY.xattr.", 13)) != 0)
+ return 1;
+
+ name += 13;
+
+ archive_entry_xattr_add_entry(entry, name, value, value_length);
+
+ return 0;
+}
+
+static int
pax_attribute_acl(struct archive_read *a, struct tar *tar,
struct archive_entry *entry, const char *value, int type)
{
@@ -1824,7 +1842,7 @@ pax_attribute_acl(struct archive_read *a
*/
static int
pax_attribute(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const char *key, const char *value)
+ struct archive_entry *entry, const char *key, const char *value, size_t value_length)
{
int64_t s;
long n;
@@ -1961,6 +1979,9 @@ pax_attribute(struct archive_read *a, st
} else if (strcmp(key, "SCHILY.realsize") == 0) {
tar->realsize = tar_atol10(value, strlen(value));
archive_entry_set_size(entry, tar->realsize);
+ } else if (strncmp(key, "SCHILY.xattr.", 13) == 0) {
+ pax_attribute_schily_xattr(entry, key, value,
+ value_length);
} else if (strcmp(key, "SUN.holesdata") == 0) {
/* A Solaris extension for sparse. */
r = solaris_sparse_parse(a, tar, entry, value);
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_warc.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_warc.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_warc.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -88,7 +88,7 @@ typedef enum {
WT_RVIS,
/* conversion, unsupported */
WT_CONV,
- /* continutation, unsupported at the moment */
+ /* continuation, unsupported at the moment */
WT_CONT,
/* invalid type */
LAST_WT
@@ -562,7 +562,7 @@ xstrpisotime(const char *s, char **endpt
goto out;
}
- /* massage TM to fulfill some of POSIX' contraints */
+ /* massage TM to fulfill some of POSIX' constraints */
tm.tm_year -= 1900;
tm.tm_mon--;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_zip.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -199,7 +199,7 @@ struct zip {
struct trad_enc_ctx tctx;
char tctx_valid;
- /* WinZip AES decyption. */
+ /* WinZip AES decryption. */
/* Contexts used for AES decryption. */
archive_crypto_ctx cctx;
char cctx_valid;
@@ -242,7 +242,7 @@ trad_enc_update_keys(struct trad_enc_ctx
}
static uint8_t
-trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
+trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
{
unsigned temp = ctx->keys[2] | 2;
return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
@@ -257,7 +257,7 @@ trad_enc_decrypt_update(struct trad_enc_
max = (unsigned)((in_len < out_len)? in_len: out_len);
for (i = 0; i < max; i++) {
- uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx);
+ uint8_t t = in[i] ^ trad_enc_decrypt_byte(ctx);
out[i] = t;
trad_enc_update_keys(ctx, t);
}
@@ -710,7 +710,7 @@ process_extra(struct archive_read *a, co
break;
}
case 0x9901:
- /* WinZIp AES extra data field. */
+ /* WinZip AES extra data field. */
if (p[offset + 2] == 'A' && p[offset + 3] == 'E') {
/* Vendor version. */
zip_entry->aes_extra.vendor =
@@ -1518,7 +1518,7 @@ read_decryption_header(struct archive_re
case 0x6720:/* Blowfish */
case 0x6721:/* Twofish */
case 0x6801:/* RC4 */
- /* Suuported encryption algorithm. */
+ /* Supported encryption algorithm. */
break;
default:
archive_set_error(&a->archive,
@@ -1627,7 +1627,7 @@ read_decryption_header(struct archive_re
__archive_read_consume(a, 4);
/*return (ARCHIVE_OK);
- * This is not fully implemnted yet.*/
+ * This is not fully implemented yet.*/
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Encrypted file is unsupported");
return (ARCHIVE_FAILED);
@@ -1709,7 +1709,7 @@ init_traditional_PKWARE_decryption(struc
}
/*
- * Initialize ctx for Traditional PKWARE Decyption.
+ * Initialize ctx for Traditional PKWARE Decryption.
*/
r = trad_enc_init(&zip->tctx, passphrase, strlen(passphrase),
p, ENC_HEADER_SIZE, &crcchk);
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_string.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_string.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_string.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -219,6 +219,12 @@ archive_wstring_append(struct archive_ws
return (as);
}
+struct archive_string *
+archive_array_append(struct archive_string *as, const char *p, size_t s)
+{
+ return archive_string_append(as, p, s);
+}
+
void
archive_string_concat(struct archive_string *dest, struct archive_string *src)
{
@@ -597,7 +603,7 @@ archive_wstring_append_from_mbs(struct a
wcs = dest->s + dest->length;
/*
* We cannot use mbsrtowcs/mbstowcs here because those may convert
- * extra MBS when strlen(p) > len and one wide character consis of
+ * extra MBS when strlen(p) > len and one wide character consists of
* multi bytes.
*/
while (*mbs && mbs_length > 0) {
@@ -1248,7 +1254,7 @@ create_sconv_object(const char *fc, cons
sc->cd = iconv_open(tc, fc);
if (sc->cd == (iconv_t)-1 && (sc->flag & SCONV_BEST_EFFORT)) {
/*
- * Unfortunaly, all of iconv implements do support
+ * Unfortunately, all of iconv implements do support
* "CP932" character-set, so we should use "SJIS"
* instead if iconv_open failed.
*/
@@ -1261,7 +1267,7 @@ create_sconv_object(const char *fc, cons
/*
* archive_mstring on Windows directly convert multi-bytes
* into archive_wstring in order not to depend on locale
- * so that you can do a I18N programing. This will be
+ * so that you can do a I18N programming. This will be
* used only in archive_mstring_copy_mbs_len_l so far.
*/
if (flag & SCONV_FROM_CHARSET) {
@@ -1726,7 +1732,7 @@ archive_string_conversion_from_charset(s
* in tar or zip files. But mbstowcs/wcstombs(CRT) usually use CP_ACP
* unless you use setlocale(LC_ALL, ".OCP")(specify CP_OEMCP).
* So we should make a string conversion between CP_ACP and CP_OEMCP
- * for compatibillty.
+ * for compatibility.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
struct archive_string_conv *
@@ -2220,7 +2226,7 @@ best_effort_strncat_in_locale(struct arc
/*
* If a character is ASCII, this just copies it. If not, this
- * assigns '?' charater instead but in UTF-8 locale this assigns
+ * assigns '?' character instead but in UTF-8 locale this assigns
* byte sequence 0xEF 0xBD 0xBD, which are code point U+FFFD,
* a Replacement Character in Unicode.
*/
@@ -2554,7 +2560,7 @@ utf16_to_unicode(uint32_t *pwc, const ch
/*
* Surrogate pair values(0xd800 through 0xdfff) are only
- * used by UTF-16, so, after above culculation, the code
+ * used by UTF-16, so, after above calculation, the code
* must not be surrogate values, and Unicode has no codes
* larger than 0x10ffff. Thus, those are not legal Unicode
* values.
@@ -2903,7 +2909,7 @@ get_nfc(uint32_t uc, uint32_t uc2)
/*
* Normalize UTF-8/UTF-16BE characters to Form C and copy the result.
*
- * TODO: Convert composition exclusions,which are never converted
+ * TODO: Convert composition exclusions, which are never converted
* from NFC,NFD,NFKC and NFKD, to Form C.
*/
static int
@@ -3437,7 +3443,7 @@ strncat_from_utf8_libarchive2(struct arc
}
/*
- * As libarchie 2.x, translates the UTF-8 characters into
+ * As libarchive 2.x, translates the UTF-8 characters into
* wide-characters in the assumption that WCS is Unicode.
*/
if (n < 0) {
@@ -3947,7 +3953,7 @@ archive_mstring_get_mbs_l(struct archive
#if defined(_WIN32) && !defined(__CYGWIN__)
/*
- * Internationalization programing on Windows must use Wide
+ * Internationalization programming on Windows must use Wide
* characters because Windows platform cannot make locale UTF-8.
*/
if (sc != NULL && (aes->aes_set & AES_SET_WCS) != 0) {
@@ -4079,7 +4085,7 @@ archive_mstring_copy_mbs_len_l(struct ar
archive_string_empty(&(aes->aes_utf8));
#if defined(_WIN32) && !defined(__CYGWIN__)
/*
- * Internationalization programing on Windows must use Wide
+ * Internationalization programming on Windows must use Wide
* characters because Windows platform cannot make locale UTF-8.
*/
if (sc == NULL) {
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_string.h
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_string.h Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_string.h Wed Jan 11 21:05:13 2017 (r311940)
@@ -81,6 +81,10 @@ archive_strappend_char(struct archive_st
struct archive_wstring *
archive_wstrappend_wchar(struct archive_wstring *, wchar_t);
+/* Append a raw array to an archive_string, resizing as necessary */
+struct archive_string *
+archive_array_append(struct archive_string *, const char *, size_t);
+
/* Convert a Unicode string to current locale and append the result. */
/* Returns -1 if conversion fails. */
int
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_string_composition.h
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_string_composition.h Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_string_composition.h Wed Jan 11 21:05:13 2017 (r311940)
@@ -1009,7 +1009,7 @@ static const char u_decomposable_blocks[
(((uc) > 0x1D244)?0:\
ccc_val[ccc_val_index[ccc_index[(uc)>>8]][((uc)>>4)&0x0F]][(uc)&0x0F])
-/* The table of the value of Canonical Cimbining Class */
+/* The table of the value of Canonical Combining Class */
static const unsigned char ccc_val[][16] = {
/* idx=0: XXXX0 - XXXXF */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -231,7 +231,7 @@ __archive_write_filter(struct archive_wr
if (length == 0)
return(ARCHIVE_OK);
if (f->write == NULL)
- /* If unset, a fatal error has already ocuured, so this filter
+ /* If unset, a fatal error has already occurred, so this filter
* didn't open. We cannot write anything. */
return(ARCHIVE_FATAL);
r = (f->write)(f, buff, length);
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_add_filter_xz.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_add_filter_xz.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_add_filter_xz.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -233,7 +233,7 @@ archive_compressor_xz_init_stream(struct
if (f->code == ARCHIVE_FILTER_XZ) {
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
if (data->threads != 1) {
- bzero(&mt_options, sizeof(mt_options));
+ memset(&mt_options, 0, sizeof(mt_options));
mt_options.threads = data->threads;
mt_options.timeout = 300;
mt_options.filters = data->lzmafilters;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_disk_acl.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_disk_acl.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_disk_acl.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -124,7 +124,10 @@ static struct {
{ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT},
- {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}
+ {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY},
+ {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS},
+ {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS},
+ {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}
};
#endif
@@ -292,29 +295,41 @@ set_acl(struct archive *a, int fd, const
}
/* Try restoring the ACL through 'fd' if we can. */
-#if HAVE_ACL_SET_FD
- if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0)
- ret = ARCHIVE_OK;
- else
-#else
+#if HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD
#if HAVE_ACL_SET_FD_NP
- if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0)
- ret = ARCHIVE_OK;
- else
-#endif
-#endif
+ if (fd >= 0) {
+ if (acl_set_fd_np(fd, acl, acl_type) == 0)
+#else /* HAVE_ACL_SET_FD */
+ if (fd >= 0 && acl_type == ACL_TYPE_ACCESS) {
+ if (acl_set_fd(fd, acl) == 0)
+#endif
+ ret = ARCHIVE_OK;
+ else {
+ if (errno == EOPNOTSUPP) {
+ /* Filesystem doesn't support ACLs */
+ ret = ARCHIVE_OK;
+ } else {
+ archive_set_error(a, errno,
+ "Failed to set %s acl on fd", tname);
+ }
+ }
+ } else
+#endif /* HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD */
#if HAVE_ACL_SET_LINK_NP
- if (acl_set_link_np(name, acl_type, acl) != 0) {
- archive_set_error(a, errno, "Failed to set %s acl", tname);
- ret = ARCHIVE_WARN;
- }
+ if (acl_set_link_np(name, acl_type, acl) != 0) {
#else
/* TODO: Skip this if 'name' is a symlink. */
if (acl_set_file(name, acl_type, acl) != 0) {
- archive_set_error(a, errno, "Failed to set %s acl", tname);
- ret = ARCHIVE_WARN;
- }
#endif
+ if (errno == EOPNOTSUPP) {
+ /* Filesystem doesn't support ACLs */
+ ret = ARCHIVE_OK;
+ } else {
+ archive_set_error(a, errno, "Failed to set %s acl",
+ tname);
+ ret = ARCHIVE_WARN;
+ }
+ }
exit_free:
acl_free(acl);
return (ret);
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_7zip.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -1358,7 +1358,7 @@ make_header(struct archive_write *a, uin
if (r < 0)
return (r);
- /* Write Nume size. */
+ /* Write Name size. */
r = enc_uint64(a, zip->total_bytes_entry_name+1);
if (r < 0)
return (r);
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_pax.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_pax.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_pax.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -62,10 +62,17 @@ struct pax {
struct sparse_block *sparse_tail;
struct archive_string_conv *sconv_utf8;
int opt_binary;
+
+ unsigned flags;
+#define WRITE_SCHILY_XATTR (1 << 0)
+#define WRITE_LIBARCHIVE_XATTR (1 << 1)
};
static void add_pax_attr(struct archive_string *, const char *key,
const char *value);
+static void add_pax_attr_binary(struct archive_string *,
+ const char *key,
+ const char *value, size_t value_len);
static void add_pax_attr_int(struct archive_string *,
const char *key, int64_t value);
static void add_pax_attr_time(struct archive_string *,
@@ -136,6 +143,8 @@ archive_write_set_format_pax(struct arch
"Can't allocate pax data");
return (ARCHIVE_FATAL);
}
+ pax->flags = WRITE_LIBARCHIVE_XATTR | WRITE_SCHILY_XATTR;
+
a->format_data = pax;
a->format_name = "pax";
a->format_options = archive_write_pax_options;
@@ -275,6 +284,17 @@ add_pax_attr_int(struct archive_string *
static void
add_pax_attr(struct archive_string *as, const char *key, const char *value)
{
+ add_pax_attr_binary(as, key, value, strlen(value));
+}
+
+/*
+ * Add a key/value attribute to the pax header. This function handles
+ * binary values.
+ */
+static void
+add_pax_attr_binary(struct archive_string *as, const char *key,
+ const char *value, size_t value_len)
+{
int digits, i, len, next_ten;
char tmp[1 + 3 * sizeof(int)]; /* < 3 base-10 digits per byte */
@@ -282,7 +302,7 @@ add_pax_attr(struct archive_string *as,
* PAX attributes have the following layout:
* <len> <space> <key> <=> <value> <nl>
*/
- len = 1 + (int)strlen(key) + 1 + (int)strlen(value) + 1;
+ len = 1 + (int)strlen(key) + 1 + (int)value_len + 1;
/*
* The <len> field includes the length of the <len> field, so
@@ -313,21 +333,47 @@ add_pax_attr(struct archive_string *as,
archive_strappend_char(as, ' ');
archive_strcat(as, key);
archive_strappend_char(as, '=');
- archive_strcat(as, value);
+ archive_array_append(as, value, value_len);
archive_strappend_char(as, '\n');
}
+static void
+archive_write_pax_header_xattr(struct pax *pax, const char *encoded_name,
+ const void *value, size_t value_len)
+{
+ struct archive_string s;
+ char *encoded_value;
+
+ if (pax->flags & WRITE_LIBARCHIVE_XATTR) {
+ encoded_value = base64_encode((const char *)value, value_len);
+
+ if (encoded_name != NULL && encoded_value != NULL) {
+ archive_string_init(&s);
+ archive_strcpy(&s, "LIBARCHIVE.xattr.");
+ archive_strcat(&s, encoded_name);
+ add_pax_attr(&(pax->pax_header), s.s, encoded_value);
+ archive_string_free(&s);
+ }
+ free(encoded_value);
+ }
+ if (pax->flags & WRITE_SCHILY_XATTR) {
+ archive_string_init(&s);
+ archive_strcpy(&s, "SCHILY.xattr.");
+ archive_strcat(&s, encoded_name);
+ add_pax_attr_binary(&(pax->pax_header), s.s, value, value_len);
+ archive_string_free(&s);
+ }
+}
+
static int
archive_write_pax_header_xattrs(struct archive_write *a,
struct pax *pax, struct archive_entry *entry)
{
- struct archive_string s;
int i = archive_entry_xattr_reset(entry);
while (i--) {
const char *name;
const void *value;
- char *encoded_value;
char *url_encoded_name = NULL, *encoded_name = NULL;
size_t size;
int r;
@@ -348,16 +394,9 @@ archive_write_pax_header_xattrs(struct a
}
}
- encoded_value = base64_encode((const char *)value, size);
+ archive_write_pax_header_xattr(pax, encoded_name,
+ value, size);
- if (encoded_name != NULL && encoded_value != NULL) {
- archive_string_init(&s);
- archive_strcpy(&s, "LIBARCHIVE.xattr.");
- archive_strcat(&s, encoded_name);
- add_pax_attr(&(pax->pax_header), s.s, encoded_value);
- archive_string_free(&s);
- }
- free(encoded_value);
}
return (ARCHIVE_OK);
}
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -2913,7 +2913,7 @@ compression_init_encoder_xz(struct archi
*strm = lzma_init_data;
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
if (threads > 1) {
- bzero(&mt_options, sizeof(mt_options));
+ memset(&mt_options, 0, sizeof(mt_options));
mt_options.threads = threads;
mt_options.timeout = 300;
mt_options.filters = lzmafilters;
Modified: projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_zip.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_zip.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/archive_write_set_format_zip.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -878,7 +878,7 @@ archive_write_zip_header(struct archive_
|| zip->entry_encryption == ENCRYPTION_WINZIP_AES256)) {
memcpy(e, "\001\231\007\000\001\000AE", 8);
- /* AES vendoer version AE-2 does not store a CRC.
+ /* AES vendor version AE-2 does not store a CRC.
* WinZip 11 uses AE-1, which does store the CRC,
* but it does not store the CRC when the file size
* is less than 20 bytes. So we simulate what
@@ -1013,7 +1013,7 @@ archive_write_zip_data(struct archive_wr
if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) {
switch (zip->entry_encryption) {
case ENCRYPTION_TRADITIONAL:
- /* Initialize traditoinal PKWARE encryption context. */
+ /* Initialize traditional PKWARE encryption context. */
if (!zip->tctx_valid) {
ret = init_traditional_pkware_encryption(a);
if (ret != ARCHIVE_OK)
@@ -1499,7 +1499,7 @@ trad_enc_update_keys(struct trad_enc_ctx
}
static uint8_t
-trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
+trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
{
unsigned temp = ctx->keys[2] | 2;
return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
@@ -1515,7 +1515,7 @@ trad_enc_encrypt_update(struct trad_enc_
for (i = 0; i < max; i++) {
uint8_t t = in[i];
- out[i] = t ^ trad_enc_decypt_byte(ctx);
+ out[i] = t ^ trad_enc_decrypt_byte(ctx);
trad_enc_update_keys(ctx, t);
}
return i;
@@ -1626,7 +1626,7 @@ init_winzip_aes_encryption(struct archiv
return (ARCHIVE_FAILED);
}
- /* Set a passowrd verification value after the 'salt'. */
+ /* Set a password verification value after the 'salt'. */
salt[salt_len] = derived_key[key_len * 2];
salt[salt_len + 1] = derived_key[key_len * 2 + 1];
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -191,7 +191,7 @@ DEFINE_TEST(test_archive_read_add_passph
/* Fist call, we should get "passCallBack" as a passphrase. */
assertEqualString("passCallBack", __archive_read_next_passphrase(ar));
__archive_read_reset_passphrase(ar);
- /* After reset passphrase, we should get "passCallBack"passphrase. */
+ /* After reset passphrase, we should get "passCallBack" passphrase. */
assertEqualString("passCallBack", __archive_read_next_passphrase(ar));
/* Second call, we should get NULL which means all the passphrases
* are passed already. */
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_compat_uudecode.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_compat_uudecode.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_compat_uudecode.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -40,7 +40,7 @@ static char archive_data[] = {
};
/*
- * Compatibility: uudecode command ignores junk data placed ater the "end"
+ * Compatibility: uudecode command ignores junk data placed after the "end"
* marker.
*/
DEFINE_TEST(test_compat_uudecode)
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -27,7 +27,7 @@
__FBSDID("$FreeBSD$");
/*
-ecute the following to rebuild the data for this program:
+execute the following to rebuild the data for this program:
tail -n +33 test_read_format_cpio_afio.c | /bin/sh
# How to make a sample data.
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$");
DEFINE_TEST(test_read_format_zip_traditional_encryption_data)
{
- /* This file is password protected (Traditional PKWARE Enctypted).
+ /* This file is password protected (Traditional PKWARE Encrypted).
The headers are NOT encrypted. Password is "12345678". */
const char *refname =
"test_read_format_zip_traditional_encryption_data.zip";
@@ -36,7 +36,7 @@ DEFINE_TEST(test_read_format_zip_traditi
struct archive *a;
char buff[512];
- /* Check if running system has cryptographic functionarity. */
+ /* Check if running system has cryptographic functionality. */
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -33,7 +33,7 @@ test_winzip_aes(const char *refname, int
struct archive *a;
char buff[512];
- /* Check if running system has cryptographic functionarity. */
+ /* Check if running system has cryptographic functionality. */
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
Modified: projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c
==============================================================================
--- projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c Wed Jan 11 21:01:49 2017 (r311939)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c Wed Jan 11 21:05:13 2017 (r311940)
@@ -34,7 +34,7 @@ DEFINE_TEST(test_read_format_zip_winzip_
char buff[512];
- /* Check if running system has cryptographic functionarity. */
+ /* Check if running system has cryptographic functionality. */
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
Copied: projects/clang400-import/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c (from r311939, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang400-import/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c Wed Jan 11 21:05:13 2017 (r311940, copy of r311939, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c)
@@ -0,0 +1,70 @@
+/*-
+ * Copyright (c) 2016 IBM Corporation
+ * Copyright (c) 2003-2007 Tim Kientzle
+ *
+ * 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.
+ *
+ * This test case's code has been derived from test_entry.c
+ */
+#include "test.h"
+
+DEFINE_TEST(test_schily_xattr_pax)
+{
+ struct archive *a;
+ struct archive_entry *ae;
+ const char *refname = "test_read_pax_schily_xattr.tar";
+ const char *xname; /* For xattr tests. */
+ const void *xval; /* For xattr tests. */
+ size_t xsize; /* For xattr tests. */
+ const char *string, *array;
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+
+ extract_reference_file(refname);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_open_filename(a, refname, 10240));
+
+ assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualInt(2, archive_entry_xattr_count(ae));
+ assertEqualInt(2, archive_entry_xattr_reset(ae));
+
+ assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize));
+ assertEqualString(xname, "security.selinux");
+ string = "system_u:object_r:unlabeled_t:s0";
+ assertEqualString(xval, string);
+ /* the xattr's value also contains the terminating \0 */
+ assertEqualInt((int)xsize, strlen(string) + 1);
+
+ assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize));
+ assertEqualString(xname, "security.ima");
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list