CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Mon Mar 29 15:31:46 UTC 2021 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_disk_posix.c Log Message: PR/56083: RVP: tar -c hangs when reading from FUSE-ext2 filesystems since it returns 0 for statvfs members and libarchive handles only -1. Centralize the transfer setting code. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c:1.1.1.2 Wed Jul 24 09:50:23 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c Mon Mar 29 11:31:46 2021 @@ -1527,6 +1527,15 @@ get_xfer_size(struct tree *t, int fd, co #if defined(HAVE_STATFS) && defined(HAVE_FSTATFS) && defined(MNT_LOCAL) \ && !defined(ST_LOCAL) +static void +set_transfer_size(struct filesystem *fs, const struct statfs *sfs) +{ + fs->xfer_align = sfs->f_bsize > 0 ? (long)sfs->fs_bsize : -1; + fs->max_xfer_size = -1; + fs->min_xfer_size = sfs->f_iosize > 0 ? (long)sfs->f_iosize : -1; + fs->incr_xfer_size = sfs->f_iosize > 0 ? (long)sfs->f_iosize : -1; +} + /* * Gather current filesystem properties on FreeBSD, OpenBSD and Mac OS X. */ @@ -1595,10 +1604,7 @@ setup_current_filesystem(struct archive_ return (ARCHIVE_FAILED); } else if (xr == 1) { /* pathconf(_PC_REX_*) operations are not supported. */ - t->current_filesystem->xfer_align = sfs.f_bsize; - t->current_filesystem->max_xfer_size = -1; - t->current_filesystem->min_xfer_size = sfs.f_iosize; - t->current_filesystem->incr_xfer_size = sfs.f_iosize; + set_transfer_size(t->current_filesystem, &sfs); } if (sfs.f_flags & MNT_LOCAL) t->current_filesystem->remote = 0; @@ -1653,6 +1659,20 @@ setup_current_filesystem(struct archive_ #elif (defined(HAVE_STATVFS) || defined(HAVE_FSTATVFS)) && defined(ST_LOCAL) +static void +set_transfer_size(struct filesystem *fs, const struct statvfs *sfs) +{ + fs->xfer_align = sfs->f_frsize > 0 ? (long)sfs->f_frsize : -1; + fs->max_xfer_size = -1; +#if defined(HAVE_STRUCT_STATVFS_F_IOSIZE) + fs->min_xfer_size = sfs->f_iosize > 0 ? (long)sfs->f_iosize : -1; + fs->incr_xfer_size = sfs->f_iosize > 0 ? (long)sfs->f_iosize : -1; +#else + fs->min_xfer_size = sfs->f_bsize > 0 : (long)sfs->f_bsize : -1; + fs->incr_xfer_size = sfs->f_bsize > 0 : (long)sfs->f_bsize : -1; +#endif +} + /* * Gather current filesystem properties on NetBSD */ @@ -1690,15 +1710,7 @@ setup_current_filesystem(struct archive_ } else if (xr == 1) { /* 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; -#if defined(HAVE_STRUCT_STATVFS_F_IOSIZE) - t->current_filesystem->min_xfer_size = sfs.f_iosize; - t->current_filesystem->incr_xfer_size = sfs.f_iosize; -#else - t->current_filesystem->min_xfer_size = sfs.f_bsize; - t->current_filesystem->incr_xfer_size = sfs.f_bsize; -#endif + set_transfer_size(t->current_filesystem, &sfs); } if (sfs.f_flag & ST_LOCAL) t->current_filesystem->remote = 0; @@ -1805,15 +1817,9 @@ setup_current_filesystem(struct archive_ } else if (xr == 1) { /* pathconf(_PC_REX_*) operations are not supported. */ #if defined(HAVE_STATVFS) - t->current_filesystem->xfer_align = svfs.f_frsize; - t->current_filesystem->max_xfer_size = -1; - t->current_filesystem->min_xfer_size = svfs.f_bsize; - t->current_filesystem->incr_xfer_size = svfs.f_bsize; + set_transfer_size(t->current_filesystem, &svfs); #else - t->current_filesystem->xfer_align = sfs.f_frsize; - t->current_filesystem->max_xfer_size = -1; - t->current_filesystem->min_xfer_size = sfs.f_bsize; - t->current_filesystem->incr_xfer_size = sfs.f_bsize; + set_transfer_size(t->current_filesystem, &sfs); #endif } switch (sfs.f_type) { @@ -1920,10 +1926,7 @@ setup_current_filesystem(struct archive_ return (ARCHIVE_FAILED); } else if (xr == 1) { /* pathconf(_PC_REX_*) operations are not supported. */ - t->current_filesystem->xfer_align = sfs.f_frsize; - t->current_filesystem->max_xfer_size = -1; - t->current_filesystem->min_xfer_size = sfs.f_bsize; - t->current_filesystem->incr_xfer_size = sfs.f_bsize; + set_transfer_size(t->current_filesystem, &sfs); } #if defined(ST_NOATIME)
CVS commit: src/external/bsd/libarchive/dist/tar
Module Name:src Committed By: christos Date: Thu Jan 28 19:46:54 UTC 2021 Modified Files: src/external/bsd/libarchive/dist/tar: write.c Log Message: Don't try print an error message when there is none. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libarchive/dist/tar/write.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/tar/write.c diff -u src/external/bsd/libarchive/dist/tar/write.c:1.2 src/external/bsd/libarchive/dist/tar/write.c:1.3 --- src/external/bsd/libarchive/dist/tar/write.c:1.2 Thu Jan 28 14:42:27 2021 +++ src/external/bsd/libarchive/dist/tar/write.c Thu Jan 28 14:46:54 2021 @@ -798,7 +798,9 @@ copy_file_data_block(struct bsdtar *bsdt progress += bytes_written; } if (r < ARCHIVE_WARN) { - lafe_warnc(archive_errno(a), "%s", archive_error_string(a)); + const char *s = archive_error_string(a); + if (s) + lafe_warnc(archive_errno(a), "%s", s); return (-1); } return (0);
CVS commit: src/external/bsd/libarchive/dist/tar
Module Name:src Committed By: christos Date: Thu Jan 28 19:42:27 UTC 2021 Modified Files: src/external/bsd/libarchive/dist/tar: write.c Log Message: PR/55962: Andreas Gustafsson: Some tar(1) error messages lack file name and newline To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/libarchive/dist/tar/write.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/tar/write.c diff -u src/external/bsd/libarchive/dist/tar/write.c:1.1.1.5 src/external/bsd/libarchive/dist/tar/write.c:1.2 --- src/external/bsd/libarchive/dist/tar/write.c:1.1.1.5 Wed Jul 24 09:50:41 2019 +++ src/external/bsd/libarchive/dist/tar/write.c Thu Jan 28 14:42:27 2021 @@ -971,16 +971,15 @@ write_entry(struct bsdtar *bsdtar, struc e = archive_write_header(a, entry); if (e != ARCHIVE_OK) { - if (bsdtar->verbose > 1) { + if (bsdtar->verbose > 0) { safe_fprintf(stderr, "a "); list_item_verbose(bsdtar, stderr, entry); lafe_warnc(0, ": %s", archive_error_string(a)); - } else if (bsdtar->verbose > 0) { + } else { lafe_warnc(0, "%s: %s", archive_entry_pathname(entry), archive_error_string(a)); - } else - fprintf(stderr, ": %s", archive_error_string(a)); + } } if (e == ARCHIVE_FATAL)
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: mrg Date: Sat Sep 5 13:35:24 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_open_filename.c Log Message: avoid always passing NULL to printf()-like functions To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4 Thu Apr 20 12:55:36 2017 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c Sat Sep 5 13:35:24 2020 @@ -221,7 +221,9 @@ file_open(struct archive *a, void *clien struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *clien #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail;
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Fri Aug 28 18:44:54 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_write_disk_secure.c Log Message: PR/55612: Martin Husemann: libarchive tests pollute /tmp w/o cleanup Make tests obey $TMPDIR. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.3 src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.4 --- src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.3 Thu Jan 16 19:37:03 2020 +++ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c Fri Aug 28 14:44:54 2020 @@ -40,6 +40,16 @@ DEFINE_TEST(test_write_disk_secure) struct archive *a; struct archive_entry *ae; struct stat st; + char tmp[2048]; + const char *tmpdir; + const char *lname = + "libarchive_test-test_write_disk_secure-absolute_symlink"; +#if 0 + const char *fname = + "libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp"; +#endif + const char *pname = + "libarchive_test-test_write_disk_secure-absolute_path.tmp"; /* Start with a known umask. */ assertUmask(UMASK); @@ -86,12 +96,15 @@ DEFINE_TEST(test_write_disk_secure) assert(0 == archive_write_finish_entry(a)); #endif - /* Write an absolute symlink to /tmp. */ + /* Write an absolute symlink to $TMPDIR. */ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_SYMLINKS); assert((ae = archive_entry_new()) != NULL); - archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_symlink"); + if ((tmpdir = getenv("TMPDIR")) == NULL) + tmpdir = "/tmp"; + snprintf(tmp, sizeof(tmp), "%s/%s", tmpdir, lname); + archive_entry_copy_pathname(ae, tmp); archive_entry_set_mode(ae, S_IFLNK | 0777); - archive_entry_set_symlink(ae, "/tmp"); + archive_entry_set_symlink(ae, tmpdir); archive_write_disk_set_options(a, 0); assert(0 == archive_write_header(a, ae)); assert(0 == archive_write_finish_entry(a)); @@ -99,15 +112,18 @@ DEFINE_TEST(test_write_disk_secure) #if 0 /* With security checks enabled, this should fail. */ assert(archive_entry_clear(ae) != NULL); - archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp"); + snprintf(tmp, sizeof(tmp), "%s/%s/%s", tmpdir, lname, fname); + archive_entry_copy_pathname(ae, tmp); archive_entry_set_mode(ae, S_IFREG | 0777); archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_SYMLINKS); failure("Extracting a file through an absolute symlink should fail here."); assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae)); archive_entry_free(ae); - assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp"); - assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink")); - unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp"); + assertFileNotExists(tmp); + snprintf(tmp, sizeof(tmp), "%s/%s", tmpdir, lname); + assert(0 == unlink(tmp)); + snprintf(tmp, sizeof(tmp), "%s/%s", tmpdir, fname); + unlink(tmp); #endif /* Create another link. */ @@ -230,23 +246,24 @@ DEFINE_TEST(test_write_disk_secure) * extract an absolute path. */ assert((ae = archive_entry_new()) != NULL); - archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); + snprintf(tmp, sizeof(tmp), "%s/%s", tmpdir, pname); + archive_entry_copy_pathname(ae, tmp); archive_entry_set_mode(ae, S_IFREG | 0777); assert(0 == archive_write_header(a, ae)); assert(0 == archive_write_finish_entry(a)); - assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); - assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp")); + assertFileExists(tmp); + assert(0 == unlink(tmp)); /* But with security checks enabled, this should fail. */ assert(archive_entry_clear(ae) != NULL); - archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); + archive_entry_copy_pathname(ae, tmp); archive_entry_set_mode(ae, S_IFREG | 0777); archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS); failure("Extracting an absolute path should fail here."); assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae)); archive_entry_free(ae); assert(0 == archive_write_finish_entry(a)); - assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); + assertFileNotExists(t
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Fri Aug 14 14:42:45 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write_disk_posix.c Log Message: PR/55568: Andreas Gustafsson: Set the error when failing to create a temp file. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.5 src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.6 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.5 Mon Feb 10 10:24:21 2020 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Fri Aug 14 10:42:44 2020 @@ -2184,8 +2184,11 @@ restore_entry(struct archive_write_disk if ((a->flags & ARCHIVE_EXTRACT_ATOMIC) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ -if ((a->fd = la_mktemp(a)) == -1) +if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, en, + "Can't create '%s'", a->name); return ARCHIVE_FAILED; +} a->pst = NULL; en = 0; } else {
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Wed Apr 22 15:55:41 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_acl_platform_posix1e.c Log Message: make variable constant since it is assigned from a string literal To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c:1.1.1.1 Thu Apr 20 08:55:53 2017 +++ src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c Wed Apr 22 11:55:41 2020 @@ -364,8 +364,8 @@ DEFINE_TEST(test_acl_platform_posix1e_re struct archive *a; struct archive_entry *ae; int n, fd, flags, dflags; - char *func, *acl_text; - const char *acl1_text, *acl2_text, *acl3_text; + char *acl_text; + const char *func, *acl1_text, *acl2_text, *acl3_text; #if ARCHIVE_ACL_SUNOS void *aclp; int aclcnt;
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Wed Apr 22 15:55:55 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_acl_platform_nfs4.c Log Message: Add missing break's To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c:1.1.1.2 Wed Jul 24 09:50:38 2019 +++ src/external/bsd/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c Wed Apr 22 11:55:55 2020 @@ -634,9 +634,11 @@ acl_match(acl_entry_t aclent, struct mya case ACL_ENTRY_TYPE_AUDIT: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_AUDIT) return (0); + break; case ACL_ENTRY_TYPE_ALARM: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_ALARM) return (0); + break; default: return (0); }
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: kamil Date: Thu Feb 27 10:35:08 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_support_format_xar.c Log Message: Fix undefined behavior in archive_read_support_format_xar() Cherry-pick upstream patch: >From 2cfda000bc5159d46fd8ead7d1bd3ea1f66f7948 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Thu, 27 Feb 2020 01:54:19 +0100 Subject: [PATCH] XAR reader: initialize file_queue with 0 and memcpy() if allocated only Fixes #1338 To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c:1.1.1.4 Wed Jul 24 13:50:22 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c Thu Feb 27 10:35:08 2020 @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct a return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; }
CVS commit: src/external/bsd/libarchive/dist/cpio/test
Module Name:src Committed By: kamil Date: Thu Feb 27 10:32:35 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/cpio/test: test_format_newc.c Log Message: Fix undefined behavior in from_hex() Cherry-pick upstream patch: >From 4a5fc0b980a23d1a317c7a564a94cca090e111c2 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Thu, 27 Feb 2020 10:42:27 +0100 Subject: [PATCH] bsdcpio_test: from_hex() needs to be an uint32_t Fixes #1339 https://github.com/libarchive/libarchive/commit/4a5fc0b980a23d1a317c7a564a94cca090e111c2 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c diff -u src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c:1.2 src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c:1.3 --- src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c:1.2 Tue Jan 21 18:33:48 2020 +++ src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c Thu Feb 27 10:32:35 2020 @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "0003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "0006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "0005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "0008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "0004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: kamil Date: Tue Feb 25 09:01:25 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read.c Log Message: Avoid NULL pointer arithmetic Cherry-pick upstream patch: >From ec5b86b48e99c5501374b01606f1ccdae6a8a93e Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 24 Feb 2020 22:58:00 +0100 Subject: [PATCH] archive_read.c: silence UBSan warning about undefined behavior Fixes #1335 https://github.com/libarchive/libarchive/commit/ec5b86b48e99c5501374b01606f1ccdae6a8a93e.patch To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_read.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read.c:1.1.1.4 Wed Jul 24 13:50:24 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive_read.c Tue Feb 25 09:01:25 2020 @@ -891,15 +891,16 @@ archive_read_data(struct archive *_a, vo len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; +s -= len; +a->read_data_block += len; +a->read_data_remaining -= len; +a->read_data_output_offset += len; +a->read_data_offset += len; +dest += len; +bytes_read += len; + } } } a->read_data_is_posix_read = 0;
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Mon Feb 10 15:24:21 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write_disk_posix.c Log Message: When extracting symlinks atomically remove them like we do for hard links. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.4 src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.5 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.4 Tue Jan 14 14:29:45 2020 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Feb 10 10:24:21 2020 @@ -2301,6 +2301,11 @@ create_filesystem_object(struct archive_ } free(linkname_copy); archive_string_free(&error_string); + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktemplink() function, and then use rename(2). + */ if (a->flags & ARCHIVE_EXTRACT_ATOMIC) unlink(a->name); r = link(linkname, a->name) ? errno : 0; @@ -2341,7 +2346,15 @@ create_filesystem_object(struct archive_ linkname = archive_entry_symlink(a->entry); if (linkname != NULL) { #if HAVE_SYMLINK - int error = symlink(linkname, a->name) ? errno : 0; + int error; + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktempsymlink() function, and then use rename(2). + */ + if (a->flags & ARCHIVE_EXTRACT_ATOMIC) + unlink(a->name); + error = symlink(linkname, a->name) ? errno : 0; if (error == 0) { #ifdef HAVE_LSTAT r = lstat(a->name, &st);
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: christos Date: Tue Jan 21 18:33:48 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/cat/test: test_0.c src/external/bsd/libarchive/dist/cpio/test: test_basic.c test_format_newc.c src/external/bsd/libarchive/dist/libarchive/test: test_compat_zip.c test_fuzz.c test_read_extract.c test_read_format_gtar_sparse.c test_read_format_zip.c test_read_format_zip_7075_utf8_paths.c test_read_format_zip_comment_stored.c test_read_format_zip_extra_padding.c test_read_format_zip_high_compression.c test_read_format_zip_jar.c test_read_format_zip_mac_metadata.c test_read_format_zip_malformed.c test_read_format_zip_msdos.c test_read_format_zip_nested.c test_read_format_zip_nofiletype.c test_read_format_zip_padded.c test_read_format_zip_sfx.c test_read_format_zip_with_invalid_traditional_eocd.c test_read_format_zip_zip64.c test_read_pax_truncated.c test_read_truncated_filter.c test_sparse_basic.c test_write_disk.c test_write_format_cpio_empty.c test_write_format_shar_empty.c test_write_format_tar.c test_write_format_tar_sparse.c src/external/bsd/libarchive/dist/tar/test: test_basic.c test_copy.c test_option_C_upper.c test_option_s.c src/external/bsd/libarchive/dist/test_utils: test_common.h test_main.c Log Message: Fix printf formats in tests for the clang build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/cat/test/test_0.c cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/cpio/test/test_basic.c \ src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_compat_zip.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_extract.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_fuzz.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_pax_truncated.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_cpio_empty.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_shar_empty.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_tar.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_7075_utf8_paths.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_comment_stored.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_extra_padding.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_high_compression.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_jar.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_mac_metadata.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_malformed.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_msdos.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_nested.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_nofiletype.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_padded.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_sfx.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_zip_zip64.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_truncated_filter.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_tar_sparse.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/test/test_sparse_basic.c cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_basic.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/tar/test/test_copy.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_option_C_upper.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_option_s.c cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/libarchive/dist/test_utils/test_common.h \ src/external/bsd/libarchive/dist/test_utils/test_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/cat/test/test_0.c diff -u src/external/bsd/libarchive
CVS commit: src/external/bsd/libarchive/dist/tar/test
Module Name:src Committed By: christos Date: Fri Jan 17 16:50:03 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/tar/test: test_copy.c Log Message: Extract a second time to exercise extracting hardlinks over existing hardlinks. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_copy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/tar/test/test_copy.c diff -u src/external/bsd/libarchive/dist/tar/test/test_copy.c:1.1.1.4 src/external/bsd/libarchive/dist/tar/test/test_copy.c:1.2 --- src/external/bsd/libarchive/dist/tar/test/test_copy.c:1.1.1.4 Wed Jul 24 09:50:41 2019 +++ src/external/bsd/libarchive/dist/tar/test/test_copy.c Fri Jan 17 11:50:03 2020 @@ -316,6 +316,19 @@ copy_basic(void) assertEmptyFile("unpack.out"); verify_tree(LIMIT_NONE); + + /* + * Unpack a second time to make sure that things are still ok + */ + r = systemf("%s xf archive >unpack.out 2>unpack.err", testprog); + failure("Error invoking %s xf archive", testprog); + assertEqualInt(r, 0); + + /* Verify that nothing went to stdout or stderr. */ + assertEmptyFile("unpack.err"); + assertEmptyFile("unpack.out"); + + verify_tree(LIMIT_NONE); assertEqualInt(0, chdir("..")); }
CVS commit: src/external/bsd/libarchive/dist/test_utils
Module Name:src Committed By: christos Date: Fri Jan 17 00:38:19 UTC 2020 Added Files: src/external/bsd/libarchive/dist/test_utils: test_common.h test_main.c test_utils.c test_utils.h Log Message: Add back the test harness To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/bsd/libarchive/dist/test_utils/test_common.h \ src/external/bsd/libarchive/dist/test_utils/test_main.c \ src/external/bsd/libarchive/dist/test_utils/test_utils.c \ src/external/bsd/libarchive/dist/test_utils/test_utils.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/libarchive/dist/test_utils/test_common.h diff -u /dev/null src/external/bsd/libarchive/dist/test_utils/test_common.h:1.1 --- /dev/null Thu Jan 16 19:38:19 2020 +++ src/external/bsd/libarchive/dist/test_utils/test_common.h Thu Jan 16 19:38:19 2020 @@ -0,0 +1,457 @@ +/* + * Copyright (c) 2003-2017 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. + * + * $FreeBSD$ + */ + +#ifndef TEST_COMMON_H +#define TEST_COMMON_H + +/* + * The goal of this file (and the matching test.c) is to + * simplify the very repetitive test-*.c test programs. + */ +#if defined(HAVE_CONFIG_H) +/* Most POSIX platforms use the 'configure' script to build config.h */ +#include "config.h" +#elif defined(__FreeBSD__) +/* Building as part of FreeBSD system requires a pre-built config.h. */ +#include "config_freebsd.h" +#elif defined(__NetBSD__) +/* Building as part of NetBSD system requires a pre-built config.h. */ +#include "config_netbsd.h" +#elif defined(_WIN32) && !defined(__CYGWIN__) +/* Win32 can't run the 'configure' script. */ +#include "config_windows.h" +#else +/* Warn if the library hasn't been (automatically or manually) configured. */ +#error Oops: No config.h and no pre-built configuration in test.h. +#endif + +#include /* Windows requires this before sys/stat.h */ +#include + +#if HAVE_DIRENT_H +#include +#endif +#ifdef HAVE_DIRECT_H +#include +#define dirent direct +#endif +#include +#include +#ifdef HAVE_IO_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +#include +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#ifdef HAVE_ACL_LIBACL_H +#include +#endif +#ifdef HAVE_SYS_ACL_H +#include +#endif +#ifdef HAVE_SYS_RICHACL_H +#include +#endif +#ifdef HAVE_WINDOWS_H +#define NOCRYPT +#include +#include +#endif + +/* + * System-specific tweaks. We really want to minimize these + * as much as possible, since they make it harder to understand + * the mainline code. + */ + +/* Windows (including Visual Studio and MinGW but not Cygwin) */ +#if defined(_WIN32) && !defined(__CYGWIN__) +#if !defined(__BORLANDC__) +#undef chdir +#define chdir _chdir +#define strdup _strdup +#endif +#endif + +/* Visual Studio */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +#define snprintf sprintf_s +#endif + +#if defined(__BORLANDC__) +#pragma warn -8068 /* Constant out of range in comparison. */ +#endif + +/* Haiku OS and QNX */ +#if defined(__HAIKU__) || defined(__QNXNTO__) +/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ +#include +#endif + +/* Get a real definition for __FBSDID if we can */ +#if HAVE_SYS_CDEFS_H +#include +#endif + +/* If not, define it so as to avoid dangling semicolons. */ +#ifndef __FBSDID +#define __FBSDID(a) struct _undefined_hack +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifndef __LIBARCHIVE_TEST_COMMON +#define __LIBARCHIVE_TEST_COMMON +#endif + +#include "archive_platform_acl.h" +#define ARCHIVE_TEST_ACL_TYPE_POSIX1E 1 +#define ARCHIVE_TEST_ACL_TYPE_NFS4 2 + +#i
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Fri Jan 17 00:37:26 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_archive_write_set_format_filter_by_ext.c test_read_format_7zip.c test_sparse_basic.c test_write_format_zip_file.c test_write_format_zip_file_zip64.c Log Message: make things compile (pullup merged) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_sparse_basic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c:1.1.1.1 Thu Apr 20 08:55:56 2017 +++ src/external/bsd/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c Thu Jan 16 19:37:26 2020 @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); static void test_format_filter_by_ext(const char *output_file, -int format_id, int filter_id, int dot_stored, char * def_ext) +int format_id, int filter_id, int dot_stored, const char * def_ext) { struct archive_entry *ae; struct archive *a; Index: src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c:1.1.1.1 Thu Apr 20 08:55:53 2017 +++ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_7zip.c Thu Jan 16 19:37:26 2020 @@ -87,7 +87,7 @@ test_copy(int use_open_fd) * An archive file has no entry. */ static void -test_empty_archive() +test_empty_archive(void) { const char *refname = "test_read_format_7zip_empty_archive.7z"; struct archive_entry *ae; @@ -119,7 +119,7 @@ test_empty_archive() * in the archive file except for a header. */ static void -test_empty_file() +test_empty_file(void) { const char *refname = "test_read_format_7zip_empty_file.7z"; struct archive_entry *ae; @@ -609,7 +609,7 @@ test_bcj(const char *refname) * Extract a file compressed with PPMd. */ static void -test_ppmd() +test_ppmd(void) { const char *refname = "test_read_format_7zip_ppmd.7z"; struct archive_entry *ae; @@ -663,7 +663,7 @@ test_ppmd() } static void -test_symname() +test_symname(void) { const char *refname = "test_read_format_7zip_symbolic_name.7z"; struct archive_entry *ae; Index: src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c:1.1.1.1 Thu Apr 20 08:55:40 2017 +++ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file.c Thu Jan 16 19:37:26 2020 @@ -84,7 +84,7 @@ DEFINE_TEST(test_write_format_zip_file) unsigned char *central_header, *local_header, *eocd, *eocd_record; unsigned char *extension_start, *extension_end; char file_data[] = {'1', '2', '3', '4', '5', '6', '7', '8'}; - char *file_name = "file"; + const char *file_name = "file"; #ifndef HAVE_ZLIB_H zip_version = 10; Index: src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c:1.1.1.1 Thu Apr 20 08:55:49 2017 +++ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c Thu Jan 16 19:37:26 2020 @@ -86,7 +86,7 @@ DEFINE_TEST(test_write_format_zip_file_z unsigned char *central_header, *local_header, *eocd, *eocd_record; unsigned char *extension_start, *extension_end; char file_data[] = {'1', '2', '3', '4', '5', '6', '7', '8'}; - char *file_name = "file"; + const char *file_name = "file"; #ifndef HAVE_ZLIB_H zip_compression = 0; Index: src/external/bsd/li
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Fri Jan 17 00:37:03 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_write_disk_secure.c Log Message: fix test I broke by commenting out flags. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.2 src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.3 --- src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.2 Sun Jan 12 11:10:49 2020 +++ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c Thu Jan 16 19:37:03 2020 @@ -87,6 +87,7 @@ DEFINE_TEST(test_write_disk_secure) #endif /* Write an absolute symlink to /tmp. */ + archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_SYMLINKS); assert((ae = archive_entry_new()) != NULL); archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_symlink"); archive_entry_set_mode(ae, S_IFLNK | 0777);
CVS commit: src/external/bsd/libarchive/dist/libarchive/test
Module Name:src Committed By: christos Date: Fri Jan 17 00:36:20 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive/test: test_read_disk_directory_traversals.c Log Message: pull fix from head (O_EXEC means O_SEARCH only on FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c diff -u src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c:1.1.1.2 Wed Jul 24 09:50:38 2019 +++ src/external/bsd/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c Thu Jan 16 19:36:20 2020 @@ -1775,7 +1775,8 @@ test_parent(void) archive_entry_clear(ae); r = archive_read_next_header2(a, ae); if (r == ARCHIVE_FAILED) { -#if defined(O_PATH) || defined(O_SEARCH) || defined(O_EXEC) +#if defined(O_PATH) || defined(O_SEARCH) || \ + (defined(__FreeBSD__) && defined(O_EXEC)) assertEqualIntA(a, ARCHIVE_OK, r); #endif /* Close the disk object. */
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Tue Jan 14 19:29:45 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write_disk_posix.c Log Message: In the extract atomic case, remove the destination hard link first since it did not get removed before for us. If we wanted to do this right, we would do the mk*temp() file generation and trying to link instead of open, and finally when we got the link to succeed, we would rename the temp link to the final destination name, making hard link creation atomic. For now we just remove first. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.3 src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.3 Sun Jan 12 11:10:48 2020 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Tue Jan 14 14:29:45 2020 @@ -2301,6 +2301,8 @@ create_filesystem_object(struct archive_ } free(linkname_copy); archive_string_free(&error_string); + if (a->flags & ARCHIVE_EXTRACT_ATOMIC) + unlink(a->name); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: christos Date: Sun Jan 12 16:10:49 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write_disk_posix.c src/external/bsd/libarchive/dist/libarchive/test: test_write_disk_secure.c test_write_disk_secure744.c test_write_disk_secure746.c src/external/bsd/libarchive/dist/tar/test: test_option_U_upper.c test_symlink_dir.c Log Message: Leave pre-existing symlinks alone on extraction When libarchive encounters an existing symbolic link during extraction it removes that symbolic link first before overwriting it, unless it is told that it can trust symlinks from the archive. Placing symbolic links on known paths in the extracting subdirectory is a simple way that a system administrator can place data at a different location without having the overhead of a mountpoint. Trusting symlinks from an archive is never safe because they can maliciously overwrite files outside of the extraction directory. This patch adds a linked-list to track of the symbolic links that were created during extraction so that it does not trust them. This way during extraction, libarchive can remove the symlinks it created, but leave the pre-existing ones alone. Unit-tests were adjusted for this new behavior. (this is pull request 1300) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure744.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure746.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_option_U_upper.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/tar/test/test_symlink_dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c:1.2 Sun Jan 12 11:08:31 2020 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c Sun Jan 12 11:10:48 2020 @@ -188,6 +188,12 @@ struct fixup_entry { char *name; }; +struct symlink_entry { + dev_t sc_dev; + ino_t sc_ino; + struct symlink_entry *sc_next; +}; + /* * We use a bitmask to track which operations remain to be done for * this file. In particular, this helps us avoid unnecessary @@ -223,6 +229,7 @@ struct archive_write_disk { mode_t user_umask; struct fixup_entry *fixup_list; struct fixup_entry *current_fixup; + struct symlink_entry *symlink_list; int64_t user_uid; int skip_file_set; int64_t skip_file_dev; @@ -358,8 +365,9 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); -static int check_symlinks_fsobj(char *, int *, struct archive_string *, - int); +static int check_symlinks_fsobj(struct archive_write_disk *, char *, int *, + struct archive_string *, int); + static int check_symlinks(struct archive_write_disk *); static int create_filesystem_object(struct archive_write_disk *); static struct fixup_entry *current_fixup(struct archive_write_disk *, @@ -409,6 +417,39 @@ static ssize_t _archive_write_disk_data_ size_t, int64_t); static int +symlink_add(struct archive_write_disk *a, const struct stat *st) +{ + struct symlink_entry *sc = malloc(sizeof(*sc)); + if (sc == NULL) + return errno; + sc->sc_next = a->symlink_list; + a->symlink_list = sc->sc_next; + sc->sc_dev = st->st_dev; + sc->sc_ino = st->st_ino; + return 0; +} + +static int +symlink_find(struct archive_write_disk *a, const struct stat *st) +{ + for (struct symlink_entry *sc = a->symlink_list; sc; sc = sc->sc_next) + if (st->st_ino == sc->sc_ino && st->st_dev == sc->sc_dev) + return 1; + return 0; +} + +static void +symlink_free(struct archive_write_disk *a) +{ + for (struct symlink_entry *sc = a->symlink_list; sc; ) { + struct symlink_entry *next = sc->sc_next; + free(sc); + sc = next; + } + a->symlink_list = NULL; +} + +static int la_mktemp(struct archive_write_disk *a) { int oerrno, fd; @@ -2245,7 +2286,7 @@ create_filesystem_object(struct archive_ */ return (EPERM); } - r = check_symlinks_fsobj(linkname_copy, &error_number, + r = check_symlinks_fsobj(a, linkname_copy, &error_number, &error_string, a->flags); if (r != ARCHIVE_OK) { archive_set_error(&a->archive, error_number, "%s", @@ -2298,7 +2339,18 @
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: christos Date: Sun Jan 12 16:08:31 UTC 2020 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive.h archive_private.h archive_util.c archive_write_disk_posix.c src/external/bsd/libarchive/dist/tar: bsdtar.c Log Message: Introduce ARCHIVE_EXTRACT_ATOMIC and set it by default on bsdtar. This flag changes the way that regular files are extracted: Instead of removing existing files first and re-creating them in order to replace their contents, a temporary file is created and when writing to the temporary file is completed, the file is rename(2)d to the final destination name. This has the effect of presenting a consistent view of the file to the system (either the file with the new contents or the file with the old contents). Removing and overwriting the file has the undesired side effect that the the system can either not see the file at all (from the time it is being removed till the time it is being re-created), or worse it can see partial file contents. This is problematic when extracting system files (for example shared libraries). Perhaps there should be a flag to disable it, when for example it is not desirable because of space constraints, but then again one can specify to unlink the file before. (this is pull request 1289) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/libarchive/dist/libarchive/archive.h cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_private.h cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_util.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/libarchive/dist/tar/bsdtar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive.h diff -u src/external/bsd/libarchive/dist/libarchive/archive.h:1.4 src/external/bsd/libarchive/dist/libarchive/archive.h:1.5 --- src/external/bsd/libarchive/dist/libarchive/archive.h:1.4 Wed Jul 24 10:03:57 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive.h Sun Jan 12 11:08:31 2020 @@ -693,6 +693,8 @@ __LA_DECL int archive_read_set_passphras #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x1) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x2) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_ATOMIC (0x4) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); Index: src/external/bsd/libarchive/dist/libarchive/archive_private.h diff -u src/external/bsd/libarchive/dist/libarchive/archive_private.h:1.1.1.3 src/external/bsd/libarchive/dist/libarchive/archive_private.h:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_private.h:1.1.1.3 Thu Apr 20 08:55:34 2017 +++ src/external/bsd/libarchive/dist/libarchive/archive_private.h Sun Jan 12 11:08:31 2020 @@ -153,6 +153,7 @@ void __archive_errx(int retvalue, const void __archive_ensure_cloexec_flag(int fd); int __archive_mktemp(const char *tmpdir); +int __archive_mktempx(const char *tmpdir, struct archive_string *template); int __archive_clean(struct archive *); Index: src/external/bsd/libarchive/dist/libarchive/archive_util.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_util.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_util.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_util.c:1.1.1.4 Wed Jul 24 09:50:21 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive_util.c Sun Jan 12 11:08:31 2020 @@ -389,28 +389,33 @@ get_tempdir(struct archive_string *tempp */ int -__archive_mktemp(const char *tmpdir) +__archive_mktempx(const char *tmpdir, struct archive_string *template) { struct archive_string temp_name; int fd = -1; - archive_string_init(&temp_name); - if (tmpdir == NULL) { - if (get_tempdir(&temp_name) != ARCHIVE_OK) - goto exit_tmpfile; - } else { - archive_strcpy(&temp_name, tmpdir); - if (temp_name.s[temp_name.length-1] != '/') - archive_strappend_char(&temp_name, '/'); + if (template == NULL) { + archive_string_init(template = &temp_name); + if (tmpdir == NULL) { + if (get_tempdir(&temp_name) != ARCHIVE_OK) +goto exit_tmpfile; + } else { + archive_strcpy(&temp_name, tmpdir); + if (temp_name.s[temp_name.length-1] != '/') +archive_strappend_char(&temp_name, '/'); + } + archive_strcat(&temp_name, "libarchive_XX"); } - archive_strcat(&temp_name, "libarchive_XX"); - fd = mkstemp(temp_name.s); + fd = mkstemp(template->s); if (fd < 0) goto exit_tmpfile; __archive_ensure_cloexec_flag(fd); - unlink(temp_name.s); + + if (template == &temp_name) + unlink(temp_name.s); exit_tmpfile: - arc
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Mon Feb 5 12:13:54 UTC 2018 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_openssl_evp_private.h archive_openssl_hmac_private.h Log Message: undo previous. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h diff -u src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.2 src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.2 Mon Feb 5 05:26:06 2018 +++ src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h Mon Feb 5 07:13:54 2018 @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x100020bfL +#if OPENSSL_VERSION_NUMBER < 0x1010L #include /* malloc, free */ #include /* memset */ static inline EVP_MD_CTX *EVP_MD_CTX_new(void) Index: src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h diff -u src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.2 src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.2 Mon Feb 5 05:46:19 2018 +++ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h Mon Feb 5 07:13:54 2018 @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x100020bfL || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER < 0x1010L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void)
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: martin Date: Mon Feb 5 10:46:19 UTC 2018 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_openssl_hmac_private.h Log Message: Adapt the version hack for openssl provided inline functions: openssl 1.0.2k already provides the colliding definitions. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h diff -u src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h:1.1.1.1 Thu Apr 20 12:55:32 2017 +++ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h Mon Feb 5 10:46:19 2018 @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x1010L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER < 0x100020bfL || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void)
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: martin Date: Mon Feb 5 10:26:06 UTC 2018 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_openssl_evp_private.h Log Message: Try to fix the build: OpenSSL 1.0.2k already has the EVP inline functions. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h diff -u src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h:1.1.1.1 Thu Apr 20 12:55:35 2017 +++ src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h Mon Feb 5 10:26:06 2018 @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x1010L +#if OPENSSL_VERSION_NUMBER < 0x100020bfL #include /* malloc, free */ #include /* memset */ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Thu Apr 20 13:06:29 UTC 2017 Removed Files: src/external/bsd/libarchive/dist: README src/external/bsd/libarchive/dist/cpio/test: CMakeLists.txt list.h main.c test_pathmatch.c src/external/bsd/libarchive/dist/libarchive: archive_hash.h archive_read_disk.c archive_read_support_compression_all.c archive_read_support_compression_bzip2.c archive_read_support_compression_compress.c archive_read_support_compression_gzip.c archive_read_support_compression_none.c archive_read_support_compression_program.c archive_read_support_compression_rpm.c archive_read_support_compression_uu.c archive_read_support_compression_xz.c archive_write_disk.c archive_write_set_compression_bzip2.c archive_write_set_compression_compress.c archive_write_set_compression_gzip.c archive_write_set_compression_none.c archive_write_set_compression_program.c archive_write_set_compression_xz.c filter_fork.c src/external/bsd/libarchive/dist/libarchive/test: CMakeLists.txt list.h main.c test_acl_basic.c test_acl_freebsd.c test_read_compress_program.c test_read_format_iso_gz.c test_read_uu.c test_write_compress.c test_write_compress_bzip2.c test_write_compress_gzip.c test_write_compress_lzma.c test_write_compress_program.c test_write_compress_xz.c test_write_format_zip_no_compression.c src/external/bsd/libarchive/dist/libarchive_fe: matching.c matching.h pathmatch.c pathmatch.h src/external/bsd/libarchive/dist/tar: getdate.c tree.c tree.h src/external/bsd/libarchive/dist/tar/test: CMakeLists.txt list.h main.c test_getdate.c Log Message: GC old files. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/README cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/cpio/test/CMakeLists.txt cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/libarchive/dist/cpio/test/list.h \ src/external/bsd/libarchive/dist/cpio/test/test_pathmatch.c cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/libarchive/dist/cpio/test/main.c cvs rdiff -u -r1.1.1.2 -r0 \ src/external/bsd/libarchive/dist/libarchive/archive_hash.h \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_all.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_gzip.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_none.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_program.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_compress.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_gzip.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_none.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_program.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_rpm.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_uu.c \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_xz.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_xz.c cvs rdiff -u -r1.1.1.3 -r0 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_bzip2.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_compression_bzip2.c \ src/external/bsd/libarchive/dist/libarchive/filter_fork.c cvs rdiff -u -r1.3 -r0 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c cvs rdiff -u -r1.2 -r0 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/libarchive/test/CMakeLists.txt \ src/external/bsd/libarchive/dist/libarchive/test/test_acl_freebsd.c \ src/external/bsd/libarchive/dist/libarchive/test/test_read_uu.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_compress_bzip2.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_compress_gzip.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_compress_lzma.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_compress_xz.c \ src/external/bsd/libarchive/dist/libarchive/test/test_write_format_zip_no_compression.c cvs rdiff -u -r1.1.1.2 -r0 \ src/external/bsd/libarchive/dist/libarchive/test/list.h \ src/external/bsd/libarchive/dist/libarchive/test/test_acl_basic.c \ src/external/bsd/libarchive/dist/libarchive/test/
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: wiz Date: Thu Dec 29 20:11:50 UTC 2016 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write.3 Log Message: Do not mention non-existing archive_write_set_format_shar_binary. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.4 src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.5 --- src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.4 Sat Jul 20 21:40:04 2013 +++ src/external/bsd/libarchive/dist/libarchive/archive_write.3 Thu Dec 29 20:11:50 2016 @@ -33,7 +33,6 @@ .Nm archive_write_set_format_pax , .Nm archive_write_set_format_pax_restricted , .Nm archive_write_set_format_shar , -.Nm archive_write_set_format_shar_binary , .Nm archive_write_set_format_ustar , .Nm archive_write_get_bytes_per_block , .Nm archive_write_set_bytes_per_block , @@ -86,8 +85,6 @@ .Ft int .Fn archive_write_set_format_shar "struct archive *" .Ft int -.Fn archive_write_set_format_shar_binary "struct archive *" -.Ft int .Fn archive_write_set_format_ustar "struct archive *" .Ft int .Fn archive_write_set_format_options "struct archive *" "const char *" @@ -177,7 +174,6 @@ A value of -1 here indicates that the li Fn archive_write_set_format_pax , \ Fn archive_write_set_format_pax_restricted , \ Fn archive_write_set_format_shar , \ -Fn archive_write_set_format_shar_binary , \ Fn archive_write_set_format_ustar Sets the format that will be used for the archive. The library can write
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: wiz Date: Thu Dec 29 20:07:49 UTC 2016 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_entry.3 Log Message: Fix prototype. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive_entry.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_entry.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_entry.3:1.3 src/external/bsd/libarchive/dist/libarchive/archive_entry.3:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive_entry.3:1.3 Sat Jul 20 21:40:04 2013 +++ src/external/bsd/libarchive/dist/libarchive/archive_entry.3 Thu Dec 29 20:07:49 2016 @@ -159,8 +159,8 @@ .Fn archive_entry_clear "struct archive_entry *" .Ft struct archive_entry * .Fn archive_entry_clone "struct archive_entry *" -.Ft const char * * -.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const char *" +.Ft const char * +.Fn archive_entry_copy_fflags_text "struct archive_entry *" "const char *" .Ft const wchar_t * .Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const wchar_t *" .Ft void
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: wiz Date: Thu Dec 29 13:46:21 UTC 2016 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_disk.3 Log Message: Fix return type of two functions to match header. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.3 src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.3 Sat Jul 20 21:40:04 2013 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3 Thu Dec 29 13:46:21 2016 @@ -51,9 +51,9 @@ .Fn archive_read_disk_set_symlink_physical "struct archive *" .Ft int .Fn archive_read_disk_set_symlink_hybrid "struct archive *" -.Ft int +.Ft const char * .Fn archive_read_disk_gname "struct archive *" "gid_t" -.Ft int +.Ft const char * .Fn archive_read_disk_uname "struct archive *" "uid_t" .Ft int .Fo archive_read_disk_set_gname_lookup
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: abhinav Date: Mon Jun 6 14:45:15 UTC 2016 Modified Files: src/external/bsd/libarchive/dist/libarchive: libarchive-formats.5 Log Message: Fix reference to mtree(8) from mtree(1). While there fix the .Dt, make the document title all caps. Also, remove .Pp before .Bl. Ok from wiz@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5 diff -u src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5:1.2 --- src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5:1.1.1.2 Sat Feb 20 02:48:44 2010 +++ src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5 Mon Jun 6 14:45:15 2016 @@ -24,8 +24,8 @@ .\" .\" $FreeBSD: head/lib/libarchive/libarchive-formats.5 201077 2009-12-28 01:50:23Z kientzle $ .\" -.Dd December 27, 2009 -.Dt libarchive-formats 5 +.Dd May 31, 2016 +.Dt LIBARCHIVE-FORMATS 5 .Os .Sh NAME .Nm libarchive-formats @@ -65,7 +65,6 @@ Later variants have extended this by eit areas of the header record, extending the header to multiple records, or by storing special entries that modify the interpretation of subsequent entries. -.Pp .Bl -tag -width indent .It Cm gnutar The @@ -315,7 +314,7 @@ of a file hierarchy in which each line s provides specific metadata about that file. Libarchive can read all of the keywords supported by both the NetBSD and FreeBSD versions of -.Xr mtree 1 , +.Xr mtree 8 , although many of the keywords cannot currently be stored in an .Tn archive_entry object.
CVS commit: src/external/bsd/libarchive/dist/libarchive_fe
Module Name:src Committed By: joerg Date: Tue Jan 7 02:09:37 UTC 2014 Modified Files: src/external/bsd/libarchive/dist/libarchive_fe: err.c err.h Log Message: Annotate warnc/errc for format string checking. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive_fe/err.c \ src/external/bsd/libarchive/dist/libarchive_fe/err.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive_fe/err.c diff -u src/external/bsd/libarchive/dist/libarchive_fe/err.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive_fe/err.c:1.2 --- src/external/bsd/libarchive/dist/libarchive_fe/err.c:1.1.1.1 Sat Feb 20 02:49:07 2010 +++ src/external/bsd/libarchive/dist/libarchive_fe/err.c Tue Jan 7 02:09:37 2014 @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); const char *lafe_progname; -static void +static __printflike(2, 0) void lafe_vwarnc(int code, const char *fmt, va_list ap) { fprintf(stderr, "%s: ", lafe_progname); Index: src/external/bsd/libarchive/dist/libarchive_fe/err.h diff -u src/external/bsd/libarchive/dist/libarchive_fe/err.h:1.1.1.1 src/external/bsd/libarchive/dist/libarchive_fe/err.h:1.2 --- src/external/bsd/libarchive/dist/libarchive_fe/err.h:1.1.1.1 Sat Feb 20 02:49:07 2010 +++ src/external/bsd/libarchive/dist/libarchive_fe/err.h Tue Jan 7 02:09:37 2014 @@ -35,7 +35,8 @@ extern const char *lafe_progname; -void lafe_warnc(int code, const char *fmt, ...); -void lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD; +void lafe_warnc(int code, const char *fmt, ...) __printflike(2, 3); +void lafe_errc(int eval, int code, const char *fmt, ...) +__LA_DEAD __printflike(3, 4); #endif
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: mrg Date: Sat Oct 19 22:55:13 UTC 2013 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_write_set_format_shar.c Log Message: actually use the copied tmp_buf, for 3 byte-unaligned uudecode. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.1.1.2 Sat Feb 20 02:48:40 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c Sat Oct 19 22:55:13 2013 @@ -409,7 +409,7 @@ uuencode_group(const char _in[3], char o static void uuencode_line(struct shar *shar, const char *inbuf, size_t len) { - char tmp_buf[3], *buf; + char *buf; size_t alloc_len; /* len <= 45 -> expanded to 60 + len byte + new line */ @@ -426,13 +426,15 @@ uuencode_line(struct shar *shar, const c buf += 4; } if (len != 0) { + char tmp_buf[3]; + tmp_buf[0] = inbuf[0]; if (len == 1) tmp_buf[1] = '\0'; else tmp_buf[1] = inbuf[1]; tmp_buf[2] = '\0'; - uuencode_group(inbuf, buf); + uuencode_group(tmp_buf, buf); buf += 4; } *buf++ = '\n';
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Fri Sep 16 16:27:36 UTC 2011 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_check_magic.c Log Message: Use __dead To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c:1.1.1.2 Sat Feb 20 02:48:26 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c Fri Sep 16 16:27:36 2011 @@ -62,7 +62,7 @@ } } -static void +__dead static void diediedie(void) { #if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG)
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Tue Aug 16 14:08:36 UTC 2011 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_support_compression_compress.c Log Message: Revert. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.2 src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.2 Tue Aug 16 03:33:37 2011 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c Tue Aug 16 14:08:35 2011 @@ -362,7 +362,6 @@ } if (code > state->free_ent) { -out: /* An invalid code is a fatal error. */ archive_set_error(&(self->archive->archive), -1, "Invalid compressed data"); @@ -377,11 +376,6 @@ /* Generate output characters in reverse order. */ while (code >= 256) { - // XXX: long -> ptrdiff_t, but don't want to bother with - // autoconf for now. - if (state->stackp - state->stack >= - (long)(sizeof(state->stack) - 1)) - goto out; *state->stackp++ = state->suffix[code]; code = state->prefix[code]; }
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: christos Date: Tue Aug 16 03:33:37 UTC 2011 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_support_compression_compress.c Log Message: provisional fix for CVS-2011-2895, buffer overflow during decompress To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c:1.1.1.2 Fri Feb 19 21:48:30 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_support_compression_compress.c Mon Aug 15 23:33:37 2011 @@ -362,6 +362,7 @@ } if (code > state->free_ent) { +out: /* An invalid code is a fatal error. */ archive_set_error(&(self->archive->archive), -1, "Invalid compressed data"); @@ -376,6 +377,11 @@ /* Generate output characters in reverse order. */ while (code >= 256) { + // XXX: long -> ptrdiff_t, but don't want to bother with + // autoconf for now. + if (state->stackp - state->stack >= + (long)(sizeof(state->stack) - 1)) + goto out; *state->stackp++ = state->suffix[code]; code = state->prefix[code]; }
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: drochner Date: Tue Jul 12 18:19:13 UTC 2011 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive.h archive_read_support_format_iso9660.c archive_write_disk.c archive_write_set_format_ar.c archive_write_set_format_ustar.c Log Message: minor printf format fixes To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive.h cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive.h diff -u src/external/bsd/libarchive/dist/libarchive/archive.h:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive.h:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive.h:1.1.1.4 Wed Jul 14 22:10:45 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive.h Tue Jul 12 18:19:13 2011 @@ -719,7 +719,8 @@ __LA_DECL int archive_format(struct archive *); __LA_DECL void archive_clear_error(struct archive *); __LA_DECL void archive_set_error(struct archive *, int _err, - const char *fmt, ...); + const char *fmt, ...) + __attribute__((__format__(__printf__,3,4))); __LA_DECL void archive_copy_error(struct archive *dest, struct archive *src); __LA_DECL int archive_file_count(struct archive *); Index: src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c:1.1.1.2 Sat Feb 20 02:48:33 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Tue Jul 12 18:19:13 2011 @@ -919,7 +919,7 @@ if (parent->offset + parent->size > iso9660->volume_size) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Directory is beyond end-of-media: %s", - parent->name); + parent->name.s); return (ARCHIVE_WARN); } if (iso9660->current_position < parent->offset) { @@ -1215,7 +1215,7 @@ if (file->offset + file->size > iso9660->volume_size) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "File is beyond end-of-media: %s", file->name); + "File is beyond end-of-media: %s", file->name.s); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; return (ARCHIVE_WARN); @@ -1274,7 +1274,7 @@ if ((file->mode & AE_IFMT) != AE_IFDIR && file->offset < iso9660->current_position) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Ignoring out-of-order file @%x (%s) %jd < %jd", + "Ignoring out-of-order file @%p (%s) %jd < %jd", file, iso9660->pathname.s, file->offset, iso9660->current_position); Index: src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c:1.1.1.2 Sat Feb 20 02:48:39 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c Tue Jul 12 18:19:13 2011 @@ -439,8 +439,8 @@ if (ar->entry_padding != 1) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Padding wrong size: %d should be 1 or 0", - ar->entry_padding); + "Padding wrong size: %lld should be 1 or 0", + (long long)ar->entry_padding); return (ARCHIVE_WARN); } Index: src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c:1.1.1.2 Sat Feb 20 02:48:41 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c Tue Jul 12 18:19:13 2011 @@ -168,7 +168,7 @@ /* Basic internal sanity test. */ if (sizeof(template_header) != 512) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", sizeof(template_header)); + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %zd should be 512", sizeof(template_header)); return (ARCHIVE_FATAL); } I
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Wed Jul 14 22:13:58 UTC 2010 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read.3 archive_read_disk_entry_from_file.c Log Message: Merge libarchive 2.8.4 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive_read.3 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.3 src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.3 Sat Feb 20 02:51:33 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read.3 Wed Jul 14 22:13:58 2010 @@ -591,7 +591,7 @@ archive_read_support_format_all(a); archive_read_open(a, mydata, myopen, myread, myclose); while (archive_read_next_header(a, &entry) == ARCHIVE_OK) { -printf("%s\\n",archive_entry_pathname(entry)); +printf("%s\en",archive_entry_pathname(entry)); archive_read_data_skip(a); } archive_read_finish(a); Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.3 src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.3 Sun Mar 14 19:30:50 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Wed Jul 14 22:13:58 2010 @@ -210,7 +210,7 @@ acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); #else else if ((!a->follow_symlinks) - && (archive_entry_filetype(entry) == AE_IFLNK))) + && (archive_entry_filetype(entry) == AE_IFLNK)) /* We can't get the ACL of a symlink, so we assume it can't have one. */ acl = NULL; @@ -425,7 +425,8 @@ return (ARCHIVE_OK); } -#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE +#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE && \ +HAVE_DECL_EXTATTR_NAMESPACE_USER /* * FreeBSD extattr interface.
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Wed Jul 14 22:11:42 UTC 2010 Update of /cvsroot/src/external/bsd/libarchive/dist In directory ivanova.netbsd.org:/tmp/cvs-serv22095 Log Message: Import libarchive 2.8.4: Symlink dereference fix for Linux broke the build there; corrected. Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix. Improved reliability of hash function detection. Status: Vendor Tag: KIENTZLE Release Tags: libarchive-2-8-4 U src/external/bsd/libarchive/dist/README U src/external/bsd/libarchive/dist/COPYING U src/external/bsd/libarchive/dist/NEWS U src/external/bsd/libarchive/dist/cpio/cmdline.c U src/external/bsd/libarchive/dist/cpio/cpio.c U src/external/bsd/libarchive/dist/cpio/cpio.h U src/external/bsd/libarchive/dist/cpio/cpio_platform.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.c U src/external/bsd/libarchive/dist/cpio/bsdcpio.1 U src/external/bsd/libarchive/dist/cpio/test/main.c U src/external/bsd/libarchive/dist/cpio/test/test.h U src/external/bsd/libarchive/dist/cpio/test/test_0.c U src/external/bsd/libarchive/dist/cpio/test/test_basic.c U src/external/bsd/libarchive/dist/cpio/test/test_cmdline.c U src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat.c U src/external/bsd/libarchive/dist/cpio/test/test_option_B_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_C_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_J_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_L_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_Z_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_a.c U src/external/bsd/libarchive/dist/cpio/test/test_option_c.c U src/external/bsd/libarchive/dist/cpio/test/test_option_d.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.c U src/external/bsd/libarchive/dist/cpio/test/test_option_help.c U src/external/bsd/libarchive/dist/cpio/test/test_option_l.c U src/external/bsd/libarchive/dist/cpio/test/test_option_m.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_option_t.c U src/external/bsd/libarchive/dist/cpio/test/test_option_u.c U src/external/bsd/libarchive/dist/cpio/test/test_option_version.c U src/external/bsd/libarchive/dist/cpio/test/test_option_y.c U src/external/bsd/libarchive/dist/cpio/test/test_option_z.c U src/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_dotdot.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_reverse.c U src/external/bsd/libarchive/dist/cpio/test/test_pathmatch.c U src/external/bsd/libarchive/dist/cpio/test/list.h U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.crc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.newc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu U src/external/bsd/libarchive/dist/cpio/test/CMakeLists.txt N src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu N src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu N src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu N src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_f.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_m.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.stdout.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_tv.stdout.uu U src/external/bsd/libarchive/dist/libarchive/archive.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.h U src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c U src/external/bsd/libarchive/dist/libarchive/archive_crc32.h U src/external/bsd/libarchive/dist/libarchive/archive_endian.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_copy_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_link_resolver.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_private.h U src/external/bsd/libarchive/dist/libarchive/archive_entry_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_strmode.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_xattr.c U src/external/bsd/libarchive/dist/libarchive/archive_hash.h U src/external/bsd/libarchive/dist/libarchive/archive_platform.h U src/external/bsd/libarchive/dist/libarchive/archive_private.h U src/external/bsd/libarchive/dist/libarchive/archive_read.c U src/external/bsd/libarchive/dist/libarchive/cpio.5 U src/external/bsd/libarchive/d
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Sun Mar 14 19:30:50 UTC 2010 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_disk_entry_from_file.c Log Message: Merge for libarchive-2.8.2. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.2 src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.2 Sat Feb 20 02:53:09 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Sun Mar 14 19:30:50 2010 @@ -208,6 +208,12 @@ #if HAVE_ACL_GET_LINK_NP else if (!a->follow_symlinks) acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); +#else + else if ((!a->follow_symlinks) + && (archive_entry_filetype(entry) == AE_IFLNK))) + /* We can't get the ACL of a symlink, so we assume it can't + have one. */ + acl = NULL; #endif else acl = acl_get_file(accpath, ACL_TYPE_ACCESS);
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Sun Mar 14 19:20:30 UTC 2010 Update of /cvsroot/src/external/bsd/libarchive/dist In directory ivanova.netbsd.org:/tmp/cvs-serv24626 Log Message: libarchive-2.8.2: - Fix NULL deference for short self-extracting zip archives - Don't dereference symlinks on Linux when reading ACLs - Better detection of SHA2 support for old OpenSSL versions - Fix parsing of input files for bsdtar -T - Do not leak setup_xattr into the global namespace - Fix build when an older libarchive is already installed - Use O_BINARY opening files in bsdtar - Include missing archive_crc32.h - Correctly include iconv.h required by libxml2 Status: Vendor Tag: KIENTZLE Release Tags: libarchive-2-8-2 U src/external/bsd/libarchive/dist/README U src/external/bsd/libarchive/dist/COPYING U src/external/bsd/libarchive/dist/NEWS U src/external/bsd/libarchive/dist/cpio/cmdline.c U src/external/bsd/libarchive/dist/cpio/cpio.c U src/external/bsd/libarchive/dist/cpio/cpio.h U src/external/bsd/libarchive/dist/cpio/cpio_platform.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.c U src/external/bsd/libarchive/dist/cpio/bsdcpio.1 U src/external/bsd/libarchive/dist/cpio/test/main.c U src/external/bsd/libarchive/dist/cpio/test/test.h U src/external/bsd/libarchive/dist/cpio/test/test_0.c U src/external/bsd/libarchive/dist/cpio/test/test_basic.c U src/external/bsd/libarchive/dist/cpio/test/test_cmdline.c U src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat.c U src/external/bsd/libarchive/dist/cpio/test/test_option_B_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_C_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_J_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_L_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_Z_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_a.c U src/external/bsd/libarchive/dist/cpio/test/test_option_c.c U src/external/bsd/libarchive/dist/cpio/test/test_option_d.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.c U src/external/bsd/libarchive/dist/cpio/test/test_option_help.c U src/external/bsd/libarchive/dist/cpio/test/test_option_l.c U src/external/bsd/libarchive/dist/cpio/test/test_option_m.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_option_t.c U src/external/bsd/libarchive/dist/cpio/test/test_option_u.c U src/external/bsd/libarchive/dist/cpio/test/test_option_version.c U src/external/bsd/libarchive/dist/cpio/test/test_option_y.c U src/external/bsd/libarchive/dist/cpio/test/test_option_z.c U src/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_dotdot.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_reverse.c U src/external/bsd/libarchive/dist/cpio/test/test_pathmatch.c U src/external/bsd/libarchive/dist/cpio/test/list.h U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.crc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.newc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu U src/external/bsd/libarchive/dist/cpio/test/CMakeLists.txt U src/external/bsd/libarchive/dist/cpio/test/test_option_f.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_m.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.stdout.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_tv.stdout.uu U src/external/bsd/libarchive/dist/libarchive/archive.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.h U src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c N src/external/bsd/libarchive/dist/libarchive/archive_crc32.h U src/external/bsd/libarchive/dist/libarchive/archive_endian.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_copy_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_link_resolver.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_private.h U src/external/bsd/libarchive/dist/libarchive/archive_entry_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_strmode.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_xattr.c U src/external/bsd/libarchive/dist/libarchive/archive_hash.h U src/external/bsd/libarchive/dist/libarchive/archive_platform.h U src/external/bsd/libarchive/dist/libarchive/archive_private.h U src/external/bsd/libarchive/dist/libarchive/archive_read.c U src/external/bsd/libarchive/dist/libarchive/cpio.5 U src/external/bsd/libarchive/dist/libarchive/archive_read_data_into_fd.c U src/external/bs
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Sat Feb 20 02:53:09 UTC 2010 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_disk_entry_from_file.c Log Message: Do not leak setup_xattr into the public namespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c:1.1.1.1 Sat Feb 20 02:48:29 2010 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Sat Feb 20 02:53:09 2010 @@ -430,11 +430,11 @@ * to not include the system extattrs that hold ACLs; we handle * those separately. */ -int +static int setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd); -int +static int setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd) {
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Sat Feb 20 02:51:33 UTC 2010 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read.3 archive_read_disk.3 archive_write.3 archive_write_disk.3 Removed Files: src/external/bsd/libarchive/dist/cpio: err.c matching.c matching.h pathmatch.c pathmatch.h src/external/bsd/libarchive/dist/cpio/test: test_option_B.c test_option_L.c test_option_ell.c src/external/bsd/libarchive/dist/libarchive: config_freebsd.h config_windows.h src/external/bsd/libarchive/dist/libarchive/test: test_compat_gtar_1.tgz.uu test_pax_filename_encoding.tar.gz.uu test_read_format_gtar_sparse_1_13.tgz.uu test_read_format_gtar_sparse_1_17.tgz.uu test_read_format_gtar_sparse_1_17_posix00.tgz.uu test_read_format_gtar_sparse_1_17_posix01.tgz.uu test_read_format_gtar_sparse_1_17_posix10.tgz.uu test_read_format_isorr_bz2.iso.bz2.uu src/external/bsd/libarchive/dist/tar: getdate.y matching.c siginfo.c src/external/bsd/libarchive/dist/tar/test: test_option_T.c Log Message: Merge changes To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/cpio/err.c \ src/external/bsd/libarchive/dist/cpio/matching.c \ src/external/bsd/libarchive/dist/cpio/matching.h \ src/external/bsd/libarchive/dist/cpio/pathmatch.c \ src/external/bsd/libarchive/dist/cpio/pathmatch.h cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/cpio/test/test_option_B.c \ src/external/bsd/libarchive/dist/cpio/test/test_option_L.c \ src/external/bsd/libarchive/dist/cpio/test/test_option_ell.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_read.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3 cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/libarchive/config_freebsd.h \ src/external/bsd/libarchive/dist/libarchive/config_windows.h cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/libarchive/test/test_compat_gtar_1.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_pax_filename_encoding.tar.gz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu \ src/external/bsd/libarchive/dist/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/tar/getdate.y \ src/external/bsd/libarchive/dist/tar/matching.c \ src/external/bsd/libarchive/dist/tar/siginfo.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/libarchive/dist/tar/test/test_option_T.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2 src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.3 --- src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2 Thu Oct 15 17:26:57 2009 +++ src/external/bsd/libarchive/dist/libarchive/archive_read.3 Sat Feb 20 02:51:33 2010 @@ -22,23 +22,32 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/archive_read.3,v 1.37 2008/05/26 17:00:22 kientzle Exp $ +.\" $FreeBSD: head/lib/libarchive/archive_read.3 191595 2009-04-27 20:13:13Z kientzle $ .\" -.Dd August 19, 2006 +.Dd April 13, 2009 .Dt archive_read 3 .Os .Sh NAME .Nm archive_read_new , +.Nm archive_read_set_filter_options , +.Nm archive_read_set_format_options , +.Nm archive_read_set_options , .Nm archive_read_support_compression_all , .Nm archive_read_support_compression_bzip2 , .Nm archive_read_support_compression_compress , .Nm archive_read_support_compression_gzip , +.Nm archive_read_support_compression_lzma , .Nm archive_read_support_compression_none , +.Nm archive_read_support_compression_xz , .Nm archive_read_support_compression_program , +.Nm archive_read_support_compression_program_signature , .Nm archive_read_support_format_all , +.Nm archive_read_support_format_ar , .Nm archive_read_support_format_cpio , .Nm archive_read_support_format_empty , .Nm archive_read_support_format_iso9660 , +.Nm
CVS commit: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Sat Feb 20 02:49:21 UTC 2010 Update of /cvsroot/src/external/bsd/libarchive/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21324 Log Message: Import libarchive 2.8.0: - Infrastructure: - Allow command line tools as fallback for missing compression libraries. If compiled without gzip for example, gunzip will be used automatically. - Improved support for a number of platforms like high-resolution timestamps and Extended Attributes on various Unix systems - New convience interface for creating archives based on disk content, complement of the archive_write_disk interface. - Frontends: - bsdcpio ready for public consumption - hand-written date parser replaces the yacc code - Filter system: - Simplified read filter chains - Option support for filters - LZMA, XZ, uudecode handled - Format support: - Write support for mtree files based on file system or archive content - Basic read support for Joliet - Write support for zip files - Write support for shar archives, both text-only and binary-safe Status: Vendor Tag: KIENTZLE Release Tags: libarchive-2-8-0 N src/external/bsd/libarchive/dist/README U src/external/bsd/libarchive/dist/COPYING U src/external/bsd/libarchive/dist/NEWS U src/external/bsd/libarchive/dist/cpio/cmdline.c U src/external/bsd/libarchive/dist/cpio/cpio.c U src/external/bsd/libarchive/dist/cpio/cpio.h U src/external/bsd/libarchive/dist/cpio/cpio_platform.h N src/external/bsd/libarchive/dist/cpio/cpio_windows.h N src/external/bsd/libarchive/dist/cpio/cpio_windows.c U src/external/bsd/libarchive/dist/cpio/bsdcpio.1 U src/external/bsd/libarchive/dist/cpio/test/main.c U src/external/bsd/libarchive/dist/cpio/test/test.h U src/external/bsd/libarchive/dist/cpio/test/test_0.c U src/external/bsd/libarchive/dist/cpio/test/test_basic.c N src/external/bsd/libarchive/dist/cpio/test/test_cmdline.c U src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat.c N src/external/bsd/libarchive/dist/cpio/test/test_option_B_upper.c N src/external/bsd/libarchive/dist/cpio/test/test_option_C_upper.c N src/external/bsd/libarchive/dist/cpio/test/test_option_J_upper.c N src/external/bsd/libarchive/dist/cpio/test/test_option_L_upper.c N src/external/bsd/libarchive/dist/cpio/test/test_option_Z_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_a.c U src/external/bsd/libarchive/dist/cpio/test/test_option_c.c U src/external/bsd/libarchive/dist/cpio/test/test_option_d.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.c U src/external/bsd/libarchive/dist/cpio/test/test_option_help.c N src/external/bsd/libarchive/dist/cpio/test/test_option_l.c U src/external/bsd/libarchive/dist/cpio/test/test_option_m.c N src/external/bsd/libarchive/dist/cpio/test/test_option_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_option_t.c U src/external/bsd/libarchive/dist/cpio/test/test_option_u.c U src/external/bsd/libarchive/dist/cpio/test/test_option_version.c U src/external/bsd/libarchive/dist/cpio/test/test_option_y.c U src/external/bsd/libarchive/dist/cpio/test/test_option_z.c U src/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c N src/external/bsd/libarchive/dist/cpio/test/test_passthrough_dotdot.c N src/external/bsd/libarchive/dist/cpio/test/test_passthrough_reverse.c U src/external/bsd/libarchive/dist/cpio/test/test_pathmatch.c U src/external/bsd/libarchive/dist/cpio/test/list.h U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.crc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.newc.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu N src/external/bsd/libarchive/dist/cpio/test/CMakeLists.txt U src/external/bsd/libarchive/dist/cpio/test/test_option_f.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_m.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.stdout.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_tv.stdout.uu U src/external/bsd/libarchive/dist/libarchive/archive.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.h U src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c U src/external/bsd/libarchive/dist/libarchive/archive_endian.h U src/external/bsd/libarchive/dist/libarchive/archive_entry.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_copy_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_link_resolver.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_private.h U src/external/bsd/libarchive/dist/libarchive/archive_entry_stat.c U src/external/bsd/libarchive/dist/libarchive/archive_entry_strmode.c N src/external/bsd/libarchive/dist/libarchive/archive_entry_xattr.c N src/external/bsd/l
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Thu Oct 15 17:26:57 UTC 2009 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read.3 archive_write.3 archive_write_disk.3 Log Message: Do not use .Xo/.Xc to work around ancient groff limits. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_read.3 Thu Oct 15 17:26:57 2009 @@ -176,13 +176,11 @@ Allocates and initializes a .Tn struct archive object suitable for reading from an archive. -.It Xo -.Fn archive_read_support_compression_all , -.Fn archive_read_support_compression_bzip2 , -.Fn archive_read_support_compression_compress , -.Fn archive_read_support_compression_gzip , -.Fn archive_read_support_compression_none -.Xc +.It Fn archive_read_support_compression_all , \ +Fn archive_read_support_compression_bzip2 , \ +Fn archive_read_support_compression_compress , \ +Fn archive_read_support_compression_gzip , \ +Fn archive_read_support_compression_none Enables auto-detection code and decompression support for the specified compression. Note that @@ -196,14 +194,12 @@ Note that this disables automatic detection of the compression format, so it makes no sense to specify this in conjunction with any other decompression option. -.It Xo -.Fn archive_read_support_format_all , -.Fn archive_read_support_format_cpio , -.Fn archive_read_support_format_empty , -.Fn archive_read_support_format_iso9660 , -.Fn archive_read_support_format_tar , -.Fn archive_read_support_format_zip -.Xc +.It Fn archive_read_support_format_all , \ +Fn archive_read_support_format_cpio , \ +Fn archive_read_support_format_empty , \ +Fn archive_read_support_format_iso9660 , \ +Fn archive_read_support_format_tar , \ +Fn archive_read_support_format_zip Enables support---including auto-detection code---for the specified archive format. For example, Index: src/external/bsd/libarchive/dist/libarchive/archive_write.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_write.3 Thu Oct 15 17:26:57 2009 @@ -167,14 +167,12 @@ .It Fn archive_write_get_bytes_in_last_block Retrieve the currently-set value for last block size. A value of -1 here indicates that the library should use default values. -.It Xo -.Fn archive_write_set_format_cpio , -.Fn archive_write_set_format_pax , -.Fn archive_write_set_format_pax_restricted , -.Fn archive_write_set_format_shar , -.Fn archive_write_set_format_shar_binary , -.Fn archive_write_set_format_ustar -.Xc +.It Fn archive_write_set_format_cpio , \ +Fn archive_write_set_format_pax , \ +Fn archive_write_set_format_pax_restricted , \ +Fn archive_write_set_format_shar , \ +Fn archive_write_set_format_shar_binary , \ +Fn archive_write_set_format_ustar Sets the format that will be used for the archive. The library can write POSIX octet-oriented cpio format archives, @@ -198,12 +196,10 @@ is the library default; this is the same as pax format, but suppresses the pax extended header for most normal files. In most cases, this will result in ordinary ustar archives. -.It Xo -.Fn archive_write_set_compression_bzip2 , -.Fn archive_write_set_compression_compress , -.Fn archive_write_set_compression_gzip , -.Fn archive_write_set_compression_none -.Xc +.It Fn archive_write_set_compression_bzip2 , \ +Fn archive_write_set_compression_compress , \ +Fn archive_write_set_compression_gzip , \ +Fn archive_write_set_compression_none The resulting archive will be compressed as specified. Note that the compressed output is always properly blocked. .It Fn archive_write_set_compression_program Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 Thu Oct 15 17:26:57 2009 @@ -174,10 +174,8 @@ Scan data for blocks of NUL bytes and try to recreate them with holes. This r