Commit Graph

77 Commits

Author SHA1 Message Date
Guy Harris
3bc38fe91f autoconf: update a comment to reflect reality. [skip ci]
We no longer check whether the OS supports IPv6, so don't say we do.
2024-07-12 18:27:13 -07:00
Guy Harris
605654a1d8 autoconf: fix buggy ether_ntohost() test.
First, find out where, if anywhere, ether_ntohost() is declare, *then*
test whether it's buggy - using code taken from addrtoname.c to figure
out what to include and, if there's nothing that works, how to work
around it.

(This means that a bunch of platforms will start using ether_ntohost().)
2024-07-10 23:01:01 -07:00
Guy Harris
749988b236 autotools: use pkg-config and Homebrew when looking for libcrypto.
Grab the stuff from libpcap's configure script that looks for libssl
(and libcrypto) and adapt it to look for libcrypto.

his includes some macros to check using pkg-config (and other macros,
such as macros to save and restore CFLAGS, LIBS, and LDFLAGS; any
resemblance between their names and the cmake_push_check_state() and
cmake_pop_check_state() commands is *entirely* coincidental :-)).

Instead of checking for DES_cbc_encrypt(), which we don't use, to
determine whether the libcrypto we found is usable, check for
EVP_CIPHER_CTX_block_size(), which we *do* use.  (We also check whether
the openssl/evp.h header exists; if it doesn't, we might have found the
libcrypto that Apple bundles with macOS, for which they do *NOT* provide
the header in newer versions of Xcode.)  See also #1174.

This means that we don't need to check whether we have openssl/evp.h at
compile time - now, if we don't, we don't even set HAVE_LIBCRYPTO, so
there's no need to check HAVE_OPENSSL_EVP_H.
2024-07-09 23:04:41 -07:00
Guy Harris
c02b47db92 autotools, cmake: work around an Xcode 15+ issue.
There appears to be no way to build tcpdump on macOS Ventura with Xcode
15 with the system libpcap and have the resulting program run without
getting an error due to failing to find pcap_open() or
pcap_findalldevs_ex() at startup.

In particular, there appears to be no way to use __builtin_available()
to protect accesses to the routines that showed up in Sonoma, so that
the run-time linker doesn't fail if the routine in question isn't
present.  Perhaps it requires more compiler command-line arguments.

So, instead, only check for pcap_open() and pcap_findalldevs_ex() if 1)
this isn't macOS or 2) we're not building with the system libpcap.
2024-07-09 16:09:12 -07:00
Guy Harris
8e12b7ff03 autotools: don't put anything before -I and -L flags for local libpcap.
Those might point to a directory with headers and libraries for an
installed version of libpcap; if we've already decided to use a local
version in the source tree next to us, don't put -I and -L flags from
--with-crypto in front of them, put those flags *after* what's already
in V_INCLS and LIBS.
2024-07-09 04:31:39 -07:00
Francois-Xavier Le Bail
3dc8bebab7 Autoconf: Use V_INCLS to update the list of include search paths
This is the one used in the Makefile depend target via INCLS.
2024-07-07 17:26:04 +00:00
Guy Harris
d5b1a160a3 Get rid of support for libpcap prior to 1.0.
This lets us remove a bunch of configure-time and compile-time tests.

Update documentation to reflect this.

WinPcap 4.1.3 is based on libpcap 1.0, but doesn't export all of the new
APIs, so it won't work with code that uses any of the other APIs, which
tcpdump does, so don't test with WinPcap.
2024-05-19 12:43:23 -07:00
Francois-Xavier Le Bail
e5b1cab048 Autoconf: Update an AC_DEFINE()
Same result in config.h as with CMake.

Before:
#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/

After:
#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST 1

[skip ci]
2024-05-03 09:15:51 +02:00
Denis Ovsienko
0e04b9da80 SLL2: Translate interface indices to names on Linux only.
print-sll.c uses HAVE_NET_IF_H, which does not always work right: the
header is in POSIX.1-2001, but the result of if_indextoname() is
irrelevant if the current OS is not Linux, in which case the packet was
captured on a different host because libpcap produces DLT_LINUX_SLL2 on
Linux only.  The result can be irrelevant on Linux too, but this does
not have an easy solution.

