diff options
| author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2013-12-19 00:51:48 +0000 |
|---|---|---|
| committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2013-12-19 00:51:48 +0000 |
| commit | 8ff3952b7279d437be574f7c7a5d083b1a9bfe41 (patch) | |
| tree | d9b0eac01a14f6e2d24b5d263f6f218e82ddc555 /contrib/tcpdump | |
| parent | 41067328826a1d41163d95920a830e0f52da173a (diff) | |
Notes
Diffstat (limited to 'contrib/tcpdump')
| -rw-r--r-- | contrib/tcpdump/tcpdump.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index e1a34f4ea934..f1e696f42b5b 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -710,24 +710,16 @@ capdns_setup(void) capdnsloc = cap_service_open(capcas, "system.dns"); /* Casper capability no longer needed. */ cap_close(capcas); - if (capdnsloc == NULL) { - warning("unable to open system.dns service"); - return (NULL); - } + if (capdnsloc == NULL) + error("unable to open system.dns service"); /* Limit system.dns to reverse DNS lookups. */ types[0] = "ADDR"; - if (cap_dns_type_limit(capdnsloc, types, 1) < 0) { - warning("unable to limit access to system.dns service"); - cap_close(capdnsloc); - return (NULL); - } + if (cap_dns_type_limit(capdnsloc, types, 1) < 0) + error("unable to limit access to system.dns service"); families[0] = AF_INET; families[1] = AF_INET6; - if (cap_dns_family_limit(capdnsloc, families, 2) < 0) { - warning("unable to limit access to system.dns service"); - cap_close(capdnsloc); - return (NULL); - } + if (cap_dns_family_limit(capdnsloc, families, 2) < 0) + error("unable to limit access to system.dns service"); return (capdnsloc); } |
