svn commit: r301701 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump
Mariusz Zaborski
oshogbo at FreeBSD.org
Wed Jun 8 22:30:23 UTC 2016
Author: oshogbo
Date: Wed Jun 8 22:30:21 2016
New Revision: 301701
URL: https://svnweb.freebsd.org/changeset/base/301701
Log:
Fix spelling of the casper introduced in the r296047.
PR: 210031
Reported by: AllanJude, jmallett
Modified:
head/contrib/tcpdump/addrtoname.c
head/contrib/tcpdump/config.h.in
head/contrib/tcpdump/configure
head/contrib/tcpdump/tcpdump.c
head/usr.sbin/tcpdump/tcpdump/config.h
Modified: head/contrib/tcpdump/addrtoname.c
==============================================================================
--- head/contrib/tcpdump/addrtoname.c Wed Jun 8 22:29:30 2016 (r301700)
+++ head/contrib/tcpdump/addrtoname.c Wed Jun 8 22:30:21 2016 (r301701)
@@ -29,10 +29,10 @@
#include "config.h"
#endif
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
#include <libcasper.h>
#include <casper/cap_dns.h>
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
#include <tcpdump-stdinc.h>
#ifdef USE_ETHER_NTOHOST
@@ -204,7 +204,7 @@ intoa(uint32_t addr)
static uint32_t f_netmask;
static uint32_t f_localnet;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
extern cap_channel_t *capdns;
#endif
@@ -252,7 +252,7 @@ getname(netdissect_options *ndo, const u
*/
if (!ndo->ndo_nflag &&
(addr & f_netmask) == f_localnet) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (capdns != NULL) {
hp = cap_gethostbyaddr(capdns, (char *)&addr, 4,
AF_INET);
@@ -309,7 +309,7 @@ getname6(netdissect_options *ndo, const
* Do not print names if -n was given.
*/
if (!ndo->ndo_nflag) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (capdns != NULL) {
hp = cap_gethostbyaddr(capdns, (char *)&addr,
sizeof(addr), AF_INET6);
Modified: head/contrib/tcpdump/config.h.in
==============================================================================
--- head/contrib/tcpdump/config.h.in Wed Jun 8 22:29:30 2016 (r301700)
+++ head/contrib/tcpdump/config.h.in Wed Jun 8 22:30:21 2016 (r301701)
@@ -10,7 +10,7 @@
#undef HAVE_BPF_DUMP
/* capsicum support available */
-#undef HAVE_CAPSPER
+#undef HAVE_CASPER
/* Define to 1 if you have the `cap_enter' function. */
#undef HAVE_CAP_ENTER
Modified: head/contrib/tcpdump/configure
==============================================================================
--- head/contrib/tcpdump/configure Wed Jun 8 22:29:30 2016 (r301700)
+++ head/contrib/tcpdump/configure Wed Jun 8 22:30:21 2016 (r301701)
@@ -4566,7 +4566,7 @@ fi
$as_echo_n "checking whether to sandbox using capsicum... " >&6; }
if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
-$as_echo "#define HAVE_CAPSPER 1" >>confdefs.h
+$as_echo "#define HAVE_CASPER 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
Modified: head/contrib/tcpdump/tcpdump.c
==============================================================================
--- head/contrib/tcpdump/tcpdump.c Wed Jun 8 22:29:30 2016 (r301700)
+++ head/contrib/tcpdump/tcpdump.c Wed Jun 8 22:30:21 2016 (r301701)
@@ -87,7 +87,7 @@ extern int SIZE_BUF;
#include <sys/capsicum.h>
#include <sys/sysctl.h>
#endif /* __FreeBSD__ */
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
#include <libcasper.h>
#include <casper/cap_dns.h>
#include <sys/nv.h>
@@ -96,7 +96,7 @@ extern int SIZE_BUF;
#include <net/bpf.h>
#include <fcntl.h>
#include <libgen.h>
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
#include <pcap.h>
#include <signal.h>
#include <stdio.h>
@@ -160,7 +160,7 @@ static int infoprint;
char *program_name;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_channel_t *capdns;
#endif
@@ -484,7 +484,7 @@ struct dump_info {
char *CurrentFileName;
pcap_t *pd;
pcap_dumper_t *p;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
int dirfd;
#endif
};
@@ -908,7 +908,7 @@ get_next_file(FILE *VFile, char *ptr)
return ret;
}
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
static cap_channel_t *
capdns_setup(void)
{
@@ -935,7 +935,7 @@ capdns_setup(void)
return (capdnsloc);
}
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
#ifdef HAVE_PCAP_SET_TSTAMP_PRECISION
static int
@@ -967,7 +967,7 @@ tstamp_precision_to_string(int precision
}
#endif
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
/*
* Ensure that, on a dump file's descriptor, we have all the rights
* necessary to make the standard I/O library work with an fdopen()ed
@@ -1067,9 +1067,9 @@ main(int argc, char **argv)
#endif
int status;
FILE *VFile;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_rights_t rights;
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
int cansandbox;
#ifdef WIN32
@@ -1610,7 +1610,7 @@ main(int argc, char **argv)
if (pd == NULL)
error("%s", ebuf);
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_rights_init(&rights, CAP_READ);
if (cap_rights_limit(fileno(pcap_file(pd)), &rights) < 0 &&
errno != ENOSYS) {
@@ -1847,10 +1847,10 @@ main(int argc, char **argv)
exit(0);
}
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (!nflag)
capdns = capdns_setup();
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
init_addrtoname(gndo, localnet, netmask);
init_checksum();
@@ -1918,7 +1918,7 @@ main(int argc, char **argv)
if (pcap_setfilter(pd, &fcode) < 0)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (RFileName == NULL && VFileName == NULL) {
static const unsigned long cmds[] = { BIOCGSTATS };
@@ -1968,11 +1968,11 @@ main(int argc, char **argv)
#endif /* HAVE_LIBCAP_NG */
if (p == NULL)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
set_dumper_capsicum_rights(p);
#endif
if (Cflag != 0 || Gflag != 0) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
dumpinfo.WFileName = strdup(basename(WFileName));
dumpinfo.dirfd = open(dirname(WFileName),
O_DIRECTORY | O_RDONLY);
@@ -1990,7 +1990,7 @@ main(int argc, char **argv)
errno != ENOSYS) {
error("unable to limit dump descriptor fcntls");
}
-#else /* !HAVE_CAPSPER */
+#else /* !HAVE_CASPER */
dumpinfo.WFileName = WFileName;
#endif
callback = dump_packet_and_trunc;
@@ -2066,7 +2066,7 @@ main(int argc, char **argv)
#ifdef __FreeBSD__
cansandbox = (VFileName == NULL && zflag == NULL);
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cansandbox = (cansandbox && (nflag || capdns != NULL));
#else
cansandbox = (cansandbox && nflag);
@@ -2122,7 +2122,7 @@ main(int argc, char **argv)
pd = pcap_open_offline(RFileName, ebuf);
if (pd == NULL)
error("%s", ebuf);
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_rights_init(&rights, CAP_READ);
if (cap_rights_limit(fileno(pcap_file(pd)),
&rights) < 0 && errno != ENOSYS) {
@@ -2325,7 +2325,7 @@ dump_packet_and_trunc(u_char *user, cons
/* If the time is greater than the specified window, rotate */
if (t - Gflag_time >= Gflag) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
FILE *fp;
int fd;
#endif
@@ -2383,7 +2383,7 @@ dump_packet_and_trunc(u_char *user, cons
capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE);
capng_apply(CAPNG_SELECT_BOTH);
#endif /* HAVE_LIBCAP_NG */
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
fd = openat(dump_info->dirfd,
dump_info->CurrentFileName,
O_CREAT | O_WRONLY | O_TRUNC, 0644);
@@ -2397,7 +2397,7 @@ dump_packet_and_trunc(u_char *user, cons
dump_info->CurrentFileName);
}
dump_info->p = pcap_dump_fopen(dump_info->pd, fp);
-#else /* !HAVE_CAPSPER */
+#else /* !HAVE_CASPER */
dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName);
#endif
#ifdef HAVE_LIBCAP_NG
@@ -2406,7 +2406,7 @@ dump_packet_and_trunc(u_char *user, cons
#endif /* HAVE_LIBCAP_NG */
if (dump_info->p == NULL)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
set_dumper_capsicum_rights(dump_info->p);
#endif
}
@@ -2423,7 +2423,7 @@ dump_packet_and_trunc(u_char *user, cons
if (size == -1)
error("ftell fails on output file");
if (size > Cflag) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
FILE *fp;
int fd;
#endif
@@ -2455,7 +2455,7 @@ dump_packet_and_trunc(u_char *user, cons
capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE);
capng_apply(CAPNG_SELECT_BOTH);
#endif /* HAVE_LIBCAP_NG */
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
fd = openat(dump_info->dirfd, dump_info->CurrentFileName,
O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (fd < 0) {
@@ -2468,7 +2468,7 @@ dump_packet_and_trunc(u_char *user, cons
dump_info->CurrentFileName);
}
dump_info->p = pcap_dump_fopen(dump_info->pd, fp);
-#else /* !HAVE_CAPSPER */
+#else /* !HAVE_CASPER */
dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName);
#endif
#ifdef HAVE_LIBCAP_NG
@@ -2477,7 +2477,7 @@ dump_packet_and_trunc(u_char *user, cons
#endif /* HAVE_LIBCAP_NG */
if (dump_info->p == NULL)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
set_dumper_capsicum_rights(dump_info->p);
#endif
}
Modified: head/usr.sbin/tcpdump/tcpdump/config.h
==============================================================================
--- head/usr.sbin/tcpdump/tcpdump/config.h Wed Jun 8 22:29:30 2016 (r301700)
+++ head/usr.sbin/tcpdump/tcpdump/config.h Wed Jun 8 22:30:21 2016 (r301701)
@@ -15,7 +15,7 @@
/* capsicum support available */
/* See Makefile */
-/* #undef HAVE_CAPSPER */
+/* #undef HAVE_CASPER */
/* Define to 1 if you have the `cap_enter' function. */
#define HAVE_CAP_ENTER 1
More information about the svn-src-all
mailing list