To reduce the problem space, switch print-sll.c to check for __linux__
instead.  In tcpdump.c print the warning about interface names only if
sll2_if_print() would print interface names.  Since HAVE_NET_IF_H has no
purpose now, remove the checks for <net/if.h>.
2024-04-02 11:36:13 +01:00
Denis Ovsienko
ef765a04a6 Autoconf: Do not check for C99 uintptr_t. [skip appveyor]
At the time of commit 09b639a in 2015 C99 was not a requirement yet, so
the use of AC_TYPE_UINTPTR_T was necessary.  However, CMake since its
introduction in 2018 has not been checking for uintptr_t, which proves
that by now all supported platforms have the type and the Autoconf check
is obsolete.
2024-03-29 11:40:32 +00:00
Francois-Xavier Le Bail
f81ffd1754 Include <fcntl.h> unconditionally
It is used for open() which is in POSIX.1-2001, POSIX.1-2008.

libpcap has included <fcntl.h> unconditionally since at least 1999.
2024-03-29 06:11:55 +00:00
Denis Ovsienko
e1bcb7941d Simplify the checks for snprintf().
Do not check that the function is just available: first, it is in C99,
so the check almost certainly is a waste of time; second, the source
requires the function unconditionally; third, the subsequent "snprintf()
is suitable" check implies the "snprintf() is available" part anyway.
2024-03-27 23:46:15 +00:00
Denis Ovsienko
cf728f6dce Autoconf: Lose AC_C_INLINE: inline is in C99. 2024-03-27 09:44:16 +00:00
Denis Ovsienko
3d215c6db5 Do not define _SUN on AIX. [skip ci]
Setting the macro makes no difference on AIX 7.1, see also libpcap
commit be724d5.
2024-03-26 20:59:44 +00:00
Denis Ovsienko
a9c7cf8848 Disregard setlinebuf(3), always use setvbuf(3).
As most setlinebuf(3) man pages mention, setlinebuf() is a shorthand for
setvbuf().  The latter is in C99, but the former is not, so it is most
logical to use setvbuf() in all cases and to lose another build-time
check.
2024-03-25 15:09:00 +00:00
Francois-Xavier Le Bail
170cbc8c6d Autoconf, CMake: Get the size of a void * and a time_t
With this change we know:
whether this is a 32-bit or 64-bit build ;
whether the time_t size is 32-bit or 64-bit.

At least with CMake, the SIZEOF values could be 0, if somebody's
doing a fat build on macOS and that includes both 32-bit and 64-bit
instruction sets.
2024-03-14 16:19:01 +01:00
Denis Ovsienko
8482d8c537 Autoconf: Set PACKAGE_BUGREPORT in AC_INIT(). [skip ci] 2024-01-28 19:13:02 +00:00
Denis Ovsienko
bbcca20a27 Autoconf: Lose V_GROUP.
This variable has been unused since commit 70c3ca9 in January 2000.
2024-01-28 16:53:42 +00:00
Denis Ovsienko
569372be9e Retire most of IRIX support.
In parsenfsfh.c keep IRIX-specific code that is not specific to
*compiling* on IRIX.  Do not touch AC_LBL_LIBRARY_NET yet.
2024-01-28 16:48:31 +00:00
Denis Ovsienko
630f9bcaa8 Retire Tru64 UNIX support.
See also commit 6008cb8.
2024-01-28 11:35:15 +00:00
Denis Ovsienko
df376cdfb5 Autoconf: Get --with-user and --with-chroot right. [skip appveyor]
As Francois-Xavier points it out, my commit 3aa6574 fixed one bug, but
introduced another: running "./configure --with-gcc" also erroneously
takes the --with-user code path because withval is set to "yes" after
the --with-gcc block:

./configure --with-gcc
[...]
checking whether to drop root privileges by default... configure:
  error: --with-user requires a username

The matter is, in Autoconf AC_ARG_WITH() without ation-if-not-given
assigns withval only if with_xxxx is set to any value (including an
empty string), so make sure withval is always set in AC_ARG_WITH() and
spell all possible withval values in AS_CASE(), this way regardless of
any other options the behaviour is correct.

Rejected:
--with-user
--with-user=
--with-user=yes
--with-chroot
--with-chroot=
--with-chroot=yes

Accepted:
--without-user
--with-user=no
--with-user=someuser
--without-chroot
--with-chroot=no
--with-chroot=/somedir
2023-07-22 14:22:38 +01:00
Denis Ovsienko
161c18fa34 Untangle detection of pcap_findalldevs().
tcpdump.c requires both HAVE_PCAP_IF_T and HAVE_PCAP_FINDALLDEVS to
manage the code that depends on pcap_findalldevs().  Other than that,
the Autoconf and CMake checks that produce these two macros do not
relate directly, so having the check for pcap_if_t conditional on the
check for pcap_findalldevs() is an unnecessary complication.

More importantly, in the CMake case this places the check_type_size()
for pcap_if_t into a context with CMAKE_REQUIRED_LIBRARIES already set
to PCAP_LIBRARIES.  This works only if check_type_size() does not have
to check for <sys/types.h>, <stdint.h> or <stddef.h> implicitly.  This
was the case so long as another check_type_size() before the
CMAKE_REQUIRED_LIBRARIES change made the implicit checks and cached the
results, but removing that earlier instance resulted in a warning:

  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    /usr/lib/x86_64-linux-gnu/libpcap.so

  For compatibility with CMake 3.11 and below this check is ignoring it.

To fix that, in both Autoconf and CMake make the two checks separate and
unconditional and place the check for pcap_if_t where it fits better.
In CMake remove the earlier workaround with in6_addr.
2023-02-25 18:02:18 +00:00
Denis Ovsienko
10b807441e Detect OS IPv6 support using AF_INET6 only.
tcpdump source code has not been using struct in6_addr since commit
0c9cfdc in 2019, so lose the conditional structure declaration, which is
a no-op.

Since commit de7c619 in 2015 netdissect-stdinc.h on Windows defines
HAVE_OS_IPV6_SUPPORT if AF_INET6 if defined, which makes it equivalent
to AF_INET6.  On Unix-like systems taking struct in6_addr out of scope
would make HAVE_OS_IPV6_SUPPORT equivalent to AF_INET6, thus after
removing struct in6_addr remove HAVE_OS_IPV6_SUPPORT together with
Autoconf and CMake checks that define it.  Leave an unrelated CMake
workaround in place for later debugging.

On Windows do not define AF_INET6 if it is not defined, which makes
AF_INET6 a universal indicator of the OS IPv6 support on all supported
OSes.  The few remaining use cases that genuinely need AF_INET6 use it
to make OS API calls, so if the macro is not defined, it most likely
means such an API call in the best case would return just a well-formed
error status.  With this in mind, in win32_gethostbyaddr() and
ip6addr_string() guard all IPv6-specific code with #ifdef AF_INET6.  In
tcpdump.c add a comment to note why a guard is not required for
Casper-specific conditional code that uses AF_INET6.

This way when the OS does not support IPv6, IPv6 addresses will not
resolve to names, which is expected.  Other than that, tcpdump should be
able to process IPv6 addresses the usual way regardless if the OS would
be able to process the packets with these addresses.
2023-02-22 20:05:58 +00:00
Denis Ovsienko
2fa868fbc2 Autoconf: Remove detection of early IPv6 stacks. [skip appveyor]
The KAME/INRIA/etc. block has been around since commit c9d84d1 in 1999,
when it was common for IPv6 stacks to exist and develop separately from
operating systems.  During the next 10 or so years IPv6 support in
various operating systems became the norm and the stack detector became
obsolete.  Remove it and continue to use libc IPv6 implementation.
2023-02-21 00:16:18 +00:00
Denis Ovsienko
afe133ecef Do not substitute strdup().
libpcap has been using strdup() for a long time too, but never
substituted it under the assumption the function is available in all
supported OSes, see libpcap commit cb71eef from 2006.  The only
exception to that is Windows, which can have a different name for the
function, but both libpcap and tcpdump for that already use a separate
workaround, which does not involve the substitution.

