mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Merge ^/head r311812 through r311939.
This commit is contained in:
commit
8a6fe8ce60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang400-import/; revision=311940
@ -151,6 +151,11 @@ OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_
|
||||
OLD_DIRS+=usr/lib/clang/3.9.1/lib/freebsd
|
||||
OLD_DIRS+=usr/lib/clang/3.9.1/lib
|
||||
OLD_DIRS+=usr/lib/clang/3.9.1
|
||||
# 20170110: Four files from ggate tests consolidated into one
|
||||
OLD_FILES+=usr/tests/sys/geom/class/gate/1_test
|
||||
OLD_FILES+=usr/tests/sys/geom/class/gate/2_test
|
||||
OLD_FILES+=usr/tests/sys/geom/class/gate/3_test
|
||||
OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh
|
||||
# 20170103: libbsnmptools.so made into an INTERNALLIB
|
||||
OLD_FILES+=usr/lib/libbsnmptools.a
|
||||
OLD_FILES+=usr/lib/libbsnmptools_p.a
|
||||
@ -161,8 +166,8 @@ OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz
|
||||
# 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu
|
||||
OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu
|
||||
# 20161229: Three files from gnop tests consolidated into one
|
||||
OLD_FILES+=usr/tests/sys/geom/class/nop/1_test.sh
|
||||
OLD_FILES+=usr/tests/sys/geom/class/nop/2_test.sh
|
||||
OLD_FILES+=usr/tests/sys/geom/class/nop/1_test
|
||||
OLD_FILES+=usr/tests/sys/geom/class/nop/2_test
|
||||
OLD_FILES+=usr/tests/sys/geom/class/nop/conf.sh
|
||||
# 20161217: new clang import which bumps version from 3.9.0 to 3.9.1.
|
||||
OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h
|
||||
|
5
UPDATING
5
UPDATING
@ -56,6 +56,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
||||
Please see the 20141231 entry below for information about prerequisites
|
||||
and upgrading, if you are not already using clang 3.5.0 or higher.
|
||||
|
||||
20170109:
|
||||
The igb(4), em(4) and lem(4) ethernet drivers are now implemented via
|
||||
IFLIB. If you have a custom kernel configuration that excludes em(4)
|
||||
but you use igb(4), you need to re-add em(4) to your custom configuration.
|
||||
|
||||
20161217:
|
||||
Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.1.
|
||||
Please see the 20141231 entry below for information about prerequisites
|
||||
|
@ -786,7 +786,8 @@ append_entry_w(wchar_t **wp, const wchar_t *prefix, int type,
|
||||
} else if (tag == ARCHIVE_ENTRY_ACL_USER
|
||||
|| tag == ARCHIVE_ENTRY_ACL_GROUP) {
|
||||
append_id_w(wp, id);
|
||||
id = -1;
|
||||
if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0)
|
||||
id = -1;
|
||||
}
|
||||
/* Solaris style has no second colon after other and mask */
|
||||
if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0)
|
||||
@ -1042,7 +1043,8 @@ append_entry(char **p, const char *prefix, int type,
|
||||
} else if (tag == ARCHIVE_ENTRY_ACL_USER
|
||||
|| tag == ARCHIVE_ENTRY_ACL_GROUP) {
|
||||
append_id(p, id);
|
||||
id = -1;
|
||||
if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0)
|
||||
id = -1;
|
||||
}
|
||||
/* Solaris style has no second colon after other and mask */
|
||||
if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0)
|
||||
@ -1328,6 +1330,7 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text,
|
||||
tag == ARCHIVE_ENTRY_ACL_GROUP) {
|
||||
n = 1;
|
||||
name = field[1];
|
||||
isint_w(name.start, name.end, &id);
|
||||
} else
|
||||
n = 0;
|
||||
|
||||
@ -1799,6 +1802,7 @@ archive_acl_from_text_l(struct archive_acl *acl, const char *text,
|
||||
tag == ARCHIVE_ENTRY_ACL_GROUP) {
|
||||
n = 1;
|
||||
name = field[1];
|
||||
isint(name.start, name.end, &id);
|
||||
} else
|
||||
n = 0;
|
||||
|
||||
|
@ -526,6 +526,11 @@ setup_acls(struct archive_read_disk *a,
|
||||
|
||||
/* Only directories can have default ACLs. */
|
||||
if (S_ISDIR(archive_entry_mode(entry))) {
|
||||
#if HAVE_ACL_GET_FD_NP
|
||||
if (*fd >= 0)
|
||||
acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT);
|
||||
else
|
||||
#endif
|
||||
acl = acl_get_file(accpath, ACL_TYPE_DEFAULT);
|
||||
if (acl != NULL) {
|
||||
r = translate_acl(a, entry, acl,
|
||||
@ -581,7 +586,10 @@ static struct {
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}
|
||||
};
|
||||
#endif
|
||||
static int
|
||||
|
@ -675,7 +675,7 @@ setup_suitable_read_buffer(struct archive_read_disk *a)
|
||||
asize = cf->min_xfer_size;
|
||||
|
||||
/* Increase a buffer size up to 64K bytes in
|
||||
* a proper incremant size. */
|
||||
* a proper increment size. */
|
||||
while (asize < 1024*64)
|
||||
asize += incr;
|
||||
/* Take a margin to adjust to the filesystem
|
||||
@ -1656,7 +1656,7 @@ setup_current_filesystem(struct archive_read_disk *a)
|
||||
archive_set_error(&a->archive, errno, "statvfs failed");
|
||||
return (ARCHIVE_FAILED);
|
||||
} else if (xr == 1) {
|
||||
/* Usuall come here unless NetBSD supports _PC_REC_XFER_ALIGN
|
||||
/* Usually come here unless NetBSD supports _PC_REC_XFER_ALIGN
|
||||
* for pathconf() function. */
|
||||
t->current_filesystem->xfer_align = sfs.f_frsize;
|
||||
t->current_filesystem->max_xfer_size = -1;
|
||||
@ -1944,7 +1944,7 @@ setup_current_filesystem(struct archive_read_disk *a)
|
||||
if (nm == -1)
|
||||
# endif /* _PC_NAME_MAX */
|
||||
/*
|
||||
* Some sysmtes (HP-UX or others?) incorrectly defined
|
||||
* Some systems (HP-UX or others?) incorrectly defined
|
||||
* NAME_MAX macro to be a smaller value.
|
||||
*/
|
||||
# if defined(NAME_MAX) && NAME_MAX >= 255
|
||||
|
@ -180,7 +180,7 @@ lz4_reader_bid(struct archive_read_filter_bidder *self,
|
||||
return (0);
|
||||
bits_checked += 8;
|
||||
BD = buffer[5];
|
||||
/* A block maximum size shuld be more than 3. */
|
||||
/* A block maximum size should be more than 3. */
|
||||
if (((BD & 0x70) >> 4) < 4)
|
||||
return (0);
|
||||
/* Reserved bits must be "0". */
|
||||
@ -417,7 +417,7 @@ lz4_filter_read_descriptor(struct archive_read_filter *self)
|
||||
/* Reserved bits must be zero. */
|
||||
if (bd & 0x8f)
|
||||
goto malformed_error;
|
||||
/* Get a maxinum block size. */
|
||||
/* Get a maximum block size. */
|
||||
switch (read_buf[1] >> 4) {
|
||||
case 4: /* 64 KB */
|
||||
state->flags.block_maximum_size = 64 * 1024;
|
||||
@ -627,7 +627,7 @@ lz4_filter_read_default_stream(struct archive_read_filter *self, const void **p)
|
||||
|
||||
if (state->stage == SELECT_STREAM) {
|
||||
state->stage = READ_DEFAULT_STREAM;
|
||||
/* First, read a desciprtor. */
|
||||
/* First, read a descriptor. */
|
||||
if((ret = lz4_filter_read_descriptor(self)) != ARCHIVE_OK)
|
||||
return (ret);
|
||||
state->stage = READ_DEFAULT_BLOCK;
|
||||
|
@ -436,7 +436,7 @@ lzop_filter_read(struct archive_read_filter *self, const void **p)
|
||||
}
|
||||
|
||||
/*
|
||||
* Drive lzo uncompresison.
|
||||
* Drive lzo uncompression.
|
||||
*/
|
||||
out_size = (lzo_uint)state->uncompressed_size;
|
||||
r = lzo1x_decompress_safe(b, (lzo_uint)state->compressed_size,
|
||||
|
@ -552,7 +552,7 @@ skip_sfx(struct archive_read *a, ssize_t bytes_avail)
|
||||
/*
|
||||
* If bytes_avail > SFX_MIN_ADDR we do not have to call
|
||||
* __archive_read_seek() at this time since we have
|
||||
* alredy had enough data.
|
||||
* already had enough data.
|
||||
*/
|
||||
if (bytes_avail > SFX_MIN_ADDR)
|
||||
__archive_read_consume(a, SFX_MIN_ADDR);
|
||||
@ -760,7 +760,7 @@ archive_read_format_7zip_read_header(struct archive_read *a,
|
||||
symsize += size;
|
||||
}
|
||||
if (symsize == 0) {
|
||||
/* If there is no synname, handle it as a regular
|
||||
/* If there is no symname, handle it as a regular
|
||||
* file. */
|
||||
zip_entry->mode &= ~AE_IFMT;
|
||||
zip_entry->mode |= AE_IFREG;
|
||||
@ -3288,7 +3288,7 @@ read_stream(struct archive_read *a, const void **buff, size_t size,
|
||||
return (r);
|
||||
|
||||
/*
|
||||
* Skip the bytes we alrady has skipped in skip_stream().
|
||||
* Skip the bytes we already has skipped in skip_stream().
|
||||
*/
|
||||
while (skip_bytes) {
|
||||
ssize_t skipped;
|
||||
@ -3506,7 +3506,7 @@ setup_decode_folder(struct archive_read *a, struct _7z_folder *folder,
|
||||
return (ARCHIVE_FATAL);
|
||||
}
|
||||
|
||||
/* Allocate memory for the decorded data of a sub
|
||||
/* Allocate memory for the decoded data of a sub
|
||||
* stream. */
|
||||
b[i] = malloc((size_t)zip->folder_outbytes_remaining);
|
||||
if (b[i] == NULL) {
|
||||
@ -3591,7 +3591,7 @@ skip_stream(struct archive_read *a, size_t skip_bytes)
|
||||
if (zip->folder_index == 0) {
|
||||
/*
|
||||
* Optimization for a list mode.
|
||||
* Avoid unncecessary decoding operations.
|
||||
* Avoid unnecessary decoding operations.
|
||||
*/
|
||||
zip->si.ci.folders[zip->entry->folderIndex].skipped_bytes
|
||||
+= skip_bytes;
|
||||
|
@ -322,7 +322,7 @@ struct iso9660 {
|
||||
|
||||
struct archive_string pathname;
|
||||
char seenRockridge; /* Set true if RR extensions are used. */
|
||||
char seenSUSP; /* Set true if SUSP is beging used. */
|
||||
char seenSUSP; /* Set true if SUSP is being used. */
|
||||
char seenJoliet;
|
||||
|
||||
unsigned char suspOffset;
|
||||
|
@ -1711,7 +1711,7 @@ lha_crc16(uint16_t crc, const void *pp, size_t len)
|
||||
*/
|
||||
for (;len >= 8; len -= 8) {
|
||||
/* This if statement expects compiler optimization will
|
||||
* remove the stament which will not be executed. */
|
||||
* remove the statement which will not be executed. */
|
||||
#undef bswap16
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */
|
||||
# define bswap16(x) _byteswap_ushort(x)
|
||||
|
@ -906,7 +906,7 @@ archive_read_format_rar_read_header(struct archive_read *a,
|
||||
sizeof(rar->reserved2));
|
||||
}
|
||||
|
||||
/* Main header is password encrytped, so we cannot read any
|
||||
/* Main header is password encrypted, so we cannot read any
|
||||
file names or any other info about files from the header. */
|
||||
if (rar->main_flags & MHD_PASSWORD)
|
||||
{
|
||||
|
@ -204,13 +204,14 @@ static int archive_read_format_tar_read_header(struct archive_read *,
|
||||
struct archive_entry *);
|
||||
static int checksum(struct archive_read *, const void *);
|
||||
static int pax_attribute(struct archive_read *, struct tar *,
|
||||
struct archive_entry *, const char *key, const char *value);
|
||||
struct archive_entry *, const char *key, const char *value,
|
||||
size_t value_length);
|
||||
static int pax_attribute_acl(struct archive_read *, struct tar *,
|
||||
struct archive_entry *, const char *, int);
|
||||
static int pax_attribute_xattr(struct archive_entry *, const char *,
|
||||
const char *);
|
||||
static int pax_header(struct archive_read *, struct tar *,
|
||||
struct archive_entry *, char *attr);
|
||||
struct archive_entry *, struct archive_string *);
|
||||
static void pax_time(const char *, int64_t *sec, long *nanos);
|
||||
static ssize_t readline(struct archive_read *, struct tar *, const char **,
|
||||
ssize_t limit, size_t *);
|
||||
@ -1483,7 +1484,7 @@ header_pax_extensions(struct archive_read *a, struct tar *tar,
|
||||
* and then skip any fields in the standard header that were
|
||||
* defined in the pax header.
|
||||
*/
|
||||
err2 = pax_header(a, tar, entry, tar->pax_header.s);
|
||||
err2 = pax_header(a, tar, entry, &tar->pax_header);
|
||||
err = err_combine(err, err2);
|
||||
tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
|
||||
return (err);
|
||||
@ -1564,16 +1565,17 @@ header_ustar(struct archive_read *a, struct tar *tar,
|
||||
*/
|
||||
static int
|
||||
pax_header(struct archive_read *a, struct tar *tar,
|
||||
struct archive_entry *entry, char *attr)
|
||||
struct archive_entry *entry, struct archive_string *in_as)
|
||||
{
|
||||
size_t attr_length, l, line_length;
|
||||
size_t attr_length, l, line_length, value_length;
|
||||
char *p;
|
||||
char *key, *value;
|
||||
struct archive_string *as;
|
||||
struct archive_string_conv *sconv;
|
||||
int err, err2;
|
||||
char *attr = in_as->s;
|
||||
|
||||
attr_length = strlen(attr);
|
||||
attr_length = in_as->length;
|
||||
tar->pax_hdrcharset_binary = 0;
|
||||
archive_string_empty(&(tar->entry_gname));
|
||||
archive_string_empty(&(tar->entry_linkpath));
|
||||
@ -1638,11 +1640,13 @@ pax_header(struct archive_read *a, struct tar *tar,
|
||||
}
|
||||
*p = '\0';
|
||||
|
||||
/* Identify null-terminated 'value' portion. */
|
||||
value = p + 1;
|
||||
|
||||
/* Some values may be binary data */
|
||||
value_length = attr + line_length - 1 - value;
|
||||
|
||||
/* Identify this attribute and set it in the entry. */
|
||||
err2 = pax_attribute(a, tar, entry, key, value);
|
||||
err2 = pax_attribute(a, tar, entry, key, value, value_length);
|
||||
if (err2 == ARCHIVE_FATAL)
|
||||
return (err2);
|
||||
err = err_combine(err, err2);
|
||||
@ -1763,6 +1767,20 @@ pax_attribute_xattr(struct archive_entry *entry,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
pax_attribute_schily_xattr(struct archive_entry *entry,
|
||||
const char *name, const char *value, size_t value_length)
|
||||
{
|
||||
if (strlen(name) < 14 || (memcmp(name, "SCHILY.xattr.", 13)) != 0)
|
||||
return 1;
|
||||
|
||||
name += 13;
|
||||
|
||||
archive_entry_xattr_add_entry(entry, name, value, value_length);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
pax_attribute_acl(struct archive_read *a, struct tar *tar,
|
||||
struct archive_entry *entry, const char *value, int type)
|
||||
@ -1824,7 +1842,7 @@ pax_attribute_acl(struct archive_read *a, struct tar *tar,
|
||||
*/
|
||||
static int
|
||||
pax_attribute(struct archive_read *a, struct tar *tar,
|
||||
struct archive_entry *entry, const char *key, const char *value)
|
||||
struct archive_entry *entry, const char *key, const char *value, size_t value_length)
|
||||
{
|
||||
int64_t s;
|
||||
long n;
|
||||
@ -1961,6 +1979,9 @@ pax_attribute(struct archive_read *a, struct tar *tar,
|
||||
} else if (strcmp(key, "SCHILY.realsize") == 0) {
|
||||
tar->realsize = tar_atol10(value, strlen(value));
|
||||
archive_entry_set_size(entry, tar->realsize);
|
||||
} else if (strncmp(key, "SCHILY.xattr.", 13) == 0) {
|
||||
pax_attribute_schily_xattr(entry, key, value,
|
||||
value_length);
|
||||
} else if (strcmp(key, "SUN.holesdata") == 0) {
|
||||
/* A Solaris extension for sparse. */
|
||||
r = solaris_sparse_parse(a, tar, entry, value);
|
||||
|
@ -88,7 +88,7 @@ typedef enum {
|
||||
WT_RVIS,
|
||||
/* conversion, unsupported */
|
||||
WT_CONV,
|
||||
/* continutation, unsupported at the moment */
|
||||
/* continuation, unsupported at the moment */
|
||||
WT_CONT,
|
||||
/* invalid type */
|
||||
LAST_WT
|
||||
@ -562,7 +562,7 @@ xstrpisotime(const char *s, char **endptr)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* massage TM to fulfill some of POSIX' contraints */
|
||||
/* massage TM to fulfill some of POSIX' constraints */
|
||||
tm.tm_year -= 1900;
|
||||
tm.tm_mon--;
|
||||
|
||||
|
@ -199,7 +199,7 @@ struct zip {
|
||||
struct trad_enc_ctx tctx;
|
||||
char tctx_valid;
|
||||
|
||||
/* WinZip AES decyption. */
|
||||
/* WinZip AES decryption. */
|
||||
/* Contexts used for AES decryption. */
|
||||
archive_crypto_ctx cctx;
|
||||
char cctx_valid;
|
||||
@ -242,7 +242,7 @@ trad_enc_update_keys(struct trad_enc_ctx *ctx, uint8_t c)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
|
||||
trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
|
||||
{
|
||||
unsigned temp = ctx->keys[2] | 2;
|
||||
return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
|
||||
@ -257,7 +257,7 @@ trad_enc_decrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
|
||||
max = (unsigned)((in_len < out_len)? in_len: out_len);
|
||||
|
||||
for (i = 0; i < max; i++) {
|
||||
uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx);
|
||||
uint8_t t = in[i] ^ trad_enc_decrypt_byte(ctx);
|
||||
out[i] = t;
|
||||
trad_enc_update_keys(ctx, t);
|
||||
}
|
||||
@ -710,7 +710,7 @@ process_extra(struct archive_read *a, const char *p, size_t extra_length, struct
|
||||
break;
|
||||
}
|
||||
case 0x9901:
|
||||
/* WinZIp AES extra data field. */
|
||||
/* WinZip AES extra data field. */
|
||||
if (p[offset + 2] == 'A' && p[offset + 3] == 'E') {
|
||||
/* Vendor version. */
|
||||
zip_entry->aes_extra.vendor =
|
||||
@ -1518,7 +1518,7 @@ read_decryption_header(struct archive_read *a)
|
||||
case 0x6720:/* Blowfish */
|
||||
case 0x6721:/* Twofish */
|
||||
case 0x6801:/* RC4 */
|
||||
/* Suuported encryption algorithm. */
|
||||
/* Supported encryption algorithm. */
|
||||
break;
|
||||
default:
|
||||
archive_set_error(&a->archive,
|
||||
@ -1627,7 +1627,7 @@ read_decryption_header(struct archive_read *a)
|
||||
__archive_read_consume(a, 4);
|
||||
|
||||
/*return (ARCHIVE_OK);
|
||||
* This is not fully implemnted yet.*/
|
||||
* This is not fully implemented yet.*/
|
||||
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
|
||||
"Encrypted file is unsupported");
|
||||
return (ARCHIVE_FAILED);
|
||||
@ -1709,7 +1709,7 @@ init_traditional_PKWARE_decryption(struct archive_read *a)
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize ctx for Traditional PKWARE Decyption.
|
||||
* Initialize ctx for Traditional PKWARE Decryption.
|
||||
*/
|
||||
r = trad_enc_init(&zip->tctx, passphrase, strlen(passphrase),
|
||||
p, ENC_HEADER_SIZE, &crcchk);
|
||||
|
@ -219,6 +219,12 @@ archive_wstring_append(struct archive_wstring *as, const wchar_t *p, size_t s)
|
||||
return (as);
|
||||
}
|
||||
|
||||
struct archive_string *
|
||||
archive_array_append(struct archive_string *as, const char *p, size_t s)
|
||||
{
|
||||
return archive_string_append(as, p, s);
|
||||
}
|
||||
|
||||
void
|
||||
archive_string_concat(struct archive_string *dest, struct archive_string *src)
|
||||
{
|
||||
@ -597,7 +603,7 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest,
|
||||
wcs = dest->s + dest->length;
|
||||
/*
|
||||
* We cannot use mbsrtowcs/mbstowcs here because those may convert
|
||||
* extra MBS when strlen(p) > len and one wide character consis of
|
||||
* extra MBS when strlen(p) > len and one wide character consists of
|
||||
* multi bytes.
|
||||
*/
|
||||
while (*mbs && mbs_length > 0) {
|
||||
@ -1248,7 +1254,7 @@ create_sconv_object(const char *fc, const char *tc,
|
||||
sc->cd = iconv_open(tc, fc);
|
||||
if (sc->cd == (iconv_t)-1 && (sc->flag & SCONV_BEST_EFFORT)) {
|
||||
/*
|
||||
* Unfortunaly, all of iconv implements do support
|
||||
* Unfortunately, all of iconv implements do support
|
||||
* "CP932" character-set, so we should use "SJIS"
|
||||
* instead if iconv_open failed.
|
||||
*/
|
||||
@ -1261,7 +1267,7 @@ create_sconv_object(const char *fc, const char *tc,
|
||||
/*
|
||||
* archive_mstring on Windows directly convert multi-bytes
|
||||
* into archive_wstring in order not to depend on locale
|
||||
* so that you can do a I18N programing. This will be
|
||||
* so that you can do a I18N programming. This will be
|
||||
* used only in archive_mstring_copy_mbs_len_l so far.
|
||||
*/
|
||||
if (flag & SCONV_FROM_CHARSET) {
|
||||
@ -1726,7 +1732,7 @@ archive_string_conversion_from_charset(struct archive *a, const char *charset,
|
||||
* in tar or zip files. But mbstowcs/wcstombs(CRT) usually use CP_ACP
|
||||
* unless you use setlocale(LC_ALL, ".OCP")(specify CP_OEMCP).
|
||||
* So we should make a string conversion between CP_ACP and CP_OEMCP
|
||||
* for compatibillty.
|
||||
* for compatibility.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
struct archive_string_conv *
|
||||
@ -2220,7 +2226,7 @@ best_effort_strncat_in_locale(struct archive_string *as, const void *_p,
|
||||
|
||||
/*
|
||||
* If a character is ASCII, this just copies it. If not, this
|
||||
* assigns '?' charater instead but in UTF-8 locale this assigns
|
||||
* assigns '?' character instead but in UTF-8 locale this assigns
|
||||
* byte sequence 0xEF 0xBD 0xBD, which are code point U+FFFD,
|
||||
* a Replacement Character in Unicode.
|
||||
*/
|
||||
@ -2554,7 +2560,7 @@ utf16_to_unicode(uint32_t *pwc, const char *s, size_t n, int be)
|
||||
|
||||
/*
|
||||
* Surrogate pair values(0xd800 through 0xdfff) are only
|
||||
* used by UTF-16, so, after above culculation, the code
|
||||
* used by UTF-16, so, after above calculation, the code
|
||||
* must not be surrogate values, and Unicode has no codes
|
||||
* larger than 0x10ffff. Thus, those are not legal Unicode
|
||||
* values.
|
||||
@ -2903,7 +2909,7 @@ get_nfc(uint32_t uc, uint32_t uc2)
|
||||
/*
|
||||
* Normalize UTF-8/UTF-16BE characters to Form C and copy the result.
|
||||
*
|
||||
* TODO: Convert composition exclusions,which are never converted
|
||||
* TODO: Convert composition exclusions, which are never converted
|
||||
* from NFC,NFD,NFKC and NFKD, to Form C.
|
||||
*/
|
||||
static int
|
||||
@ -3437,7 +3443,7 @@ strncat_from_utf8_libarchive2(struct archive_string *as,
|
||||
}
|
||||
|
||||
/*
|
||||
* As libarchie 2.x, translates the UTF-8 characters into
|
||||
* As libarchive 2.x, translates the UTF-8 characters into
|
||||
* wide-characters in the assumption that WCS is Unicode.
|
||||
*/
|
||||
if (n < 0) {
|
||||
@ -3947,7 +3953,7 @@ archive_mstring_get_mbs_l(struct archive_mstring *aes,
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
/*
|
||||
* Internationalization programing on Windows must use Wide
|
||||
* Internationalization programming on Windows must use Wide
|
||||
* characters because Windows platform cannot make locale UTF-8.
|
||||
*/
|
||||
if (sc != NULL && (aes->aes_set & AES_SET_WCS) != 0) {
|
||||
@ -4079,7 +4085,7 @@ archive_mstring_copy_mbs_len_l(struct archive_mstring *aes,
|
||||
archive_string_empty(&(aes->aes_utf8));
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
/*
|
||||
* Internationalization programing on Windows must use Wide
|
||||
* Internationalization programming on Windows must use Wide
|
||||
* characters because Windows platform cannot make locale UTF-8.
|
||||
*/
|
||||
if (sc == NULL) {
|
||||
|
@ -81,6 +81,10 @@ archive_strappend_char(struct archive_string *, char);
|
||||
struct archive_wstring *
|
||||
archive_wstrappend_wchar(struct archive_wstring *, wchar_t);
|
||||
|
||||
/* Append a raw array to an archive_string, resizing as necessary */
|
||||
struct archive_string *
|
||||
archive_array_append(struct archive_string *, const char *, size_t);
|
||||
|
||||
/* Convert a Unicode string to current locale and append the result. */
|
||||
/* Returns -1 if conversion fails. */
|
||||
int
|
||||
|
@ -1009,7 +1009,7 @@ static const char u_decomposable_blocks[0x1D2+1] = {
|
||||
(((uc) > 0x1D244)?0:\
|
||||
ccc_val[ccc_val_index[ccc_index[(uc)>>8]][((uc)>>4)&0x0F]][(uc)&0x0F])
|
||||
|
||||
/* The table of the value of Canonical Cimbining Class */
|
||||
/* The table of the value of Canonical Combining Class */
|
||||
static const unsigned char ccc_val[][16] = {
|
||||
/* idx=0: XXXX0 - XXXXF */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
|
@ -231,7 +231,7 @@ __archive_write_filter(struct archive_write_filter *f,
|
||||
if (length == 0)
|
||||
return(ARCHIVE_OK);
|
||||
if (f->write == NULL)
|
||||
/* If unset, a fatal error has already ocuured, so this filter
|
||||
/* If unset, a fatal error has already occurred, so this filter
|
||||
* didn't open. We cannot write anything. */
|
||||
return(ARCHIVE_FATAL);
|
||||
r = (f->write)(f, buff, length);
|
||||
|
@ -233,7 +233,7 @@ archive_compressor_xz_init_stream(struct archive_write_filter *f,
|
||||
if (f->code == ARCHIVE_FILTER_XZ) {
|
||||
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
|
||||
if (data->threads != 1) {
|
||||
bzero(&mt_options, sizeof(mt_options));
|
||||
memset(&mt_options, 0, sizeof(mt_options));
|
||||
mt_options.threads = data->threads;
|
||||
mt_options.timeout = 300;
|
||||
mt_options.filters = data->lzmafilters;
|
||||
|
@ -124,7 +124,10 @@ static struct {
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS},
|
||||
{ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -292,29 +295,41 @@ set_acl(struct archive *a, int fd, const char *name,
|
||||
}
|
||||
|
||||
/* Try restoring the ACL through 'fd' if we can. */
|
||||
#if HAVE_ACL_SET_FD
|
||||
if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0)
|
||||
ret = ARCHIVE_OK;
|
||||
else
|
||||
#else
|
||||
#if HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD
|
||||
#if HAVE_ACL_SET_FD_NP
|
||||
if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0)
|
||||
ret = ARCHIVE_OK;
|
||||
else
|
||||
#endif
|
||||
if (fd >= 0) {
|
||||
if (acl_set_fd_np(fd, acl, acl_type) == 0)
|
||||
#else /* HAVE_ACL_SET_FD */
|
||||
if (fd >= 0 && acl_type == ACL_TYPE_ACCESS) {
|
||||
if (acl_set_fd(fd, acl) == 0)
|
||||
#endif
|
||||
ret = ARCHIVE_OK;
|
||||
else {
|
||||
if (errno == EOPNOTSUPP) {
|
||||
/* Filesystem doesn't support ACLs */
|
||||
ret = ARCHIVE_OK;
|
||||
} else {
|
||||
archive_set_error(a, errno,
|
||||
"Failed to set %s acl on fd", tname);
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif /* HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD */
|
||||
#if HAVE_ACL_SET_LINK_NP
|
||||
if (acl_set_link_np(name, acl_type, acl) != 0) {
|
||||
archive_set_error(a, errno, "Failed to set %s acl", tname);
|
||||
ret = ARCHIVE_WARN;
|
||||
}
|
||||
if (acl_set_link_np(name, acl_type, acl) != 0) {
|
||||
#else
|
||||
/* TODO: Skip this if 'name' is a symlink. */
|
||||
if (acl_set_file(name, acl_type, acl) != 0) {
|
||||
archive_set_error(a, errno, "Failed to set %s acl", tname);
|
||||
ret = ARCHIVE_WARN;
|
||||
}
|
||||
#endif
|
||||
if (errno == EOPNOTSUPP) {
|
||||
/* Filesystem doesn't support ACLs */
|
||||
ret = ARCHIVE_OK;
|
||||
} else {
|
||||
archive_set_error(a, errno, "Failed to set %s acl",
|
||||
tname);
|
||||
ret = ARCHIVE_WARN;
|
||||
}
|
||||
}
|
||||
exit_free:
|
||||
acl_free(acl);
|
||||
return (ret);
|
||||
|
@ -1358,7 +1358,7 @@ make_header(struct archive_write *a, uint64_t offset, uint64_t pack_size,
|
||||
if (r < 0)
|
||||
return (r);
|
||||
|
||||
/* Write Nume size. */
|
||||
/* Write Name size. */
|
||||
r = enc_uint64(a, zip->total_bytes_entry_name+1);
|
||||
if (r < 0)
|
||||
return (r);
|
||||
|
@ -62,10 +62,17 @@ struct pax {
|
||||
struct sparse_block *sparse_tail;
|
||||
struct archive_string_conv *sconv_utf8;
|
||||
int opt_binary;
|
||||
|
||||
unsigned flags;
|
||||
#define WRITE_SCHILY_XATTR (1 << 0)
|
||||
#define WRITE_LIBARCHIVE_XATTR (1 << 1)
|
||||
};
|
||||
|
||||
static void add_pax_attr(struct archive_string *, const char *key,
|
||||
const char *value);
|
||||
static void add_pax_attr_binary(struct archive_string *,
|
||||
const char *key,
|
||||
const char *value, size_t value_len);
|
||||
static void add_pax_attr_int(struct archive_string *,
|
||||
const char *key, int64_t value);
|
||||
static void add_pax_attr_time(struct archive_string *,
|
||||
@ -136,6 +143,8 @@ archive_write_set_format_pax(struct archive *_a)
|
||||
"Can't allocate pax data");
|
||||
return (ARCHIVE_FATAL);
|
||||
}
|
||||
pax->flags = WRITE_LIBARCHIVE_XATTR | WRITE_SCHILY_XATTR;
|
||||
|
||||
a->format_data = pax;
|
||||
a->format_name = "pax";
|
||||
a->format_options = archive_write_pax_options;
|
||||
@ -274,6 +283,17 @@ add_pax_attr_int(struct archive_string *as, const char *key, int64_t value)
|
||||
*/
|
||||
static void
|
||||
add_pax_attr(struct archive_string *as, const char *key, const char *value)
|
||||
{
|
||||
add_pax_attr_binary(as, key, value, strlen(value));
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a key/value attribute to the pax header. This function handles
|
||||
* binary values.
|
||||
*/
|
||||
static void
|
||||
add_pax_attr_binary(struct archive_string *as, const char *key,
|
||||
const char *value, size_t value_len)
|
||||
{
|
||||
int digits, i, len, next_ten;
|
||||
char tmp[1 + 3 * sizeof(int)]; /* < 3 base-10 digits per byte */
|
||||
@ -282,7 +302,7 @@ add_pax_attr(struct archive_string *as, const char *key, const char *value)
|
||||
* PAX attributes have the following layout:
|
||||
* <len> <space> <key> <=> <value> <nl>
|
||||
*/
|
||||
len = 1 + (int)strlen(key) + 1 + (int)strlen(value) + 1;
|
||||
len = 1 + (int)strlen(key) + 1 + (int)value_len + 1;
|
||||
|
||||
/*
|
||||
* The <len> field includes the length of the <len> field, so
|
||||
@ -313,21 +333,47 @@ add_pax_attr(struct archive_string *as, const char *key, const char *value)
|
||||
archive_strappend_char(as, ' ');
|
||||
archive_strcat(as, key);
|
||||
archive_strappend_char(as, '=');
|
||||
archive_strcat(as, value);
|
||||
archive_array_append(as, value, value_len);
|
||||
archive_strappend_char(as, '\n');
|
||||
}
|
||||
|
||||
static void
|
||||
archive_write_pax_header_xattr(struct pax *pax, const char *encoded_name,
|
||||
const void *value, size_t value_len)
|
||||
{
|
||||
struct archive_string s;
|
||||
char *encoded_value;
|
||||
|
||||
if (pax->flags & WRITE_LIBARCHIVE_XATTR) {
|
||||
encoded_value = base64_encode((const char *)value, value_len);
|
||||
|
||||
if (encoded_name != NULL && encoded_value != NULL) {
|
||||
archive_string_init(&s);
|
||||
archive_strcpy(&s, "LIBARCHIVE.xattr.");
|
||||
archive_strcat(&s, encoded_name);
|
||||
add_pax_attr(&(pax->pax_header), s.s, encoded_value);
|
||||
archive_string_free(&s);
|
||||
}
|
||||
free(encoded_value);
|
||||
}
|
||||
if (pax->flags & WRITE_SCHILY_XATTR) {
|
||||
archive_string_init(&s);
|
||||
archive_strcpy(&s, "SCHILY.xattr.");
|
||||
archive_strcat(&s, encoded_name);
|
||||
add_pax_attr_binary(&(pax->pax_header), s.s, value, value_len);
|
||||
archive_string_free(&s);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
archive_write_pax_header_xattrs(struct archive_write *a,
|
||||
struct pax *pax, struct archive_entry *entry)
|
||||
{
|
||||
struct archive_string s;
|
||||
int i = archive_entry_xattr_reset(entry);
|
||||
|
||||
while (i--) {
|
||||
const char *name;
|
||||
const void *value;
|
||||
char *encoded_value;
|
||||
char *url_encoded_name = NULL, *encoded_name = NULL;
|
||||
size_t size;
|
||||
int r;
|
||||
@ -348,16 +394,9 @@ archive_write_pax_header_xattrs(struct archive_write *a,
|
||||
}
|
||||
}
|
||||
|
||||
encoded_value = base64_encode((const char *)value, size);
|
||||
archive_write_pax_header_xattr(pax, encoded_name,
|
||||
value, size);
|
||||
|
||||
if (encoded_name != NULL && encoded_value != NULL) {
|
||||
archive_string_init(&s);
|
||||
archive_strcpy(&s, "LIBARCHIVE.xattr.");
|
||||
archive_strcat(&s, encoded_name);
|
||||
add_pax_attr(&(pax->pax_header), s.s, encoded_value);
|
||||
archive_string_free(&s);
|
||||
}
|
||||
free(encoded_value);
|
||||
}
|
||||
return (ARCHIVE_OK);
|
||||
}
|
||||
|
@ -2913,7 +2913,7 @@ compression_init_encoder_xz(struct archive *a,
|
||||
*strm = lzma_init_data;
|
||||
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
|
||||
if (threads > 1) {
|
||||
bzero(&mt_options, sizeof(mt_options));
|
||||
memset(&mt_options, 0, sizeof(mt_options));
|
||||
mt_options.threads = threads;
|
||||
mt_options.timeout = 300;
|
||||
mt_options.filters = lzmafilters;
|
||||
|
@ -878,7 +878,7 @@ archive_write_zip_header(struct archive_write *a, struct archive_entry *entry)
|
||||
|| zip->entry_encryption == ENCRYPTION_WINZIP_AES256)) {
|
||||
|
||||
memcpy(e, "\001\231\007\000\001\000AE", 8);
|
||||
/* AES vendoer version AE-2 does not store a CRC.
|
||||
/* AES vendor version AE-2 does not store a CRC.
|
||||
* WinZip 11 uses AE-1, which does store the CRC,
|
||||
* but it does not store the CRC when the file size
|
||||
* is less than 20 bytes. So we simulate what
|
||||
@ -1013,7 +1013,7 @@ archive_write_zip_data(struct archive_write *a, const void *buff, size_t s)
|
||||
if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) {
|
||||
switch (zip->entry_encryption) {
|
||||
case ENCRYPTION_TRADITIONAL:
|
||||
/* Initialize traditoinal PKWARE encryption context. */
|
||||
/* Initialize traditional PKWARE encryption context. */
|
||||
if (!zip->tctx_valid) {
|
||||
ret = init_traditional_pkware_encryption(a);
|
||||
if (ret != ARCHIVE_OK)
|
||||
@ -1499,7 +1499,7 @@ trad_enc_update_keys(struct trad_enc_ctx *ctx, uint8_t c)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
|
||||
trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
|
||||
{
|
||||
unsigned temp = ctx->keys[2] | 2;
|
||||
return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
|
||||
@ -1515,7 +1515,7 @@ trad_enc_encrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
|
||||
|
||||
for (i = 0; i < max; i++) {
|
||||
uint8_t t = in[i];
|
||||
out[i] = t ^ trad_enc_decypt_byte(ctx);
|
||||
out[i] = t ^ trad_enc_decrypt_byte(ctx);
|
||||
trad_enc_update_keys(ctx, t);
|
||||
}
|
||||
return i;
|
||||
@ -1626,7 +1626,7 @@ init_winzip_aes_encryption(struct archive_write *a)
|
||||
return (ARCHIVE_FAILED);
|
||||
}
|
||||
|
||||
/* Set a passowrd verification value after the 'salt'. */
|
||||
/* Set a password verification value after the 'salt'. */
|
||||
salt[salt_len] = derived_key[key_len * 2];
|
||||
salt[salt_len + 1] = derived_key[key_len * 2 + 1];
|
||||
|
||||
|
@ -191,7 +191,7 @@ DEFINE_TEST(test_archive_read_add_passphrase_set_callback3)
|
||||
/* Fist call, we should get "passCallBack" as a passphrase. */
|
||||
assertEqualString("passCallBack", __archive_read_next_passphrase(ar));
|
||||
__archive_read_reset_passphrase(ar);
|
||||
/* After reset passphrase, we should get "passCallBack"passphrase. */
|
||||
/* After reset passphrase, we should get "passCallBack" passphrase. */
|
||||
assertEqualString("passCallBack", __archive_read_next_passphrase(ar));
|
||||
/* Second call, we should get NULL which means all the passphrases
|
||||
* are passed already. */
|
||||
|
@ -40,7 +40,7 @@ static char archive_data[] = {
|
||||
};
|
||||
|
||||
/*
|
||||
* Compatibility: uudecode command ignores junk data placed ater the "end"
|
||||
* Compatibility: uudecode command ignores junk data placed after the "end"
|
||||
* marker.
|
||||
*/
|
||||
DEFINE_TEST(test_compat_uudecode)
|
||||
|
@ -27,7 +27,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
ecute the following to rebuild the data for this program:
|
||||
execute the following to rebuild the data for this program:
|
||||
tail -n +33 test_read_format_cpio_afio.c | /bin/sh
|
||||
|
||||
# How to make a sample data.
|
||||
|
@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
DEFINE_TEST(test_read_format_zip_traditional_encryption_data)
|
||||
{
|
||||
/* This file is password protected (Traditional PKWARE Enctypted).
|
||||
/* This file is password protected (Traditional PKWARE Encrypted).
|
||||
The headers are NOT encrypted. Password is "12345678". */
|
||||
const char *refname =
|
||||
"test_read_format_zip_traditional_encryption_data.zip";
|
||||
@ -36,7 +36,7 @@ DEFINE_TEST(test_read_format_zip_traditional_encryption_data)
|
||||
struct archive *a;
|
||||
char buff[512];
|
||||
|
||||
/* Check if running system has cryptographic functionarity. */
|
||||
/* Check if running system has cryptographic functionality. */
|
||||
assert((a = archive_write_new()) != NULL);
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
|
||||
|
@ -33,7 +33,7 @@ test_winzip_aes(const char *refname, int need_libz)
|
||||
struct archive *a;
|
||||
char buff[512];
|
||||
|
||||
/* Check if running system has cryptographic functionarity. */
|
||||
/* Check if running system has cryptographic functionality. */
|
||||
assert((a = archive_write_new()) != NULL);
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
|
||||
|
@ -34,7 +34,7 @@ DEFINE_TEST(test_read_format_zip_winzip_aes256_large)
|
||||
char buff[512];
|
||||
|
||||
|
||||
/* Check if running system has cryptographic functionarity. */
|
||||
/* Check if running system has cryptographic functionality. */
|
||||
assert((a = archive_write_new()) != NULL);
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*-
|
||||
* Copyright (c) 2016 IBM Corporation
|
||||
* Copyright (c) 2003-2007 Tim Kientzle
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This test case's code has been derived from test_entry.c
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_schily_xattr_pax)
|
||||
{
|
||||
struct archive *a;
|
||||
struct archive_entry *ae;
|
||||
const char *refname = "test_read_pax_schily_xattr.tar";
|
||||
const char *xname; /* For xattr tests. */
|
||||
const void *xval; /* For xattr tests. */
|
||||
size_t xsize; /* For xattr tests. */
|
||||
const char *string, *array;
|
||||
|
||||
assert((a = archive_read_new()) != NULL);
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
|
||||
|
||||
extract_reference_file(refname);
|
||||
assertEqualIntA(a, ARCHIVE_OK,
|
||||
archive_read_open_filename(a, refname, 10240));
|
||||
|
||||
assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae));
|
||||
assertEqualInt(2, archive_entry_xattr_count(ae));
|
||||
assertEqualInt(2, archive_entry_xattr_reset(ae));
|
||||
|
||||
assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize));
|
||||
assertEqualString(xname, "security.selinux");
|
||||
string = "system_u:object_r:unlabeled_t:s0";
|
||||
assertEqualString(xval, string);
|
||||
/* the xattr's value also contains the terminating \0 */
|
||||
assertEqualInt((int)xsize, strlen(string) + 1);
|
||||
|
||||
assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize));
|
||||
assertEqualString(xname, "security.ima");
|
||||
assertEqualInt((int)xsize, 265);
|
||||
/* we only compare the first 12 bytes */
|
||||
array = "\x03\x02\x04\xb0\xe9\xd6\x79\x01\x00\x2b\xad\x1e";
|
||||
assertEqualMem(xval, array, 12);
|
||||
|
||||
/* Close the archive. */
|
||||
assertEqualInt(ARCHIVE_OK, archive_read_close(a));
|
||||
assertEqualInt(ARCHIVE_OK, archive_read_free(a));
|
||||
}
|
@ -0,0 +1,231 @@
|
||||
begin 644 test_schily_xattr_pax.tar
|
||||
M+B]087A(96%D97)S+C$U,C4O8V]N9F9I;&5S````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M`````````````#`P,#`V-#0`,#`P,#`P,``P,#`P,#`P`#`P,#`P,#`P-C0W
|
||||
M`#$R-S$R,C$P-3`V`#`Q,C4V-@`@>```````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M``````````````````````````````````````````!U<W1A<@`P,```````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M```````````````````````S,"!A=&EM93TQ-#8R,S`Y,S8Y+C<Q-#DW-3DP
|
||||
M.0HS,"!C=&EM93TQ-#8R,S`Y,S8Y+C<W.#DW-C(Q,PHR.38@4T-(24Q9+GAA
|
||||
M='1R+G-E8W5R:71Y+FEM83T#`@2PZ=9Y`0`KK1Z%635)4!FT,I"<49LTXR`'
|
||||
M@42;2R:POQ9`JQA=+16.AY^<_[XK597$><QT!GLCT8_IF@@:/Z<?]<HQ0T7I
|
||||
MO&87D9-4,L'!GUG'K%=]KEPC<<)&@`J)'T89MBPB7],R(#&7"#>W6X5O?Y6:
|
||||
M9^':P2MZR[4)$@W<NV(VUT&(R0R-_S>?)B6GX0U@<,0M%6YNMO%OG+IS%/.<
|
||||
M,"A(N&S.F9]=!*5=\).X."2$GUGJ,0C:@+G#$M_E8UQP,LU-G(8IKW^K^<8*
|
||||
M*3_.N0'%8.^$8S$`D9XOF+DK<<)U34U'_"O5/2<N#T*!'!4Z73X-X4W!/LCF
|
||||
M/,721A`CQF:PGDD/"C8W(%-#2$E,62YX871T<BYS96-U<FET>2YS96QI;G5X
|
||||
M/7-Y<W1E;5]U.F]B:F5C=%]R.G5N;&%B96QE9%]T.G,P``H`````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M`````````````````````````````````````````````"XO8V]N9F9I;&5S
|
||||
M````````````````````````````````````````````````````````````
|
||||
M```````````````````````````````````````````````````````````P
|
||||
M,#`P-C0T`#`P,#`P,#``,#`P,#`P,``P,#`P,#`P,#`T,0`Q,C<Q,C(Q,#4P
|
||||
M-@`P,3,P-S,`(#``````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````=7-T87(`,#!R;V]T````````````````
|
||||
M`````````````````````')O;W0`````````````````````````````````
|
||||
M````,#`P,#`P,``P,#`P,#`P````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````+V5T8R]D969A=6QT+VEM82UP;VQI8WDN:6YA8W1I=F4*````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
9````````````````````````````````````
|
||||
`
|
||||
end
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* NOTE: On FreeBSD and Solaris, this test needs ZFS.
|
||||
* You may should perfom this test as
|
||||
* You may perform this test as
|
||||
* 'TMPDIR=<a directory on the ZFS> libarchive_test'.
|
||||
*/
|
||||
|
||||
|
@ -29,10 +29,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
You can contact the author at :
|
||||
- xxHash source repository : http://code.google.com/p/xxhash/
|
||||
*/
|
||||
#include "archive_platform.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "archive_platform.h"
|
||||
#include "archive_xxhash.h"
|
||||
|
||||
#ifdef HAVE_LIBLZ4
|
||||
@ -60,7 +61,7 @@ You can contact the author at :
|
||||
** By default, xxHash library provides endian-independent Hash values, based on little-endian convention.
|
||||
** Results are therefore identical for little-endian and big-endian CPU.
|
||||
** This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format.
|
||||
** Should endian-independance be of no importance for your application, you may set the #define below to 1.
|
||||
** Should endian-independence be of no importance for your application, you may set the #define below to 1.
|
||||
** It will improve speed for Big-endian CPU.
|
||||
** This option has no impact on Little_Endian CPU.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/faccessat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/fchmodat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -40,10 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/fchownat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */
|
||||
/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $");
|
||||
|
||||
#include <sys/wait.h>
|
||||
|
||||
@ -70,9 +70,7 @@ ATF_TC_BODY(fexecve, tc)
|
||||
error = 76;
|
||||
else
|
||||
error = EXIT_FAILURE;
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
err(error, "fexecve");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/fstatat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
@ -63,9 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc)
|
||||
ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1);
|
||||
ATF_REQUIRE(close(fd) == 0);
|
||||
ATF_REQUIRE(access(FIFO, F_OK) == 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(dfd);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(mkfifoat_fdcwd);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
@ -80,9 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc)
|
||||
ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1);
|
||||
ATF_REQUIRE(close(fd) == 0);
|
||||
ATF_REQUIRE(access(FILE, F_OK) == 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(dfd);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(mknodat_fdcwd);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,9 +29,13 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
/*
|
||||
* dholland 20130112: disable tests that require O_SEARCH semantics
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/openat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/readlinkat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/unlinkat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $ */
|
||||
/* $NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,11 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $");
|
||||
__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -39,11 +42,6 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $");
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
|
||||
#define DIR "dir"
|
||||
#define FILE "dir/utimensat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */
|
||||
/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -31,10 +31,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -42,7 +43,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <spawn.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
|
||||
ATF_TC(t_spawn_openmode);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */
|
||||
/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,8 +29,11 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <assert.h>
|
||||
@ -40,11 +43,6 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
static void
|
||||
disable_corefile(void)
|
||||
{
|
||||
@ -55,7 +53,6 @@ disable_corefile(void)
|
||||
|
||||
ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void handler(int);
|
||||
|
||||
@ -82,9 +79,7 @@ ATF_TC_BODY(assert_false, tc)
|
||||
|
||||
if (pid == 0) {
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
disable_corefile();
|
||||
#endif
|
||||
(void)closefrom(0);
|
||||
(void)memset(&sa, 0, sizeof(struct sigaction));
|
||||
|
||||
@ -122,9 +117,7 @@ ATF_TC_BODY(assert_true, tc)
|
||||
|
||||
if (pid == 0) {
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
disable_corefile();
|
||||
#endif
|
||||
(void)closefrom(0);
|
||||
(void)memset(&sa, 0, sizeof(struct sigaction));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */
|
||||
/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -26,22 +26,19 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <assert.h>
|
||||
#include <atf-c.h>
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
ATF_TC(seekdir_basic);
|
||||
ATF_TC_HEAD(seekdir_basic, tc)
|
||||
@ -58,13 +55,12 @@ ATF_TC_BODY(seekdir_basic, tc)
|
||||
struct dirent *entry;
|
||||
long here;
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define CREAT(x, m) do { \
|
||||
int _creat_fd; \
|
||||
ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))), \
|
||||
"creat(%s, %x) failed: %s", (x), (m), \
|
||||
strerror(errno)); \
|
||||
(void)close(_creat_fd); \
|
||||
#define CREAT(x, m) do { \
|
||||
int _creat_fd; \
|
||||
ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \
|
||||
"creat(%s, %x) failed: %s", (x), (m), \
|
||||
strerror(errno)); \
|
||||
(void)close(_creat_fd); \
|
||||
} while(0);
|
||||
|
||||
ATF_REQUIRE_MSG(mkdir("t", 0755) == 0,
|
||||
@ -72,12 +68,6 @@ ATF_TC_BODY(seekdir_basic, tc)
|
||||
CREAT("t/a", 0600);
|
||||
CREAT("t/b", 0600);
|
||||
CREAT("t/c", 0600);
|
||||
#else
|
||||
mkdir("t", 0755);
|
||||
creat("t/a", 0600);
|
||||
creat("t/b", 0600);
|
||||
creat("t/c", 0600);
|
||||
#endif
|
||||
|
||||
dp = opendir("t");
|
||||
if ( dp == NULL)
|
||||
@ -90,10 +80,8 @@ ATF_TC_BODY(seekdir_basic, tc)
|
||||
/* get first entry */
|
||||
entry = readdir(dp);
|
||||
here = telldir(dp);
|
||||
#ifdef __FreeBSD__
|
||||
ATF_REQUIRE_MSG(here != -1,
|
||||
"telldir failed: %s", strerror(errno));
|
||||
#endif
|
||||
|
||||
/* get second entry */
|
||||
entry = readdir(dp);
|
||||
@ -137,9 +125,7 @@ ATF_TC_BODY(seekdir_basic, tc)
|
||||
atf_tc_fail("3rd seekdir found wrong name");
|
||||
|
||||
closedir(dp);
|
||||
#ifdef __FreeBSD__
|
||||
free(wasname);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* There is no sbrk on AArch64 and RISC-V */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */
|
||||
/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
@ -68,9 +68,7 @@ ATF_TC_BODY(ftok_link, tc)
|
||||
fd = open(path, O_RDONLY | O_CREAT);
|
||||
|
||||
ATF_REQUIRE(fd >= 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
ATF_REQUIRE(link(path, hlnk) == 0);
|
||||
ATF_REQUIRE(symlink(path, slnk) == 0);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */
|
||||
/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
|
||||
@ -247,9 +247,7 @@ ATF_TC_BODY(humanize_number_basic, tc)
|
||||
newline();
|
||||
atf_tc_fail_nonfatal("Failed for table entry %d", i);
|
||||
}
|
||||
#ifdef __FreeBSD__
|
||||
free(buf);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(humanize_number_big);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $ */
|
||||
/* $NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
@ -180,7 +180,7 @@ ATF_TC_BODY(raise_stress, tc)
|
||||
(void)raise(SIGUSR1);
|
||||
|
||||
if (count != maxiter)
|
||||
atf_tc_fail("not all signals were catched");
|
||||
atf_tc_fail("not all signals were caught");
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
|
@ -64,7 +64,7 @@ ATF_TC_BODY(setdomainname_basic, tc)
|
||||
(void)memset(name, 0, sizeof(name));
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/*
|
||||
/*
|
||||
* Sanity checks to ensure that the wrong invariant isn't being
|
||||
* tested for per PR # 181127
|
||||
*/
|
||||
|
@ -66,7 +66,7 @@ ATF_TC_BODY(sethostname_basic, tc)
|
||||
(void)memset(name, 0, sizeof(name));
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/*
|
||||
/*
|
||||
* Sanity checks to ensure that the wrong invariant isn't being
|
||||
* tested for per PR # 181127
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */
|
||||
/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Frank Kardel
|
||||
@ -26,8 +26,17 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/time.h> /* for TIMESPEC_TO_TIMEVAL on FreeBSD */
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -35,10 +44,6 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include "isqemu.h"
|
||||
|
||||
#define BILLION 1000000000LL /* nano-seconds per second */
|
||||
@ -49,11 +54,6 @@
|
||||
#define KEVNT_TIMEOUT 10300 /* measured in milli-seconds */
|
||||
#define FUZZ (40 * MILLION) /* scheduling fuzz accepted - 40 ms */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/time.h>
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Timer notes
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */
|
||||
/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,11 +29,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $");
|
||||
__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $");
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
@ -41,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
ATF_TC(time_copy);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */
|
||||
/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
@ -78,9 +78,7 @@ ATF_TC_BODY(ttyname_err, tc)
|
||||
|
||||
ATF_REQUIRE(ttyname(fd) == NULL);
|
||||
ATF_REQUIRE(errno == ENOTTY);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */
|
||||
/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -144,9 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc)
|
||||
}
|
||||
}
|
||||
|
||||
/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */
|
||||
#ifdef VIS_NOLOCALE
|
||||
/* End FreeBSD */
|
||||
ATF_TC(strvis_locale);
|
||||
ATF_TC_HEAD(strvis_locale, tc)
|
||||
{
|
||||
@ -175,9 +173,7 @@ ATF_TC_BODY(strvis_locale, tc)
|
||||
setlocale(LC_CTYPE, ol);
|
||||
free(ol);
|
||||
}
|
||||
/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */
|
||||
#endif /* VIS_NOLOCALE */
|
||||
/* End FreeBSD */
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
@ -186,13 +182,9 @@ ATF_TP_ADD_TCS(tp)
|
||||
ATF_TP_ADD_TC(tp, strvis_null);
|
||||
ATF_TP_ADD_TC(tp, strvis_empty);
|
||||
ATF_TP_ADD_TC(tp, strunvis_hex);
|
||||
/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */
|
||||
#ifdef VIS_NOLOCALE
|
||||
/* End FreeBSD */
|
||||
ATF_TP_ADD_TC(tp, strvis_locale);
|
||||
/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */
|
||||
#endif /* VIS_NOLOCALE */
|
||||
/* End FreeBSD */
|
||||
|
||||
return atf_no_error();
|
||||
}
|
||||
|
@ -48,9 +48,7 @@
|
||||
#ifdef __NetBSD__
|
||||
static void s_print(struct re_guts *, FILE *);
|
||||
static char *regchar(int);
|
||||
#endif
|
||||
|
||||
#ifdef __NetBSD__
|
||||
/*
|
||||
* regprint - print a regexp for debugging
|
||||
*/
|
||||
|
@ -36,10 +36,6 @@
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __NetBSD__
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
ATF_TC(snprintf_c99);
|
||||
ATF_TC_HEAD(snprintf_c99, tc)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */
|
||||
/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin <jtc@acorntoolworks.com>
|
||||
@ -58,12 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc)
|
||||
|
||||
ATF_TC_BODY(strchr_basic, tc)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
void *dl_handle;
|
||||
#endif
|
||||
unsigned int t, a;
|
||||
char *off;
|
||||
char buf[32];
|
||||
unsigned int t, a;
|
||||
|
||||
const char *tab[] = {
|
||||
"",
|
||||
@ -248,12 +246,8 @@ ATF_TC_BODY(strchr_basic, tc)
|
||||
"abcdefgh/abcdefgh/",
|
||||
};
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
dl_handle = dlopen(NULL, RTLD_LAZY);
|
||||
strchr_fn = dlsym(dl_handle, "test_strlen");
|
||||
#else
|
||||
strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr");
|
||||
#endif
|
||||
if (!strchr_fn)
|
||||
strchr_fn = strchr;
|
||||
|
||||
@ -288,9 +282,7 @@ ATF_TC_BODY(strchr_basic, tc)
|
||||
verify_strchr(buf + a, 0xff, t, a);
|
||||
}
|
||||
}
|
||||
#ifdef __FreeBSD__
|
||||
(void)dlclose(dl_handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */
|
||||
/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,18 +29,15 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h> /* Needed for sys_nerr on FreeBSD */
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
ATF_TC(strerror_basic);
|
||||
ATF_TC_HEAD(strerror_basic, tc)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
|
||||
/* $NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,11 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -38,13 +42,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
static const char path[] = "access";
|
||||
static const int mode[4] = { R_OK, W_OK, X_OK, F_OK };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
|
||||
/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,9 +29,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $");
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
@ -42,10 +43,6 @@ __RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
ATF_TC(chroot_basic);
|
||||
ATF_TC_HEAD(chroot_basic, tc)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */
|
||||
/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -59,9 +59,10 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $");
|
||||
__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $");
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#include <atf-c.h>
|
||||
@ -74,10 +75,6 @@ __RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $");
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
static long page = 0;
|
||||
static const char path[] = "mincore";
|
||||
static size_t check_residency(void *, size_t);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */
|
||||
/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -55,10 +55,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $");
|
||||
__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/wait.h>
|
||||
@ -78,7 +79,6 @@ __RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $");
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
@ -63,12 +63,7 @@ ATF_TC_BODY(unlink_basic, tc)
|
||||
ATF_REQUIRE(unlink(path) == 0);
|
||||
|
||||
errno = 0;
|
||||
#ifdef __FreeBSD__
|
||||
ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1);
|
||||
(void)close(fd);
|
||||
#else
|
||||
ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,12 +123,7 @@ ATF_TC_BODY(unlink_fifo, tc)
|
||||
ATF_REQUIRE(unlink(path) == 0);
|
||||
|
||||
errno = 0;
|
||||
#ifdef __FreeBSD__
|
||||
ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1);
|
||||
(void)close(fd);
|
||||
#else
|
||||
ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC_CLEANUP(unlink_fifo, tc)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $ */
|
||||
/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2016 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $");
|
||||
__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $");
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <sys/resource.h>
|
||||
@ -64,22 +64,6 @@ ATF_TC_BODY(wait6_invalid, tc)
|
||||
&& errno == EINVAL);
|
||||
}
|
||||
|
||||
ATF_TC(wait6_noproc);
|
||||
ATF_TC_HEAD(wait6_noproc, tc)
|
||||
{
|
||||
atf_tc_set_md_var(tc, "descr",
|
||||
"Test that wait6(2) returns ECHILD with for no processes");
|
||||
}
|
||||
|
||||
ATF_TC_BODY(wait6_noproc, tc)
|
||||
{
|
||||
siginfo_t si;
|
||||
struct wrusage wru;
|
||||
int st;
|
||||
ATF_REQUIRE(wait6(P_ALL, 0, &st, WEXITED, &wru, &si) == -1
|
||||
&& errno == ECHILD);
|
||||
}
|
||||
|
||||
ATF_TC(wait6_exited);
|
||||
ATF_TC_HEAD(wait6_exited, tc)
|
||||
{
|
||||
@ -96,12 +80,12 @@ ATF_TC_BODY(wait6_exited, tc)
|
||||
|
||||
switch (pid = fork()) {
|
||||
case -1:
|
||||
ATF_REQUIRE(pid > 0);
|
||||
ATF_REQUIRE(pid > 0);
|
||||
case 0:
|
||||
exit(0x5a5a5a5a);
|
||||
/*NOTREACHED*/
|
||||
default:
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(WIFEXITED(st) && WEXITSTATUS(st) == 0x5a);
|
||||
ATF_REQUIRE(si.si_status = 0x5a5a5a5a);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
@ -134,10 +118,10 @@ ATF_TC_BODY(wait6_terminated, tc)
|
||||
sleep(100);
|
||||
/*FALLTHROUGH*/
|
||||
case -1:
|
||||
ATF_REQUIRE(pid > 0);
|
||||
ATF_REQUIRE(pid > 0);
|
||||
default:
|
||||
ATF_REQUIRE(kill(pid, SIGTERM) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGTERM);
|
||||
ATF_REQUIRE(si.si_status == SIGTERM);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
@ -172,9 +156,9 @@ ATF_TC_BODY(wait6_coredumped, tc)
|
||||
*(char *)8 = 0;
|
||||
/*FALLTHROUGH*/
|
||||
case -1:
|
||||
ATF_REQUIRE(pid > 0);
|
||||
ATF_REQUIRE(pid > 0);
|
||||
default:
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGSEGV
|
||||
&& WCOREDUMP(st));
|
||||
ATF_REQUIRE(si.si_status == SIGSEGV);
|
||||
@ -210,11 +194,14 @@ ATF_TC_BODY(wait6_stop_and_go, tc)
|
||||
sleep(100);
|
||||
/*FALLTHROUGH*/
|
||||
case -1:
|
||||
ATF_REQUIRE(pid > 0);
|
||||
ATF_REQUIRE(pid > 0);
|
||||
default:
|
||||
ATF_REQUIRE(kill(pid, SIGSTOP) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(!WIFSIGNALED(st));
|
||||
ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP);
|
||||
ATF_REQUIRE(!WIFCONTINUED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGSTOP);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
@ -225,8 +212,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc)
|
||||
#endif
|
||||
|
||||
ATF_REQUIRE(kill(pid, SIGCONT) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(!WIFSIGNALED(st));
|
||||
ATF_REQUIRE(WIFCONTINUED(st));
|
||||
ATF_REQUIRE(!WIFSTOPPED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGCONT);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
@ -237,8 +227,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc)
|
||||
#endif
|
||||
|
||||
ATF_REQUIRE(kill(pid, SIGQUIT) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT);
|
||||
ATF_REQUIRE(!WIFSTOPPED(st));
|
||||
ATF_REQUIRE(!WIFCONTINUED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGQUIT);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
@ -251,15 +244,80 @@ ATF_TC_BODY(wait6_stop_and_go, tc)
|
||||
}
|
||||
}
|
||||
|
||||
ATF_TC(wait6_stopgo_loop);
|
||||
ATF_TC_HEAD(wait6_stopgo_loop, tc)
|
||||
{
|
||||
atf_tc_set_md_var(tc, "descr",
|
||||
"Test that wait6(2) handled stopped/continued process loop");
|
||||
}
|
||||
|
||||
ATF_TC_BODY(wait6_stopgo_loop, tc)
|
||||
{
|
||||
siginfo_t si;
|
||||
struct wrusage wru;
|
||||
int st;
|
||||
pid_t pid;
|
||||
static const struct rlimit rl = { 0, 0 };
|
||||
size_t N = 100;
|
||||
|
||||
ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 0);
|
||||
switch (pid = fork()) {
|
||||
case 0:
|
||||
sleep(100);
|
||||
/*FALLTHROUGH*/
|
||||
case -1:
|
||||
ATF_REQUIRE(pid > 0);
|
||||
}
|
||||
|
||||
printf("Before loop of SIGSTOP/SIGCONT sequence %zu times\n", N);
|
||||
while (N --> 0) {
|
||||
ATF_REQUIRE(kill(pid, SIGSTOP) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(!WIFSIGNALED(st));
|
||||
ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP);
|
||||
ATF_REQUIRE(!WIFCONTINUED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGSTOP);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
ATF_REQUIRE(si.si_code == CLD_STOPPED);
|
||||
|
||||
ATF_REQUIRE(kill(pid, SIGCONT) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(!WIFSIGNALED(st));
|
||||
ATF_REQUIRE(WIFCONTINUED(st));
|
||||
ATF_REQUIRE(!WIFSTOPPED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGCONT);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
ATF_REQUIRE(si.si_code == CLD_CONTINUED);
|
||||
}
|
||||
ATF_REQUIRE(kill(pid, SIGQUIT) == 0);
|
||||
ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid);
|
||||
ATF_REQUIRE(!WIFEXITED(st));
|
||||
ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT);
|
||||
ATF_REQUIRE(!WIFSTOPPED(st));
|
||||
ATF_REQUIRE(!WIFCONTINUED(st));
|
||||
ATF_REQUIRE(si.si_status == SIGQUIT);
|
||||
ATF_REQUIRE(si.si_pid == pid);
|
||||
ATF_REQUIRE(si.si_uid == getuid());
|
||||
ATF_REQUIRE(si.si_code == CLD_KILLED);
|
||||
#ifdef __NetBSD__
|
||||
printf("user: %ju system: %ju\n", (uintmax_t)si.si_utime,
|
||||
(uintmax_t)si.si_utime);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
|
||||
ATF_TP_ADD_TC(tp, wait6_invalid);
|
||||
ATF_TP_ADD_TC(tp, wait6_noproc);
|
||||
ATF_TP_ADD_TC(tp, wait6_exited);
|
||||
ATF_TP_ADD_TC(tp, wait6_terminated);
|
||||
ATF_TP_ADD_TC(tp, wait6_coredumped);
|
||||
ATF_TP_ADD_TC(tp, wait6_stop_and_go);
|
||||
ATF_TP_ADD_TC(tp, wait6_stopgo_loop);
|
||||
|
||||
return atf_no_error();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $ */
|
||||
/* $NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,9 +32,12 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $");
|
||||
__RCSID("$NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <cdbr.h>
|
||||
#include <cdbw.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $ */
|
||||
/* $NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
|
||||
@ -32,7 +32,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
__COPYRIGHT("@(#) Copyright (c) 2008\
|
||||
The NetBSD Foundation, inc. All rights reserved.");
|
||||
__RCSID("$NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $");
|
||||
__RCSID("$NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@ -150,11 +150,9 @@ ATF_TC_BODY(ioctl, tc)
|
||||
/* wait for last child */
|
||||
sa.sa_handler = SIG_DFL;
|
||||
REQUIRE_ERRNO(sigaction(SIGCHLD, &sa, NULL), -1);
|
||||
(void) wait(NULL);
|
||||
(void)wait(NULL);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(s);
|
||||
#endif
|
||||
ATF_REQUIRE_EQ(rc, 0);
|
||||
}
|
||||
|
||||
|
@ -995,7 +995,7 @@ server_request_direct_streamlocal(void)
|
||||
|
||||
/* XXX fine grained permissions */
|
||||
if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 &&
|
||||
!no_port_forwarding_flag) {
|
||||
!no_port_forwarding_flag && use_privsep) {
|
||||
c = channel_connect_to_path(target,
|
||||
"direct-streamlocal@openssh.com", "direct-streamlocal");
|
||||
} else {
|
||||
@ -1279,7 +1279,7 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
|
||||
|
||||
/* check permissions */
|
||||
if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0
|
||||
|| no_port_forwarding_flag) {
|
||||
|| no_port_forwarding_flag || !use_privsep) {
|
||||
success = 0;
|
||||
packet_send_debug("Server has disabled port forwarding.");
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: ssh-agent.1,v 1.62 2015/11/15 23:54:15 jmc Exp $
|
||||
.\" $OpenBSD: ssh-agent.1,v 1.63 2016/11/30 03:07:37 djm Exp $
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@ -48,6 +48,7 @@
|
||||
.Op Fl a Ar bind_address
|
||||
.Op Fl E Ar fingerprint_hash
|
||||
.Op Fl t Ar life
|
||||
.Op Fl P Ar pkcs11_whitelist
|
||||
.Op Ar command Op Ar arg ...
|
||||
.Nm ssh-agent
|
||||
.Op Fl c | s
|
||||
@ -122,6 +123,18 @@ The default is
|
||||
Kill the current agent (given by the
|
||||
.Ev SSH_AGENT_PID
|
||||
environment variable).
|
||||
.It Fl P
|
||||
Specify a pattern-list of acceptable paths for PKCS#11 shared libraries
|
||||
that may be added using the
|
||||
.Fl s
|
||||
option to
|
||||
.Xr ssh-add 1 .
|
||||
The default is to allow loading PKCS#11 libraries from
|
||||
.Dq /usr/lib/*,/usr/local/lib/* .
|
||||
PKCS#11 libraries that do not match the whitelist will be refused.
|
||||
See PATTERNS in
|
||||
.Xr ssh_config 5
|
||||
for a description of pattern-list syntax.
|
||||
.It Fl s
|
||||
Generate Bourne shell commands on
|
||||
.Dv stdout .
|
||||
|
@ -84,11 +84,16 @@ __RCSID("$FreeBSD$");
|
||||
#include "misc.h"
|
||||
#include "digest.h"
|
||||
#include "ssherr.h"
|
||||
#include "match.h"
|
||||
|
||||
#ifdef ENABLE_PKCS11
|
||||
#include "ssh-pkcs11.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_PKCS11_WHITELIST
|
||||
# define DEFAULT_PKCS11_WHITELIST "/usr/lib/*,/usr/local/lib/*"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_PRCTL_H)
|
||||
#include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */
|
||||
#endif
|
||||
@ -140,6 +145,9 @@ pid_t cleanup_pid = 0;
|
||||
char socket_name[PATH_MAX];
|
||||
char socket_dir[PATH_MAX];
|
||||
|
||||
/* PKCS#11 path whitelist */
|
||||
static char *pkcs11_whitelist;
|
||||
|
||||
/* locking */
|
||||
#define LOCK_SIZE 32
|
||||
#define LOCK_SALT_SIZE 16
|
||||
@ -761,7 +769,7 @@ no_identities(SocketEntry *e, u_int type)
|
||||
static void
|
||||
process_add_smartcard_key(SocketEntry *e)
|
||||
{
|
||||
char *provider = NULL, *pin;
|
||||
char *provider = NULL, *pin, canonical_provider[PATH_MAX];
|
||||
int r, i, version, count = 0, success = 0, confirm = 0;
|
||||
u_int seconds;
|
||||
time_t death = 0;
|
||||
@ -793,10 +801,21 @@ process_add_smartcard_key(SocketEntry *e)
|
||||
goto send;
|
||||
}
|
||||
}
|
||||
if (realpath(provider, canonical_provider) == NULL) {
|
||||
verbose("failed PKCS#11 add of \"%.100s\": realpath: %s",
|
||||
provider, strerror(errno));
|
||||
goto send;
|
||||
}
|
||||
if (match_pattern_list(canonical_provider, pkcs11_whitelist, 0) != 1) {
|
||||
verbose("refusing PKCS#11 add of \"%.100s\": "
|
||||
"provider not whitelisted", canonical_provider);
|
||||
goto send;
|
||||
}
|
||||
debug("%s: add %.100s", __func__, canonical_provider);
|
||||
if (lifetime && !death)
|
||||
death = monotime() + lifetime;
|
||||
|
||||
count = pkcs11_add_provider(provider, pin, &keys);
|
||||
count = pkcs11_add_provider(canonical_provider, pin, &keys);
|
||||
for (i = 0; i < count; i++) {
|
||||
k = keys[i];
|
||||
version = k->type == KEY_RSA1 ? 1 : 2;
|
||||
@ -804,8 +823,8 @@ process_add_smartcard_key(SocketEntry *e)
|
||||
if (lookup_identity(k, version) == NULL) {
|
||||
id = xcalloc(1, sizeof(Identity));
|
||||
id->key = k;
|
||||
id->provider = xstrdup(provider);
|
||||
id->comment = xstrdup(provider); /* XXX */
|
||||
id->provider = xstrdup(canonical_provider);
|
||||
id->comment = xstrdup(canonical_provider); /* XXX */
|
||||
id->death = death;
|
||||
id->confirm = confirm;
|
||||
TAILQ_INSERT_TAIL(&tab->idlist, id, next);
|
||||
@ -1200,7 +1219,7 @@ usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]\n"
|
||||
" [-t life] [command [arg ...]]\n"
|
||||
" [-P pkcs11_whitelist] [-t life] [command [arg ...]]\n"
|
||||
" ssh-agent [-c | -s] -k\n");
|
||||
fprintf(stderr, " -x Exit when the last client disconnects.\n");
|
||||
exit(1);
|
||||
@ -1246,7 +1265,7 @@ main(int ac, char **av)
|
||||
__progname = ssh_get_progname(av[0]);
|
||||
seed_rng();
|
||||
|
||||
while ((ch = getopt(ac, av, "cDdksE:a:t:x")) != -1) {
|
||||
while ((ch = getopt(ac, av, "cDdksE:a:P:t:x")) != -1) {
|
||||
switch (ch) {
|
||||
case 'E':
|
||||
fingerprint_hash = ssh_digest_alg_by_name(optarg);
|
||||
@ -1261,6 +1280,11 @@ main(int ac, char **av)
|
||||
case 'k':
|
||||
k_flag++;
|
||||
break;
|
||||
case 'P':
|
||||
if (pkcs11_whitelist != NULL)
|
||||
fatal("-P option already specified");
|
||||
pkcs11_whitelist = xstrdup(optarg);
|
||||
break;
|
||||
case 's':
|
||||
if (c_flag)
|
||||
usage();
|
||||
@ -1298,6 +1322,9 @@ main(int ac, char **av)
|
||||
if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || D_flag))
|
||||
usage();
|
||||
|
||||
if (pkcs11_whitelist == NULL)
|
||||
pkcs11_whitelist = xstrdup(DEFAULT_PKCS11_WHITELIST);
|
||||
|
||||
if (ac == 0 && !c_flag && !s_flag) {
|
||||
shell = getenv("SHELL");
|
||||
if (shell != NULL && (len = strlen(shell)) > 2 &&
|
||||
@ -1445,7 +1472,7 @@ main(int ac, char **av)
|
||||
signal(SIGTERM, cleanup_handler);
|
||||
nalloc = 0;
|
||||
|
||||
if (pledge("stdio cpath unix id proc exec", NULL) == -1)
|
||||
if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1)
|
||||
fatal("%s: pledge: %s", __progname, strerror(errno));
|
||||
platform_pledge_agent();
|
||||
|
||||
|
@ -50,4 +50,4 @@
|
||||
# ProxyCommand ssh -q -W %h:%p gateway.example.com
|
||||
# RekeyLimit 1G 1h
|
||||
# VerifyHostKeyDNS yes
|
||||
# VersionAddendum FreeBSD-20160310
|
||||
# VersionAddendum FreeBSD-20161230
|
||||
|
@ -1727,7 +1727,7 @@ See also VERIFYING HOST KEYS in
|
||||
Specifies a string to append to the regular version string to identify
|
||||
OS- or site-specific modifications.
|
||||
The default is
|
||||
.Dq FreeBSD-20160310 .
|
||||
.Dq FreeBSD-20161230 .
|
||||
The value
|
||||
.Dq none
|
||||
may be used to disable this.
|
||||
|
@ -121,7 +121,7 @@
|
||||
#PermitTunnel no
|
||||
#ChrootDirectory none
|
||||
#UseBlacklist no
|
||||
#VersionAddendum FreeBSD-20160310
|
||||
#VersionAddendum FreeBSD-20161230
|
||||
|
||||
# no default banner path
|
||||
#Banner none
|
||||
|
@ -1634,7 +1634,7 @@ The default is
|
||||
Optionally specifies additional text to append to the SSH protocol banner
|
||||
sent by the server upon connection.
|
||||
The default is
|
||||
.Dq FreeBSD-20160310 .
|
||||
.Dq FreeBSD-20161230 .
|
||||
The value
|
||||
.Dq none
|
||||
may be used to disable this.
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define SSH_PORTABLE "p2"
|
||||
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
|
||||
|
||||
#define SSH_VERSION_FREEBSD "FreeBSD-20160310"
|
||||
#define SSH_VERSION_FREEBSD "FreeBSD-20161230"
|
||||
|
||||
#ifdef WITH_OPENSSL
|
||||
#define OPENSSL_VERSION SSLeay_version(SSLEAY_VERSION)
|
||||
|
@ -644,6 +644,8 @@
|
||||
..
|
||||
soelim
|
||||
..
|
||||
tail
|
||||
..
|
||||
tar
|
||||
..
|
||||
timeout
|
||||
|
@ -20,7 +20,7 @@ ntpdate_start()
|
||||
if [ -z "$ntpdate_hosts" -a -f "$ntpdate_config" ]; then
|
||||
ntpdate_hosts=`awk '
|
||||
/^server[ \t]*127.127/ {next}
|
||||
/^(server|peer)/ {
|
||||
/^(server|peer|pool)/ {
|
||||
if ($2 ~/^-/) {print $3}
|
||||
else {print $2}}
|
||||
' < "$ntpdate_config"`
|
||||
|
@ -196,6 +196,7 @@ TESTS_SRCS= \
|
||||
test_read_format_zip_winzip_aes_large.c \
|
||||
test_read_format_zip_zip64.c \
|
||||
test_read_large.c \
|
||||
test_read_pax_schily_xattr.c \
|
||||
test_read_pax_truncated.c \
|
||||
test_read_position.c \
|
||||
test_read_set_format.c \
|
||||
@ -549,6 +550,7 @@ ${PACKAGE}FILES+= test_read_large_splitted_rar_ab.uu
|
||||
${PACKAGE}FILES+= test_read_large_splitted_rar_ac.uu
|
||||
${PACKAGE}FILES+= test_read_large_splitted_rar_ad.uu
|
||||
${PACKAGE}FILES+= test_read_large_splitted_rar_ae.uu
|
||||
${PACKAGE}FILES+= test_read_pax_schily_xattr.tar.uu
|
||||
${PACKAGE}FILES+= test_read_splitted_rar_aa.uu
|
||||
${PACKAGE}FILES+= test_read_splitted_rar_ab.uu
|
||||
${PACKAGE}FILES+= test_read_splitted_rar_ac.uu
|
||||
|
@ -38,8 +38,8 @@
|
||||
* In this algorithm the lock is a single word. Its low-order bit is
|
||||
* set when a writer holds the lock. The remaining high-order bits
|
||||
* contain a count of readers desiring the lock. The algorithm requires
|
||||
* atomic "compare_and_store" and "add" operations, which we implement
|
||||
* using assembly language sequences in "rtld_start.S".
|
||||
* atomic "compare_and_store" and "add" operations, which we take
|
||||
* from machine/atomic.h.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -64,10 +64,10 @@ typedef struct Struct_Lock {
|
||||
} Lock;
|
||||
|
||||
static sigset_t fullsigmask, oldsigmask;
|
||||
static int thread_flag;
|
||||
static int thread_flag, wnested;
|
||||
|
||||
static void *
|
||||
def_lock_create()
|
||||
def_lock_create(void)
|
||||
{
|
||||
void *base;
|
||||
char *p;
|
||||
@ -117,29 +117,34 @@ def_rlock_acquire(void *lock)
|
||||
static void
|
||||
def_wlock_acquire(void *lock)
|
||||
{
|
||||
Lock *l = (Lock *)lock;
|
||||
sigset_t tmp_oldsigmask;
|
||||
Lock *l;
|
||||
sigset_t tmp_oldsigmask;
|
||||
|
||||
for ( ; ; ) {
|
||||
sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask);
|
||||
if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG))
|
||||
break;
|
||||
sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL);
|
||||
}
|
||||
oldsigmask = tmp_oldsigmask;
|
||||
l = (Lock *)lock;
|
||||
for (;;) {
|
||||
sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask);
|
||||
if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG))
|
||||
break;
|
||||
sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL);
|
||||
}
|
||||
if (atomic_fetchadd_int(&wnested, 1) == 0)
|
||||
oldsigmask = tmp_oldsigmask;
|
||||
}
|
||||
|
||||
static void
|
||||
def_lock_release(void *lock)
|
||||
{
|
||||
Lock *l = (Lock *)lock;
|
||||
Lock *l;
|
||||
|
||||
if ((l->lock & WAFLAG) == 0)
|
||||
atomic_add_rel_int(&l->lock, -RC_INCR);
|
||||
else {
|
||||
atomic_add_rel_int(&l->lock, -WAFLAG);
|
||||
sigprocmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||
}
|
||||
l = (Lock *)lock;
|
||||
if ((l->lock & WAFLAG) == 0)
|
||||
atomic_add_rel_int(&l->lock, -RC_INCR);
|
||||
else {
|
||||
assert(wnested > 0);
|
||||
atomic_add_rel_int(&l->lock, -WAFLAG);
|
||||
if (atomic_fetchadd_int(&wnested, -1) == 1)
|
||||
sigprocmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
@ -269,7 +274,7 @@ lock_restart_for_upgrade(RtldLockState *lockstate)
|
||||
}
|
||||
|
||||
void
|
||||
lockdflt_init()
|
||||
lockdflt_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -373,12 +378,12 @@ _rtld_atfork_pre(int *locks)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Warning: this does not work with the rtld compat locks
|
||||
* above, since the thread signal mask is corrupted (set to
|
||||
* all signals blocked) if two locks are taken in write mode.
|
||||
* The caller of the _rtld_atfork_pre() must provide the
|
||||
* working implementation of the locks, and libthr locks are
|
||||
* fine.
|
||||
* Warning: this did not worked well with the rtld compat
|
||||
* locks above, when the thread signal mask was corrupted (set
|
||||
* to all signals blocked) if two locks were taken
|
||||
* simultaneously in the write mode. The caller of the
|
||||
* _rtld_atfork_pre() must provide the working implementation
|
||||
* of the locks anyway, and libthr locks are fine.
|
||||
*/
|
||||
wlock_acquire(rtld_phdr_lock, &ls[0]);
|
||||
wlock_acquire(rtld_bind_lock, &ls[1]);
|
||||
|
@ -557,7 +557,7 @@ editlist_populate(struct cam_device *device, int dbd, int pc, int page,
|
||||
struct scsi_mode_header_6 *mh; /* Location of mode header. */
|
||||
struct scsi_mode_page_header *mph;
|
||||
struct scsi_mode_page_header_sp *mphsp;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
STAILQ_INIT(&editlist);
|
||||
|
||||
@ -575,6 +575,7 @@ editlist_populate(struct cam_device *device, int dbd, int pc, int page,
|
||||
mode_pars = (uint8_t *)(mphsp + 1);
|
||||
len = scsi_2btoul(mphsp->page_length);
|
||||
}
|
||||
len = MIN(len, sizeof(data) - (mode_pars - data));
|
||||
|
||||
/* Decode the value data, creating edit_entries for each value. */
|
||||
buff_decode_visit(mode_pars, len, format, editentry_create, 0);
|
||||
@ -594,7 +595,7 @@ editlist_save(struct cam_device *device, int dbd, int pc, int page,
|
||||
struct scsi_mode_header_6 *mh; /* Location of mode header. */
|
||||
struct scsi_mode_page_header *mph;
|
||||
struct scsi_mode_page_header_sp *mphsp;
|
||||
int len, hlen;
|
||||
size_t len, hlen;
|
||||
|
||||
/* Make sure that something changed before continuing. */
|
||||
if (! editlist_changed)
|
||||
@ -617,6 +618,7 @@ editlist_save(struct cam_device *device, int dbd, int pc, int page,
|
||||
mode_pars = (uint8_t *)(mphsp + 1);
|
||||
len = scsi_2btoul(mphsp->page_length);
|
||||
}
|
||||
len = MIN(len, sizeof(data) - (mode_pars - data));
|
||||
|
||||
/* Encode the value data to be passed back to the device. */
|
||||
buff_encode_visit(mode_pars, len, format, editentry_save, 0);
|
||||
@ -814,7 +816,7 @@ modepage_dump(struct cam_device *device, int dbd, int pc, int page, int subpage,
|
||||
struct scsi_mode_header_6 *mh; /* Location of mode header. */
|
||||
struct scsi_mode_page_header *mph;
|
||||
struct scsi_mode_page_header_sp *mphsp;
|
||||
int indx, len;
|
||||
size_t indx, len;
|
||||
|
||||
mode_sense(device, dbd, pc, page, subpage, retries, timeout,
|
||||
data, sizeof(data));
|
||||
@ -829,6 +831,7 @@ modepage_dump(struct cam_device *device, int dbd, int pc, int page, int subpage,
|
||||
mode_pars = (uint8_t *)(mphsp + 1);
|
||||
len = scsi_2btoul(mphsp->page_length);
|
||||
}
|
||||
len = MIN(len, sizeof(data) - (mode_pars - data));
|
||||
|
||||
/* Print the raw mode page data with newlines each 8 bytes. */
|
||||
for (indx = 0; indx < len; indx++) {
|
||||
|
@ -29,7 +29,6 @@ node [color=grey62, style=filled, bgcolor=black];
|
||||
|
||||
# Alumni go here.. Try to keep things sorted.
|
||||
|
||||
adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16\n2006/09/25"]
|
||||
asami [label="Satoshi Asami\nasami@FreeBSD.org\n1994/11/18\n2001/09/11"]
|
||||
billf [label="Bill Fumerola\nbillf@FreeBSD.org\n1998/11/11\n2006/12/14"]
|
||||
jmallett [label="Juli Mallett\njmallett@FreeBSD.org\n2003/01/16\n2006/08/10"]
|
||||
@ -43,6 +42,7 @@ node [color=lightblue2, style=filled, bgcolor=black];
|
||||
|
||||
ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"]
|
||||
acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"]
|
||||
adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"]
|
||||
ahze [label="Michael Johnson\nahze@FreeBSD.org\n2004/10/29"]
|
||||
ak [label="Alex Kozlov\nak@FreeBSD.org\n2012/02/29"]
|
||||
ale [label="Alex Dupre\nale@FreeBSD.org\n2004/01/12"]
|
||||
@ -90,6 +90,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"]
|
||||
demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"]
|
||||
dhn [label="Dennis Herrmann\ndhn@FreeBSD.org\n2009/03/03"]
|
||||
dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"]
|
||||
dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2017/01/10"]
|
||||
dvl [label="Dan Langille\ndvl@FreeBSD.org\n2014/08/10"]
|
||||
eadler [label="Eitan Adler\neadler@FreeBSD.org\n2011/08/17"]
|
||||
edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002/10/22"]
|
||||
@ -144,6 +145,7 @@ laszlof [label="Frank Laszlo\nlaszlof@FreeBSD.org\n2006/11/07"]
|
||||
lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2005/04/11\n2007/02/21"]
|
||||
lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"]
|
||||
leeym [label="Yen-Ming Lee\nleeym@FreeBSD.org\n2002/08/14"]
|
||||
ler [label="Larry Rosenman\nler@FreeBSD.org\n2017/01/09"]
|
||||
lev [label="Lev Serebryakov\nlev@FreeBSD.org\n2003/06/17"]
|
||||
lifanov [label="Nikolai Lifanov\nlifanov@FreeBSD.org\n2016/12/11"]
|
||||
linimon [label="Mark Linimon\nlinimon@FreeBSD.org\n2003/10/23"]
|
||||
@ -252,6 +254,7 @@ znerd [label="Ernst de Haan\nznerd@FreeBSD.org\n2001/11/15"]
|
||||
|
||||
adamw -> ahze
|
||||
adamw -> jylefort
|
||||
adamw -> ler
|
||||
adamw -> mezz
|
||||
adamw -> pav
|
||||
adamw -> woodsb02
|
||||
@ -263,6 +266,8 @@ ahze -> tmclaugh
|
||||
|
||||
amdmi3 -> jrm
|
||||
|
||||
antoine -> dumbbell
|
||||
|
||||
araujo -> lippe
|
||||
araujo -> pclin
|
||||
araujo -> pgollucci
|
||||
@ -281,6 +286,7 @@ bdrewery -> trociny
|
||||
|
||||
bapt -> bdrewery
|
||||
bapt -> bofh
|
||||
bapt -> dumbbell
|
||||
bapt -> eadler
|
||||
bapt -> grembo
|
||||
bapt -> jbeich
|
||||
@ -554,6 +560,7 @@ rene -> bar
|
||||
rene -> cmt
|
||||
rene -> crees
|
||||
rene -> jgh
|
||||
rene -> ler
|
||||
rene -> olivierd
|
||||
|
||||
rm -> koobs
|
||||
|
@ -6010,7 +6010,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice)
|
||||
pdp_entry_t *pdpe;
|
||||
pd_entry_t oldpde, *pde;
|
||||
pt_entry_t *pte, PG_A, PG_G, PG_M, PG_RW, PG_V;
|
||||
vm_offset_t va_next;
|
||||
vm_offset_t va, va_next;
|
||||
vm_page_t m;
|
||||
boolean_t anychanged;
|
||||
|
||||
@ -6090,11 +6090,11 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice)
|
||||
}
|
||||
if (va_next > eva)
|
||||
va_next = eva;
|
||||
va = va_next;
|
||||
for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++,
|
||||
sva += PAGE_SIZE) {
|
||||
if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED |
|
||||
PG_V))
|
||||
continue;
|
||||
if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V))
|
||||
goto maybe_invlrng;
|
||||
else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
|
||||
if (advice == MADV_DONTNEED) {
|
||||
/*
|
||||
@ -6109,12 +6109,22 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice)
|
||||
} else if ((*pte & PG_A) != 0)
|
||||
atomic_clear_long(pte, PG_A);
|
||||
else
|
||||
continue;
|
||||
if ((*pte & PG_G) != 0)
|
||||
pmap_invalidate_page(pmap, sva);
|
||||
else
|
||||
goto maybe_invlrng;
|
||||
|
||||
if ((*pte & PG_G) != 0) {
|
||||
if (va == va_next)
|
||||
va = sva;
|
||||
} else
|
||||
anychanged = TRUE;
|
||||
continue;
|
||||
maybe_invlrng:
|
||||
if (va != va_next) {
|
||||
pmap_invalidate_range(pmap, va, sva);
|
||||
va = va_next;
|
||||
}
|
||||
}
|
||||
if (va != va_next)
|
||||
pmap_invalidate_range(pmap, va, sva);
|
||||
}
|
||||
if (anychanged)
|
||||
pmap_invalidate_all(pmap);
|
||||
|
@ -230,7 +230,6 @@ device puc # Multi I/O cards and multi-channel UARTs
|
||||
device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE
|
||||
device de # DEC/Intel DC21x4x (``Tulip'')
|
||||
device em # Intel PRO/1000 Gigabit Ethernet Family
|
||||
device igb # Intel PRO/1000 PCIE Server Gigabit Family
|
||||
device ix # Intel PRO/10GbE PCIE PF Ethernet
|
||||
device ixv # Intel PRO/10GbE PCIE VF Ethernet
|
||||
device ixl # Intel XL710 40Gbe PCIE Ethernet
|
||||
|
@ -120,7 +120,6 @@ device mii
|
||||
device miibus # MII bus support
|
||||
device awg # Allwinner EMAC Gigabit Ethernet
|
||||
device em # Intel PRO/1000 Gigabit Ethernet Family
|
||||
device igb # Intel PRO/1000 PCIE Server Gigabit Family
|
||||
device ix # Intel 10Gb Ethernet Family
|
||||
device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet
|
||||
device smc # SMSC LAN91C111
|
||||
|
@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <machine/elf.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stand.h>
|
||||
|
||||
#define FREEBSD_ELF
|
||||
|
@ -23,4 +23,8 @@ CFLAGS+= -fshort-wchar
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
@ -64,7 +64,7 @@ typedef struct boot_module_t
|
||||
const char *name;
|
||||
|
||||
/* init is the optional initialiser for the module. */
|
||||
void (*init)();
|
||||
void (*init)(void);
|
||||
|
||||
/*
|
||||
* probe checks to see if the module can handle dev.
|
||||
@ -89,10 +89,10 @@ typedef struct boot_module_t
|
||||
void **buf, size_t *bufsize);
|
||||
|
||||
/* status outputs information about the probed devices. */
|
||||
void (*status)();
|
||||
void (*status)(void);
|
||||
|
||||
/* valid devices as found by probe. */
|
||||
dev_info_t *(*devices)();
|
||||
dev_info_t *(*devices)(void);
|
||||
} boot_module_t;
|
||||
|
||||
/* Standard boot modules. */
|
||||
|
@ -532,6 +532,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_RESERVED_SERVICE) (
|
||||
VOID
|
||||
);
|
||||
|
||||
typedef
|
||||
|
@ -18,7 +18,7 @@ SECTIONS
|
||||
. = ALIGN(16);
|
||||
.data :
|
||||
{
|
||||
*(.data *.data.*)
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
|
@ -161,7 +161,7 @@ _start:
|
||||
mov r2, #0
|
||||
|
||||
1: cmp r0, r1
|
||||
bgt 2f
|
||||
bge 2f
|
||||
str r2, [r0], #4
|
||||
b 1b
|
||||
2:
|
||||
|
@ -4593,6 +4593,8 @@ ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
|
||||
printf("ctl: requested LUN ID %d is already "
|
||||
"in use\n", be_lun->req_lun_id);
|
||||
}
|
||||
fail:
|
||||
free(lun->lun_devid, M_CTL);
|
||||
if (lun->flags & CTL_LUN_MALLOCED)
|
||||
free(lun, M_CTL);
|
||||
be_lun->lun_config_status(be_lun->be_lun,
|
||||
@ -4605,14 +4607,11 @@ ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
|
||||
if (lun_number == -1) {
|
||||
mtx_unlock(&ctl_softc->ctl_lock);
|
||||
printf("ctl: can't allocate LUN, out of LUNs\n");
|
||||
if (lun->flags & CTL_LUN_MALLOCED)
|
||||
free(lun, M_CTL);
|
||||
be_lun->lun_config_status(be_lun->be_lun,
|
||||
CTL_LUN_CONFIG_FAILURE);
|
||||
return (ENOSPC);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
ctl_set_mask(ctl_softc->ctl_lun_mask, lun_number);
|
||||
mtx_unlock(&ctl_softc->ctl_lock);
|
||||
|
||||
mtx_init(&lun->lun_lock, "CTL LUN", NULL, MTX_DEF);
|
||||
lun->lun = lun_number;
|
||||
@ -4664,22 +4663,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
|
||||
ctl_init_page_index(lun);
|
||||
ctl_init_log_page_index(lun);
|
||||
|
||||
/*
|
||||
* Now, before we insert this lun on the lun list, set the lun
|
||||
* inventory changed UA for all other luns.
|
||||
*/
|
||||
STAILQ_FOREACH(nlun, &ctl_softc->lun_list, links) {
|
||||
mtx_lock(&nlun->lun_lock);
|
||||
ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE);
|
||||
mtx_unlock(&nlun->lun_lock);
|
||||
}
|
||||
|
||||
STAILQ_INSERT_TAIL(&ctl_softc->lun_list, lun, links);
|
||||
|
||||
ctl_softc->ctl_luns[lun_number] = lun;
|
||||
|
||||
ctl_softc->num_luns++;
|
||||
|
||||
/* Setup statistics gathering */
|
||||
#ifdef CTL_LEGACY_STATS
|
||||
lun->legacy_stats.device_type = be_lun->lun_type;
|
||||
@ -4692,6 +4675,19 @@ ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
|
||||
#endif /* CTL_LEGACY_STATS */
|
||||
lun->stats.item = lun_number;
|
||||
|
||||
/*
|
||||
* Now, before we insert this lun on the lun list, set the lun
|
||||
* inventory changed UA for all other luns.
|
||||
*/
|
||||
mtx_lock(&ctl_softc->ctl_lock);
|
||||
STAILQ_FOREACH(nlun, &ctl_softc->lun_list, links) {
|
||||
mtx_lock(&nlun->lun_lock);
|
||||
ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE);
|
||||
mtx_unlock(&nlun->lun_lock);
|
||||
}
|
||||
STAILQ_INSERT_TAIL(&ctl_softc->lun_list, lun, links);
|
||||
ctl_softc->ctl_luns[lun_number] = lun;
|
||||
ctl_softc->num_luns++;
|
||||
mtx_unlock(&ctl_softc->ctl_lock);
|
||||
|
||||
lun->be_lun->lun_config_status(lun->be_lun->be_lun, CTL_LUN_CONFIG_OK);
|
||||
|
@ -1001,7 +1001,7 @@ ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc)
|
||||
softc->ha_shutdown = 1;
|
||||
softc->ha_wakeup = 1;
|
||||
wakeup(&softc->ha_wakeup);
|
||||
while (softc->ha_shutdown < 2) {
|
||||
while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) {
|
||||
msleep(&softc->ha_wakeup, &softc->ha_lock, 0,
|
||||
"shutdown", hz);
|
||||
}
|
||||
|
@ -4335,7 +4335,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner);
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
break;
|
||||
|
||||
case DIF_SUBR_MUTEX_OWNER:
|
||||
@ -4345,7 +4347,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
LOCK_CLASS(l.li)->lc_owner(l.li, &lowner);
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = (uintptr_t)lowner;
|
||||
break;
|
||||
|
||||
@ -4356,9 +4360,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value);
|
||||
/* XXX - should be only LC_SLEEPABLE? */
|
||||
regs[rd] = (LOCK_CLASS(l.li)->lc_flags &
|
||||
(LC_SLEEPLOCK | LC_SLEEPABLE)) != 0;
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = (LOCK_CLASS(l.li)->lc_flags & LC_SLEEPLOCK) != 0;
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
break;
|
||||
|
||||
case DIF_SUBR_MUTEX_TYPE_SPIN:
|
||||
@ -4368,7 +4372,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = (LOCK_CLASS(l.li)->lc_flags & LC_SPINLOCK) != 0;
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
break;
|
||||
|
||||
case DIF_SUBR_RW_READ_HELD:
|
||||
@ -4379,8 +4385,10 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) &&
|
||||
lowner == NULL;
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
break;
|
||||
|
||||
case DIF_SUBR_RW_WRITE_HELD:
|
||||
@ -4391,8 +4399,10 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr(tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) &&
|
||||
lowner != NULL;
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
break;
|
||||
|
||||
case DIF_SUBR_RW_ISWRITER:
|
||||
@ -4403,7 +4413,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
|
||||
break;
|
||||
}
|
||||
l.lx = dtrace_loadptr(tupregs[0].dttk_value);
|
||||
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
|
||||
LOCK_CLASS(l.li)->lc_owner(l.li, &lowner);
|
||||
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
|
||||
regs[rd] = (lowner == curthread);
|
||||
break;
|
||||
#endif /* illumos */
|
||||
|
@ -1972,7 +1972,6 @@ device xmphy # XaQti XMAC II
|
||||
# KNE110TX.
|
||||
# de: Digital Equipment DC21040
|
||||
# em: Intel Pro/1000 Gigabit Ethernet 82542, 82543, 82544 based adapters.
|
||||
# igb: Intel Pro/1000 PCI Express Gigabit Ethernet: 82575 and later adapters.
|
||||
# ep: 3Com 3C509, 3C529, 3C556, 3C562D, 3C563D, 3C572, 3C574X, 3C579, 3C589
|
||||
# and PC Card devices using these chipsets.
|
||||
# ex: Intel EtherExpress Pro/10 and other i82595-based adapters,
|
||||
@ -2145,7 +2144,6 @@ device cxgbe # Chelsio T4-T6 1/10/25/40/100 Gigabit Ethernet
|
||||
device cxgbev # Chelsio T4-T6 Virtual Functions
|
||||
device de # DEC/Intel DC21x4x (``Tulip'')
|
||||
device em # Intel Pro/1000 Gigabit Ethernet
|
||||
device igb # Intel Pro/1000 PCIE Gigabit Ethernet
|
||||
device ixgb # Intel Pro/10Gbe PCI-X Ethernet
|
||||
device ix # Intel Pro/10Gbe PCIE Ethernet
|
||||
device ixv # Intel Pro/10Gbe PCIE Ethernet VF
|
||||
|
@ -1572,43 +1572,43 @@ dev/eisa/eisa_if.m standard
|
||||
dev/eisa/eisaconf.c optional eisa
|
||||
dev/e1000/if_em.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/if_lem.c optional em \
|
||||
dev/e1000/em_txrx.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/if_igb.c optional igb \
|
||||
dev/e1000/igb_txrx.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_80003es2lan.c optional em | igb \
|
||||
dev/e1000/e1000_80003es2lan.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82540.c optional em | igb \
|
||||
dev/e1000/e1000_82540.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82541.c optional em | igb \
|
||||
dev/e1000/e1000_82541.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82542.c optional em | igb \
|
||||
dev/e1000/e1000_82542.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82543.c optional em | igb \
|
||||
dev/e1000/e1000_82543.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82571.c optional em | igb \
|
||||
dev/e1000/e1000_82571.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_82575.c optional em | igb \
|
||||
dev/e1000/e1000_82575.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_ich8lan.c optional em | igb \
|
||||
dev/e1000/e1000_ich8lan.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_i210.c optional em | igb \
|
||||
dev/e1000/e1000_i210.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_api.c optional em | igb \
|
||||
dev/e1000/e1000_api.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_mac.c optional em | igb \
|
||||
dev/e1000/e1000_mac.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_manage.c optional em | igb \
|
||||
dev/e1000/e1000_manage.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_nvm.c optional em | igb \
|
||||
dev/e1000/e1000_nvm.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_phy.c optional em | igb \
|
||||
dev/e1000/e1000_phy.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_vf.c optional em | igb \
|
||||
dev/e1000/e1000_vf.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_mbx.c optional em | igb \
|
||||
dev/e1000/e1000_mbx.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/e1000/e1000_osdep.c optional em | igb \
|
||||
dev/e1000/e1000_osdep.c optional em \
|
||||
compile-with "${NORMAL_C} -I$S/dev/e1000"
|
||||
dev/et/if_et.c optional et
|
||||
dev/en/if_en_pci.c optional en pci
|
||||
@ -2826,6 +2826,7 @@ dev/scc/scc_dev_z8530.c optional scc
|
||||
dev/sdhci/sdhci.c optional sdhci
|
||||
dev/sdhci/sdhci_fdt_gpio.c optional sdhci fdt gpio
|
||||
dev/sdhci/sdhci_if.m optional sdhci
|
||||
dev/sdhci/sdhci_acpi.c optional sdhci acpi
|
||||
dev/sdhci/sdhci_pci.c optional sdhci pci
|
||||
dev/sf/if_sf.c optional sf pci
|
||||
dev/sge/if_sge.c optional sge pci
|
||||
@ -3905,9 +3906,9 @@ net/if_tun.c optional tun
|
||||
net/if_tap.c optional tap
|
||||
net/if_vlan.c optional vlan
|
||||
net/if_vxlan.c optional vxlan inet | vxlan inet6
|
||||
net/ifdi_if.m optional ether pci
|
||||
net/iflib.c optional ether pci
|
||||
net/mp_ring.c optional ether
|
||||
net/ifdi_if.m optional ether pci
|
||||
net/iflib.c optional ether pci
|
||||
net/mp_ring.c optional ether
|
||||
net/mppcc.c optional netgraph_mppc_compression
|
||||
net/mppcd.c optional netgraph_mppc_compression
|
||||
net/netisr.c standard
|
||||
|
@ -145,7 +145,7 @@ armv8_crypto_wrap.o optional armv8crypto \
|
||||
crypto/blowfish/bf_enc.c optional crypto | ipsec
|
||||
crypto/des/des_enc.c optional crypto | ipsec | netsmb
|
||||
dev/acpica/acpi_if.m optional acpi
|
||||
dev/ahci/ahci_generic.c optional ahci fdt
|
||||
dev/ahci/ahci_generic.c optional ahci
|
||||
dev/cpufreq/cpufreq_dt.c optional cpufreq fdt
|
||||
dev/hwpmc/hwpmc_arm64.c optional hwpmc
|
||||
dev/hwpmc/hwpmc_arm64_md.c optional hwpmc
|
||||
|
@ -38,7 +38,6 @@ LINT: ${NOTES} ../../conf/makeLINT.sed
|
||||
echo "nodevice bxe" >> ${.TARGET}-NOIP
|
||||
echo "nodevice em" >> ${.TARGET}-NOIP
|
||||
echo "nodevice fxp" >> ${.TARGET}-NOIP
|
||||
echo "nodevice igb" >> ${.TARGET}-NOIP
|
||||
echo "nodevice jme" >> ${.TARGET}-NOIP
|
||||
echo "nodevice msk" >> ${.TARGET}-NOIP
|
||||
echo "nodevice mxge" >> ${.TARGET}-NOIP
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user