diff --git a/contrib/tcpdump/addrtoname.c b/contrib/tcpdump/addrtoname.c index 85cbf7b73179..7070bbfb9e17 100644 --- a/contrib/tcpdump/addrtoname.c +++ b/contrib/tcpdump/addrtoname.c @@ -26,10 +26,10 @@ #include "config.h" #endif -#ifdef HAVE_CASPER +#ifdef WITH_CASPER #include #include -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #include @@ -202,7 +202,7 @@ intoa(uint32_t addr) static uint32_t f_netmask; static uint32_t f_localnet; -#ifdef HAVE_CASPER +#ifdef WITH_CASPER extern cap_channel_t *capdns; #endif @@ -250,7 +250,7 @@ getname(netdissect_options *ndo, const u_char *ap) */ if (!ndo->ndo_nflag && (addr & f_netmask) == f_localnet) { -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, 4, AF_INET); @@ -311,7 +311,7 @@ getname6(netdissect_options *ndo, const u_char *ap) * Do not print names if -n was given. */ if (!ndo->ndo_nflag) { -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, sizeof(addr), AF_INET6); diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index 527f39d92e47..893fe2e9b27e 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -82,10 +82,10 @@ The Regents of the University of California. All rights reserved.\n"; #include #include #include -#ifdef HAVE_CASPER +#ifdef WITH_CASPER #include #include -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #endif /* HAVE_CAPSICUM */ #include #include @@ -176,7 +176,7 @@ static int infoprint; char *program_name; -#ifdef HAVE_CASPER +#ifdef WITH_CASPER cap_channel_t *capdns; #endif @@ -730,7 +730,7 @@ get_next_file(FILE *VFile, char *ptr) return ret; } -#ifdef HAVE_CASPER +#ifdef WITH_CASPER static cap_channel_t * capdns_setup(void) { @@ -757,7 +757,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #ifdef HAVE_PCAP_SET_TSTAMP_PRECISION static int @@ -1839,10 +1839,10 @@ main(int argc, char **argv) exit_tcpdump(0); } -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (!ndo->ndo_nflag) capdns = capdns_setup(); -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ init_print(ndo, localnet, netmask, timezone_offset); @@ -2066,11 +2066,11 @@ main(int argc, char **argv) #ifdef HAVE_CAPSICUM cansandbox = (VFileName == NULL && zflag == NULL); -#ifdef HAVE_CASPER +#ifdef WITH_CASPER cansandbox = (cansandbox && (ndo->ndo_nflag || capdns != NULL)); #else cansandbox = (cansandbox && ndo->ndo_nflag); -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); #endif /* HAVE_CAPSICUM */ diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index a007d48d9dde..c74065a08836 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -227,7 +227,7 @@ static const char rcsid[] = #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include #endif @@ -369,7 +369,7 @@ extern int optind; extern int opterr; extern char *optarg; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns; #endif @@ -521,7 +521,7 @@ main(int argc, char **argv) int requestPort = -1; int sump = 0; int sockerrno; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER const char *types[] = { "NAME", "ADDR" }; int families[1]; cap_channel_t *casper; @@ -556,7 +556,7 @@ main(int argc, char **argv) exit(1); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER casper = cap_init(); if (casper == NULL) errx(1, "unable to create casper process"); @@ -568,7 +568,7 @@ main(int argc, char **argv) families[0] = AF_INET; if (cap_dns_family_limit(capdns, families, 1) < 0) errx(1, "unable to limit access to system.dns service"); -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ #ifdef IPCTL_DEFTTL { @@ -584,7 +584,7 @@ main(int argc, char **argv) max_ttl = 30; #endif -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER cap_close(casper); #endif @@ -1006,7 +1006,7 @@ main(int argc, char **argv) exit(1); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER cansandbox = true; #else if (nflag) @@ -1851,7 +1851,7 @@ inetname(struct in_addr in) else { cp = strchr(domain, '.'); if (cp == NULL) { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname(capdns, domain); else @@ -1870,7 +1870,7 @@ inetname(struct in_addr in) } } if (!nflag && in.s_addr != INADDR_ANY) { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyaddr(capdns, (char *)&in, sizeof(in), AF_INET); @@ -1922,7 +1922,7 @@ gethostinfo(register char *hostname) return (hi); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname(capdns, hostname); else diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index 21a4dccc01d9..12f00ffe5d1f 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -14,7 +14,7 @@ LIBADD= m .if ${MK_CASPER} != "no" && !defined(RESCUE) LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif .if !defined(RELEASE_CRUNCH) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 87817a67862b..266dd0c96cf9 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include #endif @@ -204,13 +204,13 @@ static double tsumsq = 0.0; /* sum of all times squared, for std. dev. */ static volatile sig_atomic_t finish_up; static volatile sig_atomic_t siginfo_p; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns; #endif static void fill(char *, char *); static u_short in_cksum(u_short *, int); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns_setup(void); #endif static void check_status(void); @@ -563,7 +563,7 @@ main(int argc, char *const *argv) if (options & F_PINGFILLED) { fill((char *)datap, payload); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER capdns = capdns_setup(); #endif if (source) { @@ -572,7 +572,7 @@ main(int argc, char *const *argv) if (inet_aton(source, &sock_in.sin_addr) != 0) { shostname = source; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, source, AF_INET); @@ -606,7 +606,7 @@ main(int argc, char *const *argv) if (inet_aton(target, &to->sin_addr) != 0) { hostname = target; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, target, AF_INET); else @@ -624,7 +624,7 @@ main(int argc, char *const *argv) hostname = hnamebuf; } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER /* From now on we will use only reverse DNS lookups. */ if (capdns != NULL) { const char *types[1]; @@ -722,7 +722,7 @@ main(int argc, char *const *argv) if (options & F_NUMERIC) cansandbox = true; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER else if (capdns != NULL) cansandbox = true; #endif @@ -1707,7 +1707,7 @@ pr_addr(struct in_addr ina) if (options & F_NUMERIC) return inet_ntoa(ina); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyaddr(capdns, (char *)&ina, 4, AF_INET); else @@ -1791,7 +1791,7 @@ fill(char *bp, char *patp) } } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t * capdns_setup(void) { @@ -1817,7 +1817,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) #define SECOPT " [-P policy]" diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile index c91704efdeda..e1b9d4fd68a2 100644 --- a/usr.bin/kdump/Makefile +++ b/usr.bin/kdump/Makefile @@ -14,7 +14,7 @@ LIBADD= sysdecode LIBADD+= casper LIBADD+= cap_grp LIBADD+= cap_pwd -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif #NO_WERROR?= YES diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 005fdefc5508..986c7fe78acd 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #endif #include @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include "ktrace.h" -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include @@ -164,7 +164,7 @@ struct proc_info static TAILQ_HEAD(trace_procs, proc_info) trace_procs; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *cappwd, *capgrp; #endif @@ -193,7 +193,7 @@ localtime_init(void) (void)localtime(<ime); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static int cappwdgrp_setup(cap_channel_t **cappwdp, cap_channel_t **capgrpp) { @@ -235,7 +235,7 @@ cappwdgrp_setup(cap_channel_t **cappwdp, cap_channel_t **capgrpp) *capgrpp = capgrploc; return (0); } -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ static void print_integer_arg(const char *(*decoder)(int), int value) @@ -443,7 +443,7 @@ main(int argc, char *argv[]) strerror_init(); localtime_init(); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (resolv != 0) { if (cappwdgrp_setup(&cappwd, &capgrp) < 0) { cappwd = NULL; @@ -1874,7 +1874,7 @@ ktrstat(struct stat *statp) if (resolv == 0) { pwd = NULL; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (cappwd != NULL) pwd = cap_getpwuid(cappwd, statp->st_uid); else @@ -1888,7 +1888,7 @@ ktrstat(struct stat *statp) if (resolv == 0) { grp = NULL; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capgrp != NULL) grp = cap_getgrgid(capgrp, statp->st_gid); else diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile index 8f6f47754b4d..19a1101b6446 100644 --- a/usr.sbin/tcpdump/tcpdump/Makefile +++ b/usr.sbin/tcpdump/tcpdump/Makefile @@ -190,7 +190,7 @@ LIBADD= l pcap .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_CASPER +CFLAGS+=-DWITH_CASPER .endif .if ${MK_OPENSSL} != "no" LIBADD+= crypto diff --git a/usr.sbin/tcpdump/tcpdump/config.h b/usr.sbin/tcpdump/tcpdump/config.h index 8980b31c8591..1d8bf719c122 100644 --- a/usr.sbin/tcpdump/tcpdump/config.h +++ b/usr.sbin/tcpdump/tcpdump/config.h @@ -18,7 +18,7 @@ /* Casper library support available */ /* See Makefile */ -/* #undef HAVE_CASPER */ +/* #undef WITH_CASPER */ /* Define to 1 if you have the `cap_enter' function. */ #define HAVE_CAP_ENTER 1 diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile index 41f40772df03..ada19698a9a1 100644 --- a/usr.sbin/traceroute/Makefile +++ b/usr.sbin/traceroute/Makefile @@ -33,7 +33,7 @@ LIBADD+= ipsec .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif CFLAGS+= -I${TRACEROUTE_DISTDIR}