Let's take this as a proof that strdup() substitution in tcpdump is dead
code, and remove it.
2023-02-19 11:33:13 +00:00
Denis Ovsienko
a69de5a4d9 Do not require vsnprintf().
The check for vsnprintf() has been in the configure script since commit
8cb054c in 2000, and the only actual use of the function was in the
"#ifndef HAVE_SNPRINTF" block in missing/snprintf.c until commit 1ed63b5
in 2019.  Since then tcpdump does not require vsnprintf() in any way.
2023-02-17 08:56:15 +00:00
Denis Ovsienko
e03799cb9f Require a proof of suitable snprintf(3) implementation.
My earlier commit fbd4415 did a wrong thing because it caused a failure
to fail in "make check" on Solaris 9, whereas the right thing to do when
printf() does not work as expected would be to fail the build with a
useful error message.   Implement that by testing snprintf() in Autoconf
and CMake (assume that in a given libc implementation all functions in
the printf() family have the same level of support for conversion
specifications).  Return 18 tests from the conditional space back into
TESTLIST.
2023-02-16 20:55:56 +00:00
Guy Harris
6eb61d130b configure, CMake: remove -fPIC hacks for Haiku.
As of llvm12_clang-12.0.1-5, Clang defaults to generating PIC, just as
GCC does, and the entire matrix now works.
2023-02-14 16:07:22 -08:00
Guy Harris
ec75e5b3e8 configure: move the addition of -fPIC to CFLAGS on Haiku earlier.
Add it before doing anything about the C compiler, so that all tests
done with the compiler are done with -fPIC, in case any of those tests
involve producing an executable image.
2023-02-13 21:17:46 -08:00
Guy Harris
9c3f8381e1 configure: add -fPIC to CFLAGS, not V_CCOPT, on Haiku.
THat forces *all* uses of the C compiler, whether it's being used in
configure-script tests or used to compile tcpdump, to gave -fPIC, which
is necessary on Haiku in order for linking to work.  Otherwise,
configure script tests that involve linking will fail.
2023-02-13 00:28:09 -08:00
Denis Ovsienko
4e7336c6a1 Autoconf: Fix formatting of IPv6 results. [skip appveyor]
Output of the IPv6 part of ./configure used to look OK on Linux:

checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc

But it was not OK on most other systems, for example, on FreeBSD:

checking whether the operating system supports IPv6... yes
checking ipv6 stack type... checking how to run the C preprocessor... cc
  -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
kame
You do not have inet6 library, using libc

Get the sequence of these messages right.  Now on Linux this is:

checking whether the operating system supports IPv6... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... (cached) /usr/bin/grep -E
checking ipv6 stack type... linux-glibc

And on FreeBSD it is:

checking whether the operating system supports IPv6... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking ipv6 stack type... kame
You do not have inet6 library, using libc
2023-02-12 11:55:02 +00:00
Denis Ovsienko
3aa65743dd Autoconf: Fix --with-user and --with-chroot. [skip appveyor]
Refine two blocks in configure.ac such that each option correctly
handles both of the Autoconf-supplied values ("yes" and "no") and, when
the option is properly enabled, the message is easier to understand.
See also commit 9aca99a.  While at it, use $withval more to unify the
code and squelch the following warnings from Autoconf 2.71:

configure.ac:188: warning: back quotes and double quotes must not be
  escaped in: $as_me:${as_lineno-$LINENO}: result: to \"$withval\"
configure.ac:188: warning: back quotes and double quotes must not be
  escaped in: to \"$withval\"
configure.ac:198: warning: back quotes and double quotes must not be
  escaped in: $as_me:${as_lineno-$LINENO}: result: to \"$withval\"
configure.ac:198: warning: back quotes and double quotes must not be
  escaped in: to \"$withval\"

User experience before:

./configure
checking whether to drop root privileges by default... no
checking whether to chroot... no

./configure --with-user=someuser --with-chroot=/some/dir/
checking whether to drop root privileges by default... to "someuser"
checking whether to chroot... to "/some/dir/"

./configure --without-user --without-chroot
checking whether to drop root privileges by default... to "no"
checking whether to chroot... no

./configure --with-user
checking whether to drop root privileges by default... to "yes"

./configure --with-chroot
checking whether to chroot... to "yes"

User experience after:

./configure
checking whether to drop root privileges by default... no
checking whether to chroot... no

./configure --with-user=someuser --with-chroot=/some/dir/
checking whether to drop root privileges by default... yes, to user
  "someuser"
checking whether to chroot... yes, to directory "/some/dir/"

