mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
libarchive: merge from vendor branch
Libarchive 3.7.3 New features: #1941 uudecode filter: support file name and file mode in raw mode #1943 7-zip reader: translate Windows permissions into UNIX permissions #1962 zstd filter now supports the "long" write option #2012 add trailing letter b to bsdtar(1) substitute pattern #2031 PCRE2 support #2054 add support for long options "--group" and "--owner" to tar(1) Security fixes: #2101 Fix possible vulnerability in tar error reporting introduced in f27c173 Important bugfixes: #1974 ISO9660: preserve the natural order of links #2105 rar5: fix infinite loop if during rar5 decompression the last block produced no data #2027 xz filter: fix incorrect eof at the end of an lzip member #2043 zip: fix end-of-data marker processing when decompressing zip archives PR: 278315 (exp-run) MFC after: 1 week
This commit is contained in:
commit
b9128a37fa
725 changed files with 5753 additions and 1753 deletions
|
|
@ -1,18 +0,0 @@
|
|||
# To use this config on you editor, follow the instructions at:
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.sh]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
24
contrib/libarchive/.github/workflows/cifuzz.yml
vendored
24
contrib/libarchive/.github/workflows/cifuzz.yml
vendored
|
|
@ -1,24 +0,0 @@
|
|||
name: CIFuzz
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build Fuzzers
|
||||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'libarchive'
|
||||
dry-run: false
|
||||
- name: Run Fuzzers
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'libarchive'
|
||||
fuzz-seconds: 600
|
||||
dry-run: false
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v1
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: artifacts
|
||||
path: ./out/artifacts
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
Apr 08, 2024: libarchive 3.7.3 released
|
||||
|
||||
Sep 12, 2023: libarchive 3.7.2 released
|
||||
|
||||
Jul 29, 2023: libarchive 3.7.1 released
|
||||
|
||||
Jul 18, 2023: libarchive 3.7.0 released
|
||||
|
|
|
|||
|
|
@ -1,115 +0,0 @@
|
|||
# ============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compile_check_sizeof.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks for the size of TYPE using compile checks, not run
|
||||
# checks. You can supply extra HEADERS to look into. the check will cycle
|
||||
# through 1 2 4 8 16 and any EXTRA_SIZES the user supplies. If a match is
|
||||
# found, it will #define SIZEOF_`TYPE' to that value. Otherwise it will
|
||||
# emit a configure time error indicating the size of the type could not be
|
||||
# determined.
|
||||
#
|
||||
# The trick is that C will not allow duplicate case labels. While this is
|
||||
# valid C code:
|
||||
#
|
||||
# switch (0) case 0: case 1:;
|
||||
#
|
||||
# The following is not:
|
||||
#
|
||||
# switch (0) case 0: case 0:;
|
||||
#
|
||||
# Thus, the AC_COMPILE_IFELSE will fail if the currently tried size does
|
||||
# not match.
|
||||
#
|
||||
# Here is an example skeleton configure.in script, demonstrating the
|
||||
# macro's usage:
|
||||
#
|
||||
# AC_PROG_CC
|
||||
# AC_CHECK_HEADERS(stddef.h unistd.h)
|
||||
# AC_TYPE_SIZE_T
|
||||
# AC_CHECK_TYPE(ssize_t, int)
|
||||
#
|
||||
# headers='#ifdef HAVE_STDDEF_H
|
||||
# #include <stddef.h>
|
||||
# #endif
|
||||
# #ifdef HAVE_UNISTD_H
|
||||
# #include <unistd.h>
|
||||
# #endif
|
||||
# '
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(char)
|
||||
# AX_COMPILE_CHECK_SIZEOF(short)
|
||||
# AX_COMPILE_CHECK_SIZEOF(int)
|
||||
# AX_COMPILE_CHECK_SIZEOF(long)
|
||||
# AX_COMPILE_CHECK_SIZEOF(unsigned char *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(void *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(size_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(off_t, $headers)
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Kaveh Ghazi <ghazi@caip.rutgers.edu>
|
||||
# Copyright (c) 2017 Reini Urban <rurban@cpan.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 8
|
||||
|
||||
AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF])
|
||||
AC_DEFUN([AX_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size])
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
|
@ -22,8 +22,6 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 1, 2014
|
||||
.Dt BSDCAT 1
|
||||
.Os
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "bsdcat_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
|
|
@ -37,6 +36,9 @@ __FBSDID("$FreeBSD$");
|
|||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
|
||||
#include "bsdcat.h"
|
||||
#include "err.h"
|
||||
|
||||
|
|
@ -48,7 +50,7 @@ static const char *bsdcat_current_path;
|
|||
static int exit_status = 0;
|
||||
|
||||
|
||||
void
|
||||
static __LA_NORETURN void
|
||||
usage(FILE *stream, int eval)
|
||||
{
|
||||
const char *p;
|
||||
|
|
@ -58,7 +60,7 @@ usage(FILE *stream, int eval)
|
|||
exit(eval);
|
||||
}
|
||||
|
||||
static void
|
||||
static __LA_NORETURN void
|
||||
version(void)
|
||||
{
|
||||
printf("bsdcat %s - %s \n",
|
||||
|
|
@ -67,7 +69,15 @@ version(void)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
bsdcat_print_error(void)
|
||||
{
|
||||
lafe_warnc(0, "%s: %s",
|
||||
bsdcat_current_path, archive_error_string(a));
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
bsdcat_next(void)
|
||||
{
|
||||
if (a != NULL) {
|
||||
|
|
@ -82,15 +92,7 @@ bsdcat_next(void)
|
|||
archive_read_support_format_raw(a);
|
||||
}
|
||||
|
||||
void
|
||||
bsdcat_print_error(void)
|
||||
{
|
||||
lafe_warnc(0, "%s: %s",
|
||||
bsdcat_current_path, archive_error_string(a));
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
bsdcat_read_to_stdout(const char* filename)
|
||||
{
|
||||
int r;
|
||||
|
|
@ -130,12 +132,16 @@ main(int argc, char **argv)
|
|||
switch (c) {
|
||||
case 'h':
|
||||
usage(stdout, 0);
|
||||
break;
|
||||
/* NOTREACHED */
|
||||
/* Fallthrough */
|
||||
case OPTION_VERSION:
|
||||
version();
|
||||
break;
|
||||
/* NOTREACHED */
|
||||
/* Fallthrough */
|
||||
default:
|
||||
usage(stderr, 1);
|
||||
/* Fallthrough */
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
|
||||
struct bsdcat {
|
||||
/* Option parser state */
|
||||
int getopt_state;
|
||||
|
|
@ -53,9 +50,5 @@ enum {
|
|||
};
|
||||
|
||||
int bsdcat_getopt(struct bsdcat *);
|
||||
void usage(FILE *stream, int eval);
|
||||
void bsdcat_next(void);
|
||||
void bsdcat_print_error(void);
|
||||
void bsdcat_read_to_stdout(const char* filename);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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: src/usr.bin/tar/bsdtar_platform.h,v 1.26 2008/12/06 07:37:14 kientzle Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -42,16 +40,6 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/* Get a real definition for __FBSDID if we can */
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/* If not, define it so as to avoid dangling semicolons. */
|
||||
#ifndef __FBSDID
|
||||
#define __FBSDID(a) struct _undefined_hack
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
/* If we're using the platform libarchive, include system headers. */
|
||||
#include <archive.h>
|
||||
|
|
@ -64,12 +52,14 @@
|
|||
|
||||
/* How to mark functions that don't return. */
|
||||
/* This facilitates use of some newer static code analysis tools. */
|
||||
#undef __LA_DEAD
|
||||
#undef __LA_NORETURN
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2 || \
|
||||
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
||||
#define __LA_DEAD __attribute__((__noreturn__))
|
||||
#else
|
||||
#define __LA_DEAD
|
||||
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
||||
#define __LA_NORETURN __attribute__((__noreturn__))
|
||||
#elif defined(_MSC_VER)
|
||||
#define __LA_NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#define __LA_NORETURN
|
||||
#endif
|
||||
|
||||
#endif /* !BSDCAT_PLATFORM_H_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
*/
|
||||
|
||||
#include "bsdcat_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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$
|
||||
*/
|
||||
|
||||
/* Every test program should #include "test.h" as the first thing. */
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 16, 2014
|
||||
.Dt CPIO 1
|
||||
.Os
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
|
||||
#include "cpio_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
|
||||
#include "cpio_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <archive.h>
|
||||
|
|
@ -108,22 +107,22 @@ static int entry_to_archive(struct cpio *, struct archive_entry *);
|
|||
static int file_to_archive(struct cpio *, const char *);
|
||||
static void free_cache(struct name_cache *cache);
|
||||
static void list_item_verbose(struct cpio *, struct archive_entry *);
|
||||
static void long_help(void) __LA_DEAD;
|
||||
static __LA_NORETURN void long_help(void);
|
||||
static const char *lookup_gname(struct cpio *, gid_t gid);
|
||||
static int lookup_gname_helper(struct cpio *,
|
||||
const char **name, id_t gid);
|
||||
static const char *lookup_uname(struct cpio *, uid_t uid);
|
||||
static int lookup_uname_helper(struct cpio *,
|
||||
const char **name, id_t uid);
|
||||
static void mode_in(struct cpio *) __LA_DEAD;
|
||||
static void mode_list(struct cpio *) __LA_DEAD;
|
||||
static __LA_NORETURN void mode_in(struct cpio *);
|
||||
static __LA_NORETURN void mode_list(struct cpio *);
|
||||
static void mode_out(struct cpio *);
|
||||
static void mode_pass(struct cpio *, const char *);
|
||||
static const char *remove_leading_slash(const char *);
|
||||
static int restore_time(struct cpio *, struct archive_entry *,
|
||||
const char *, int fd);
|
||||
static void usage(void) __LA_DEAD;
|
||||
static void version(void) __LA_DEAD;
|
||||
static __LA_NORETURN void usage(void);
|
||||
static __LA_NORETURN void version(void);
|
||||
static const char * passphrase_callback(struct archive *, void *);
|
||||
static void passphrase_free(char *);
|
||||
|
||||
|
|
@ -251,7 +250,7 @@ main(int argc, char *argv[])
|
|||
break;
|
||||
case 'h':
|
||||
long_help();
|
||||
break;
|
||||
/* NOTREACHED */
|
||||
case 'I': /* NetBSD/OpenBSD */
|
||||
cpio->filename = cpio->argument;
|
||||
break;
|
||||
|
|
@ -358,7 +357,7 @@ main(int argc, char *argv[])
|
|||
break;
|
||||
case OPTION_VERSION: /* GNU convention */
|
||||
version();
|
||||
break;
|
||||
/* NOTREACHED */
|
||||
#if 0
|
||||
/*
|
||||
* cpio_getopt() handles -W specially, so it's not
|
||||
|
|
@ -427,7 +426,7 @@ main(int argc, char *argv[])
|
|||
mode_list(cpio);
|
||||
else
|
||||
mode_in(cpio);
|
||||
break;
|
||||
/* NOTREACHED */
|
||||
case 'p':
|
||||
if (*cpio->argv == NULL || **cpio->argv == '\0')
|
||||
lafe_errc(1, 0,
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 CPIO_H_INCLUDED
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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$
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -46,16 +44,6 @@
|
|||
#include "cpio_windows.h"
|
||||
#endif
|
||||
|
||||
/* Get a real definition for __FBSDID if we can */
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/* If not, define it so as to avoid dangling semicolons. */
|
||||
#ifndef __FBSDID
|
||||
#define __FBSDID(a) struct _undefined_hack
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
/* If we're using the platform libarchive, include system headers. */
|
||||
#include <archive.h>
|
||||
|
|
@ -69,9 +57,11 @@
|
|||
/* How to mark functions that don't return. */
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2 || \
|
||||
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
||||
#define __LA_DEAD __attribute__((__noreturn__))
|
||||
#define __LA_NORETURN __attribute__((__noreturn__))
|
||||
#elif defined(_MSC_VER)
|
||||
#define __LA_NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#define __LA_DEAD
|
||||
#define __LA_NORETURN
|
||||
#endif
|
||||
|
||||
#endif /* !CPIO_PLATFORM_H_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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$
|
||||
*/
|
||||
|
||||
/* Every test program should #include "test.h" as the first thing. */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* This first test does basic sanity checks on the environment. For
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
static void
|
||||
verify_files(const char *msg)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* Test the command-line parsing.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_Z)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_bz2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_grz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_gz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_lrz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_lz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_lz4)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_lzma)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_lzo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_xz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_extract_cpio_zstd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/* Number of bytes needed to pad 'n' to multiple of 'block', assuming
|
||||
* that 'block' is a power of two. This trick can be more easily
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
static void
|
||||
unpack_test(const char *from, const char *options, const char *se)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_gcpio_compat_ref.bin
|
||||
MQW%9`*IWI('H`^@#`@````U'=YD%````"@!F:6QE```Q,C,T-38W.#D*QW%9
|
||||
M`*IWI('H`^@#`@````U'=YD)````"@!L:6YK9FEL90``,3(S-#4V-S@Y"L=Q
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_gcpio_compat_ref.crc
|
||||
M,#<P-S`R,#`S,S<W86$P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
|
||||
M,C0W,&0Y.3<W,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4Y,#`P,#`P,#`P,#`P
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_gcpio_compat_ref.newc
|
||||
M,#<P-S`Q,#`S,S<W86$P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
|
||||
M,C0W,&0Y.3<W,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4Y,#`P,#`P,#`P,#`P
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_gcpio_compat_ref.ustar
|
||||
M9FEL90``````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_missing_file)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
DEFINE_TEST(test_option_B_upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
DEFINE_TEST(test_option_C_upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_J_upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/* This is a little pointless, as Windows doesn't support symlinks
|
||||
* (except for the seriously crippled CreateSymbolicLink API) so these
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_Z_upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#elif defined(HAVE_SYS_UTIME_H)
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_b64encode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
static int
|
||||
is_octal(const char *p, size_t l)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
DEFINE_TEST(test_option_d)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* Unpack the archive in a new dir.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_option_f.cpio
|
||||
M,#<P-S`W,#`P,3,Q-C(Q-38Q,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
|
||||
M,#`P,3`W,S4Q,3(U,C8P,#`P,#4P,#`P,#`P,#`P,&$Q,C,`,#<P-S`W,#`P
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_grzip)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* Test that "--help", "-h", and "-W help" options all work and
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_l)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_lrzip)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_lz4)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_lzma)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_lzop)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
DEFINE_TEST(test_option_m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_option_m.cpio
|
||||
M,#<P-S`W,#`P,3,Q-#4P,#8T,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
|
||||
M,#`P,#`P,#`P,#`P,#$P,#`P,#4P,#`P,#`P,#`P,&9I;&4`,#<P-S`W,#`P
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_passphrase)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_option_t.cpio
|
||||
M,#<P-S`W,#`P,3,Q-#4P,#8T,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
|
||||
M,#`P,#`P,#`P,#`P,#$P,#`P,#4P,#`P,#`P,#`P,&9I;&4`,#<P-S`W,#`P
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_option_t.stdout
|
||||
%9FEL90H`
|
||||
`
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
$FreeBSD$
|
||||
begin 644 test_option_tv.stdout
|
||||
M+7)W+7(M+7(M+2`@(#$@=&EM("`@("`@=&EM("`@("`@("`@("`@(#`@1&5C
|
||||
/(#,Q("`Q.38Y(&9I;&4*
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#elif defined(HAVE_SYS_UTIME_H)
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_u)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_uuencode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_xz)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_y)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_z)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_option_zstd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "../cpio.h"
|
||||
#include "err.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* Verify that "cpio -p .." works.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* As reported by Bernd Walter: Some people are in the habit of
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_H_INCLUDED
|
||||
|
|
@ -36,7 +34,7 @@
|
|||
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
|
||||
*/
|
||||
/* Note: Compiler will complain if this does not match archive_entry.h! */
|
||||
#define ARCHIVE_VERSION_NUMBER 3007001
|
||||
#define ARCHIVE_VERSION_NUMBER 3007003
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <stddef.h> /* for wchar_t */
|
||||
|
|
@ -157,7 +155,7 @@ __LA_DECL int archive_version_number(void);
|
|||
/*
|
||||
* Textual name/version of the library, useful for version displays.
|
||||
*/
|
||||
#define ARCHIVE_VERSION_ONLY_STRING "3.7.1"
|
||||
#define ARCHIVE_VERSION_ONLY_STRING "3.7.3"
|
||||
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
|
||||
__LA_DECL const char * archive_version_string(void);
|
||||
|
||||
|
|
@ -535,6 +533,10 @@ __LA_DECL int archive_read_open_filenames(struct archive *,
|
|||
const char **_filenames, size_t _block_size);
|
||||
__LA_DECL int archive_read_open_filename_w(struct archive *,
|
||||
const wchar_t *_filename, size_t _block_size);
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
__LA_DECL int archive_read_open_filenames_w(struct archive *,
|
||||
const wchar_t **_filenames, size_t _block_size);
|
||||
#endif
|
||||
/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
|
||||
__LA_DECL int archive_read_open_file(struct archive *,
|
||||
const char *_filename, size_t _block_size) __LA_DEPRECATED;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_ACL_PRIVATE_H_INCLUDED
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
|
@ -62,7 +61,7 @@ errmsg(const char *m)
|
|||
}
|
||||
}
|
||||
|
||||
static __LA_DEAD void
|
||||
static __LA_NORETURN void
|
||||
diediedie(void)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG)
|
||||
|
|
@ -99,13 +98,12 @@ archive_handle_type_name(unsigned m)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
static void
|
||||
write_all_states(char *buff, unsigned int states)
|
||||
{
|
||||
unsigned int lowbit;
|
||||
|
||||
buff[0] = '\0';
|
||||
*buff = '\0';
|
||||
|
||||
/* A trick for computing the lowest set bit. */
|
||||
while ((lowbit = states & (1 + ~states)) != 0) {
|
||||
|
|
@ -114,7 +112,6 @@ write_all_states(char *buff, unsigned int states)
|
|||
if (states != 0)
|
||||
strcat(buff, "/");
|
||||
}
|
||||
return buff;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -160,16 +157,19 @@ __archive_check_magic(struct archive *a, unsigned int magic,
|
|||
|
||||
if ((a->state & state) == 0) {
|
||||
/* If we're already FATAL, don't overwrite the error. */
|
||||
if (a->state != ARCHIVE_STATE_FATAL)
|
||||
if (a->state != ARCHIVE_STATE_FATAL) {
|
||||
write_all_states(states1, a->state);
|
||||
write_all_states(states2, state);
|
||||
archive_set_error(a, -1,
|
||||
"INTERNAL ERROR: Function '%s' invoked with"
|
||||
" archive structure in state '%s',"
|
||||
" should be in state '%s'",
|
||||
function,
|
||||
write_all_states(states1, a->state),
|
||||
write_all_states(states2, state));
|
||||
states1,
|
||||
states2);
|
||||
}
|
||||
a->state = ARCHIVE_STATE_FATAL;
|
||||
return (ARCHIVE_FATAL);
|
||||
}
|
||||
return ARCHIVE_OK;
|
||||
return (ARCHIVE_OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
#include "archive_platform.h"
|
||||
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_CMDLINE_PRIVATE_H
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_CRC32_H
|
||||
|
|
|
|||
|
|
@ -424,8 +424,8 @@ static int
|
|||
aes_ctr_release(archive_crypto_ctx *ctx)
|
||||
{
|
||||
EVP_CIPHER_CTX_free(ctx->ctx);
|
||||
memset(ctx->key, 0, ctx->key_len);
|
||||
memset(ctx->nonce, 0, sizeof(ctx->nonce));
|
||||
OPENSSL_cleanse(ctx->key, ctx->key_len);
|
||||
OPENSSL_cleanse(ctx->nonce, sizeof(ctx->nonce));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ win_crypto_Update(Digest_CTX *ctx, const unsigned char *buf, size_t len)
|
|||
#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
BCryptHashData(ctx->hHash,
|
||||
(PUCHAR)(uintptr_t)buf,
|
||||
len, 0);
|
||||
(ULONG)len, 0);
|
||||
#else
|
||||
CryptHashData(ctx->hash,
|
||||
(unsigned char *)(uintptr_t)buf,
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
* Borrowed from FreeBSD's <sys/endian.h>
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 2, 2012
|
||||
.Dt ARCHIVE_ENTRY 3
|
||||
.Os
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -372,6 +371,12 @@ archive_entry_filetype(struct archive_entry *entry)
|
|||
return (AE_IFMT & entry->acl.mode);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_filetype_is_set(struct archive_entry *entry)
|
||||
{
|
||||
return (entry->ae_set & AE_SET_FILETYPE);
|
||||
}
|
||||
|
||||
void
|
||||
archive_entry_fflags(struct archive_entry *entry,
|
||||
unsigned long *set, unsigned long *clear)
|
||||
|
|
@ -425,6 +430,12 @@ archive_entry_gid(struct archive_entry *entry)
|
|||
return (entry->ae_stat.aest_gid);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_gid_is_set(struct archive_entry *entry)
|
||||
{
|
||||
return (entry->ae_set & AE_SET_GID);
|
||||
}
|
||||
|
||||
const char *
|
||||
archive_entry_gname(struct archive_entry *entry)
|
||||
{
|
||||
|
|
@ -631,6 +642,12 @@ archive_entry_perm(struct archive_entry *entry)
|
|||
return (~AE_IFMT & entry->acl.mode);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_perm_is_set(struct archive_entry *entry)
|
||||
{
|
||||
return (entry->ae_set & AE_SET_PERM);
|
||||
}
|
||||
|
||||
dev_t
|
||||
archive_entry_rdev(struct archive_entry *entry)
|
||||
{
|
||||
|
|
@ -759,6 +776,12 @@ archive_entry_uid(struct archive_entry *entry)
|
|||
return (entry->ae_stat.aest_uid);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_uid_is_set(struct archive_entry *entry)
|
||||
{
|
||||
return (entry->ae_set & AE_SET_UID);
|
||||
}
|
||||
|
||||
const char *
|
||||
archive_entry_uname(struct archive_entry *entry)
|
||||
{
|
||||
|
|
@ -827,6 +850,7 @@ archive_entry_set_filetype(struct archive_entry *entry, unsigned int type)
|
|||
entry->stat_valid = 0;
|
||||
entry->acl.mode &= ~AE_IFMT;
|
||||
entry->acl.mode |= AE_IFMT & type;
|
||||
entry->ae_set |= AE_SET_FILETYPE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -861,6 +885,7 @@ archive_entry_set_gid(struct archive_entry *entry, la_int64_t g)
|
|||
{
|
||||
entry->stat_valid = 0;
|
||||
entry->ae_stat.aest_gid = g;
|
||||
entry->ae_set |= AE_SET_GID;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1145,6 +1170,7 @@ archive_entry_set_mode(struct archive_entry *entry, mode_t m)
|
|||
{
|
||||
entry->stat_valid = 0;
|
||||
entry->acl.mode = m;
|
||||
entry->ae_set |= AE_SET_PERM | AE_SET_FILETYPE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1220,6 +1246,7 @@ archive_entry_set_perm(struct archive_entry *entry, mode_t p)
|
|||
entry->stat_valid = 0;
|
||||
entry->acl.mode &= AE_IFMT;
|
||||
entry->acl.mode |= ~AE_IFMT & p;
|
||||
entry->ae_set |= AE_SET_PERM;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1354,6 +1381,7 @@ archive_entry_set_uid(struct archive_entry *entry, la_int64_t u)
|
|||
{
|
||||
entry->stat_valid = 0;
|
||||
entry->ae_stat.aest_uid = u;
|
||||
entry->ae_set |= AE_SET_UID;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -22,15 +22,13 @@
|
|||
* 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 ARCHIVE_ENTRY_H_INCLUDED
|
||||
#define ARCHIVE_ENTRY_H_INCLUDED
|
||||
|
||||
/* Note: Compiler will complain if this does not match archive.h! */
|
||||
#define ARCHIVE_VERSION_NUMBER 3007001
|
||||
#define ARCHIVE_VERSION_NUMBER 3007003
|
||||
|
||||
/*
|
||||
* Note: archive_entry.h is for use outside of libarchive; the
|
||||
|
|
@ -251,11 +249,13 @@ __LA_DECL int archive_entry_dev_is_set(struct archive_entry *);
|
|||
__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *);
|
||||
__LA_DECL dev_t archive_entry_devminor(struct archive_entry *);
|
||||
__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *);
|
||||
__LA_DECL int archive_entry_filetype_is_set(struct archive_entry *);
|
||||
__LA_DECL void archive_entry_fflags(struct archive_entry *,
|
||||
unsigned long * /* set */,
|
||||
unsigned long * /* clear */);
|
||||
__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *);
|
||||
__LA_DECL la_int64_t archive_entry_gid(struct archive_entry *);
|
||||
__LA_DECL int archive_entry_gid_is_set(struct archive_entry *);
|
||||
__LA_DECL const char *archive_entry_gname(struct archive_entry *);
|
||||
__LA_DECL const char *archive_entry_gname_utf8(struct archive_entry *);
|
||||
__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *);
|
||||
|
|
@ -274,6 +274,7 @@ __LA_DECL const char *archive_entry_pathname(struct archive_entry *);
|
|||
__LA_DECL const char *archive_entry_pathname_utf8(struct archive_entry *);
|
||||
__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *);
|
||||
__LA_DECL __LA_MODE_T archive_entry_perm(struct archive_entry *);
|
||||
__LA_DECL int archive_entry_perm_is_set(struct archive_entry *);
|
||||
__LA_DECL dev_t archive_entry_rdev(struct archive_entry *);
|
||||
__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *);
|
||||
__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *);
|
||||
|
|
@ -287,6 +288,7 @@ __LA_DECL const char *archive_entry_symlink_utf8(struct archive_entry *);
|
|||
__LA_DECL int archive_entry_symlink_type(struct archive_entry *);
|
||||
__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *);
|
||||
__LA_DECL la_int64_t archive_entry_uid(struct archive_entry *);
|
||||
__LA_DECL int archive_entry_uid_is_set(struct archive_entry *);
|
||||
__LA_DECL const char *archive_entry_uname(struct archive_entry *);
|
||||
__LA_DECL const char *archive_entry_uname_utf8(struct archive_entry *);
|
||||
__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_ENTRY_LOCALE_H_INCLUDED
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_ENTRY_PRIVATE_H_INCLUDED
|
||||
|
|
@ -147,6 +145,10 @@ struct archive_entry {
|
|||
#define AE_SET_SIZE 64
|
||||
#define AE_SET_INO 128
|
||||
#define AE_SET_DEV 256
|
||||
#define AE_SET_PERM 512
|
||||
#define AE_SET_FILETYPE 1024
|
||||
#define AE_SET_UID 2048
|
||||
#define AE_SET_GID 4096
|
||||
|
||||
/*
|
||||
* Use aes here so that we get transparent mbs<->wcs conversions.
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "archive.h"
|
||||
#include "archive_entry.h"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 2, 2012
|
||||
.Dt ARCHIVE_ENTRY_TIME 3
|
||||
.Os
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
* 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 ARCHIVE_GETDATE_H_INCLUDED
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
#define ARCHIVE_OPTIONS_PRIVATE_H_INCLUDED
|
||||
|
||||
#include "archive_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "archive_private.h"
|
||||
|
||||
typedef int (*option_handler)(struct archive *a,
|
||||
|
|
|
|||
|
|
@ -33,13 +33,6 @@
|
|||
|
||||
#include "archive_platform.h"
|
||||
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD$");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue