summaryrefslogtreecommitdiff
path: root/external/bsd/libarchive
AgeCommit message (Collapse)Author
2023-06-10libarchive: fail if name_max is 0lukem
Add error handling to the USE_READDIR_R code paths that set name_max from struct statfs or statvfs; if the determined name_max == 0 then return an error. Avoids a crash in tree_dir_next_posix() when the calculation of dirent_size from name_max is too small for the memory allocated for struct dirent. Submitted to upstream in pull request https://github.com/libarchive/libarchive/pull/1903 Should fix PR bin/56080
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-05-08Elide OpenSSL-3 deprecation warningchristos
2022-07-22Build and install pkgconfig files for liblzma and libarchivewiz
2021-04-12new GCC_NO_* uses for warning issues. most of the users of the newmrg
GCC_NO_RETURN_LOCAL_ADDR are bugs in GCC itself, not the code.
2021-03-29PR/56083: RVP: tar -c hangs when reading from FUSE-ext2 filesystems sincechristos
it returns 0 for statvfs members and libarchive handles only -1. Centralize the transfer setting code.
2021-01-28Don't try print an error message when there is none.christos
2021-01-28PR/55962: Andreas Gustafsson: Some tar(1) error messages lack file name andchristos
newline
2020-09-05avoid always passing NULL to printf()-like functionsmrg
2020-08-28PR/55612: Martin Husemann: libarchive tests pollute /tmp w/o cleanupchristos
Make tests obey $TMPDIR.
2020-08-14PR/55568: Andreas Gustafsson: Set the error when failing to create a temp file.christos
2020-05-16Add ACL support for FFS. From FreeBSD.christos
2020-04-22Add missing break'schristos
2020-04-22make variable constant since it is assigned from a string literalchristos
2020-02-27Fix undefined behavior in archive_read_support_format_xar()kamil
Cherry-pick upstream patch: From 2cfda000bc5159d46fd8ead7d1bd3ea1f66f7948 Mon Sep 17 00:00:00 2001 From: Martin Matuska <martin@matuska.org> 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
2020-02-27Fix undefined behavior in from_hex()kamil
Cherry-pick upstream patch: From 4a5fc0b980a23d1a317c7a564a94cca090e111c2 Mon Sep 17 00:00:00 2001 From: Martin Matuska <martin@matuska.org> 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
2020-02-25Avoid NULL pointer arithmetickamil
Cherry-pick upstream patch: From ec5b86b48e99c5501374b01606f1ccdae6a8a93e Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski <n54@gmx.com> 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
2020-02-10When extracting symlinks atomically remove them like we do for hard links.christos
2020-01-21Fix printf formats in tests for the clang build.christos
2020-01-17Extract a second time to exercise extracting hardlinks over existing hardlinks.christos
2020-01-17Don't remove the test harness utilities (the tests were not removed alreadychristos
which is the majority of the files), we can use them for atf now.
2020-01-17Add back the test harnesschristos
2020-01-17make things compile (pullup merged)christos
2020-01-17fix test I broke by commenting out flags.christos
2020-01-17pull fix from head (O_EXEC means O_SEARCH only on FreeBSD)christos
2020-01-14In the extract atomic case, remove the destination hard link firstchristos
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.
2020-01-12Leave pre-existing symlinks alone on extractionchristos
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)
2020-01-12Introduce ARCHIVE_EXTRACT_ATOMIC and set it by default on bsdtar.christos
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)
2019-10-24Switch the iconv(3) prototype to the POSIX conformant variationkamil
Remove const from the 2nd argument. const char ** and char ** are incompatible types and it was a cost to keep the technically incompatible form for a more purist variation. NetBSD was almost the last alive OS to still keep the const argument (known leftovers: Minix and Illumos). Keep the const form for the internal purposes inside citrus and rump. Address the build breakage fallout in the same change. There are no ABI changes. Change accepted by core@.
2019-10-13introduce some common variables for use in GCC warning disables:mrg
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong."
2019-07-30Add libpthread to DPADD and LDADD, as libarchive now references itmartin
2019-07-24Update build glue and configuration for libarchive 3.4.0.joerg
2019-07-24Avoid ctype warning due to missing cast.joerg
2019-07-24Merge changes from libarchive 3.4.0.joerg
2019-07-24Import libarchive 3.4.0joerg
2019-02-04- use -Wno-error=implicit-fallthrough with GCC7.mrg
2018-02-05undo previous.christos
2018-02-05Adapt the version hack for openssl provided inline functions: openssl 1.0.2kmartin
already provides the colliding definitions.
2018-02-05Try to fix the build: OpenSSL 1.0.2k already has the EVP inline functions.martin
2018-02-04switch everyone to openssl.oldchristos
2017-05-21Simplify linking libarchive with libcryptokamil
2017-05-21Remove MKCRYPTO option.riastradh
Originally, MKCRYPTO was introduced because the United States classified cryptography as a munition and restricted its export. The export controls were substantially relaxed fifteen years ago, and are essentially irrelevant for software with published source code. In the intervening time, nobody bothered to remove the option after its motivation -- the US export restriction -- was eliminated. I'm not aware of any other operating system that has a similar option; I expect it is mainly out of apathy for churn that we still have it. Today, cryptography is an essential part of modern computing -- you can't use the internet responsibly without cryptography. The position of the TNF board of directors is that TNF makes no representation that MKCRYPTO=no satisfies any country's cryptography regulations. My personal position is that the availability of cryptography is a basic human right; that any local laws restricting it to a privileged few are fundamentally immoral; and that it is wrong for developers to spend effort crippling cryptography to work around such laws. As proposed on tech-crypto, tech-security, and tech-userlevel to no objections: https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of *bad* crypto that was conditional on it, e.g. DES in telnet... That should probably be removed too, but on the grounds that it is bad, not on the grounds that it is (nominally) crypto.
2017-04-22Obey MKCRYPTO.christos
2017-04-20Tell GCC to shut up about strftime format strings.joerg
2017-04-20Update build system for libarchive-3.3.2pre.joerg
2017-04-20GC old files.joerg
2017-04-20Merge libarchive-3-3-2pre.joerg
2017-04-20Import libarchive 3.3.2pre (7ad477ea7655f3dfcdcfa5adcb792f0ec864969d).joerg
2017-01-12we JAVE_SSIZE max.christos
2016-12-29Do not mention non-existing archive_write_set_format_shar_binary.wiz