./configure --without-user --without-chroot
checking whether to drop root privileges by default... no
checking whether to chroot... no

./configure --with-user
configure: error: --with-user requires a username

./configure --with-chroot
configure: error: --with-chroot requires a directory
2023-02-11 22:17:33 +00:00
Denis Ovsienko
a5fe56ffd0 autoconf: Retire AC_LBL_C_INLINE. [skip appveyor]
In 2002 this macro implemented a workaround for HP C compiler because
the latter did not work with the implementation of AC_C_INLINE in
Autoconf 2.13 (see commit b1263c6).  Since then the required kind of
inline very likely became available in every supported compiler of every
supported OS, but just in case there is still an exception, use
AC_C_INLINE from Autoconf 2.69 (or later) and trust it to work right.
In other words, if the original problem still exists, this will have to
be proven.

This squelches one more warning from Autoconf 2.71:

configure.ac:32: warning: The macro `AC_TRY_COMPILE' is obsolete.
2023-02-08 23:35:39 +00:00
Guy Harris
af51eea290 configure, CMakeLists.txt: don't check for snprintf().
It's specified by the C90 standard (and, as I remember, by the C89
standard, although I no longer have my paper copy); no need to worry
about ancient environments that lack it, and we have some cases where we
call it in code not protected by #ifdef HAVE_STRFTIME/#endif and haven't
seen any reports of problems.
2023-01-30 12:46:44 -08:00
Denis Ovsienko
40eeb0f3d4 configure: Modernize AC_CONFIG_HEADER. [skip appveyor]
This works with Autoconf 2.69 and squelches another warning from
Autoconf 2.71.  Lose an empty optional arument to AC_CONFIG_COMMANDS
while at it.
2023-01-27 18:42:47 +00:00
Denis Ovsienko
718227289a configure: Apply autoupdate 2.69. [skip appveyor]
Among other things this squelches many warnings from Autoconf 2.71.
2023-01-25 22:33:52 +00:00
Guy Harris
386ee9a722 configure: boost the minimum autoconf version to 2.69.
We get an error with 2.64; jump to 2.69.
2023-01-20 18:01:37 -08:00
Sam James
6de7b5fa70 configure.ac: fix configure tests broken with Clang 15 (implicit function declarations)
Clang 15 makes implicit function declarations fatal by default which
leads to some of tcpdump's configure tests silently failing/returning
the wrong result.

This adds the needed #includes to various tests for the functions used,
resolving the following errors:
```
net-analyzer/tcpdump-4.99.1/clang15.log:47:error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
net-analyzer/tcpdump-4.99.1/clang15.log:51:error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:55:error: call to undeclared library function 'sscanf' with type 'int (const char *restrict, const char *restrict, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:68:error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:112:error: call to undeclared function 'ether_ntohost'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:115:error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
```

Signed-off-by: Sam James <sam@gentoo.org>
2022-09-19 00:28:58 -07:00
Guy Harris
fe762c04a6 Handle DLT_PFLOG on all OSes.
Don't pad the pflog header with BPF_WORDALIGN(); round up to a multiple
of 4, instead, as that's what all but FreeBSD do, and FreeBSD used to do
that and should go back to doing so (kern/261566).

Don't rely on the OS's pflog include files to define direction types,
reason types, action types, or the layout of the header; instead, define
them ourselves in a header of our own, with #ifs to select the ones that
are only on some platforms.  That way, it'll handle some fields and
field values (the ones common to all OSes with pflog) on all OSes, even
ones without pflog.

That also expands the set of direction, reason, and action codes to what
various *BSDs and Darwin support.

Also, handle all the different AF_INET6 values in various *BSDs and
Darwin.
2022-01-29 22:30:33 -08:00
Francois-Xavier Le Bail
65f4c88d27 instrument functions: Enhance the output
If entering in a function, print also the calling function name with
file name and line number. There may be a small shift in the line number.

In some cases, with Clang 11, the file number is unknown (printed '??')
or the line number is unknown (printed '?'). In this case, use GCC.

To print nothing, like with no instrumentation:
$ make instrument_off

As before, the following commands are available:
To configure the printing of only the global functions names:
$ make instrument_global

To go back to print all the functions names:
$ make instrument_all

The library libbfd is used, therefore the binutils-dev package is required.
2022-01-27 16:05:58 +01:00
Francois-Xavier Le Bail
6d854639ea autoconf: Enhance the --enable-instrument-functions result output
It prints now, by default, also the static functions names.

To configure the printing of only the global functions names, as before:
$ make instrument_global

To go back to print all the functions names:
$ make instrument_all

In case of truncation, the indentation level is reset to its previous
level in pretty_print_packet().

[skip ci]
2022-01-22 13:19:33 +01:00
Francois-Xavier Le Bail
c6b7d41176 autoconf: Add the option to print functions names (entry and exit)
This should help some debugging processes.

Usage:
./configure --enable-instrument-functions

Generate instrumentation calls for entry and exit to functions.
Just after function entry and just before function exit, these
profiling functions are called and print the function names with
indentation and call level.

To instument a static function, remove temporarily the static specifier.

In case of truncation, the indentation level is reset currently to 1 in
pretty_print_packet(), main is level 0.
2022-01-17 20:48:57 +01:00
Francois-Xavier Le Bail
a14aac7f73 autoconf: Use AS_HELP_STRING macro instead of AC_HELP_STRING
Avoid the warning: The macro `AC_HELP_STRING' is obsolete.
2022-01-17 12:11:36 +01:00
Francois-Xavier Le Bail
39b9c1d158 libsmi: Use AS_HELP_STRING macro in configure.ac
Update the help message: State that the default is yes *if available*.
2022-01-17 12:04:07 +01:00
Francois-Xavier Le Bail
57ec2282ac SMB: Use AS_HELP_STRING macro in configure.ac 2022-01-17 11:12:00 +01:00
Mingrui
cb0099044b [bugfix]configure: fix error when cross-compile
While cross-compile, ./configure --host=xxx will output:
"checking whether printf(3) supports the z length modifier...
configure: error: in `/${path_to_tcpdump}/tcpdump':"

That is casued by AC_RUN_IFELSE, as describe in
"https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Runtime.html"
, if AC_RUN_IFELSE do not have cross-compile option, configure prints an error message and exits.

Signed-off-by: Mingrui Ren jiladahe1997@gmail.com
2021-11-04 09:07:23 +08:00
Denis Ovsienko
ac23514a0c Fix auto-enabling of Capsicum on FreeBSD with Autoconf. [skip appveyor]
Even after commit 6393bb6 --with-sandbox-capsicum didn't work entirely
as documented, as it defaulted to disabled:

checking whether to sandbox using capsicum... no
checking whether to sandbox using Casper library... no

Get the test condition right so it does what it says:

checking sys/capsicum.h usability... yes
checking sys/capsicum.h presence... yes
checking for sys/capsicum.h... yes
checking for cap_enter... yes
checking for cap_rights_limit... yes
checking for cap_ioctls_limit... yes
checking for openat... yes
checking for cap_init in -lcasper... yes
checking for cap_gethostbyaddr in -lcap_dns... yes
checking whether to sandbox using capsicum... yes
checking whether to sandbox using Casper library... yes
2021-08-04 00:45:45 +01:00
Denis Ovsienko
fbd44158e0 Mend "make check" on Solaris 9 (Autoconf only).
Sun C 5.9 does not support C99. GCC 4.6.4 recognizes -std=gnu99, but
does not support the z length modifier in printf(3). In either case 18
tests fail in the following manner:

<     [...]: domain [length 0 < 12] (invalid)
---
>     [...]: domain [length 0 < zu] (invalid)

Make these tests conditional and disable them when HAVE_NO_PRINTF_Z is
defined. Modify the Autoconf leg of the build process to define the
macro when printf() does not handle %zu as expected. The CMake leg looks
broken on Solaris 9 with 2.8.9 now, so leave it be for now.
2021-07-25 14:44:03 +01:00
Denis Ovsienko
789b35b598 Import Autoconf/make and "make releasetar" fixes. [skip ci]
These have been tested in tcpslice and libpcap.
2021-07-22 18:27:08 +01:00
Francois-Xavier Le Bail
192db0a116 SMB: Disable the printer by default
Like in 4.9.3 version.
This printer needs rework.

Move the tests with SMB packets in tests/smb.tests.
Add outputs files for the disabled case.
2020-12-19 12:16:50 +01:00