summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/bin/check/check-tool.c
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2012-12-07 12:39:58 +0000
committererwin <erwin@FreeBSD.org>2012-12-07 12:39:58 +0000
commit5d8c8fc50b9836a3c4a9d975721d7682dd286965 (patch)
treec3abb28c9e8cb3396d1d00b0af4f9a474adaf5f5 /contrib/bind9/bin/check/check-tool.c
parentd4467dc03357aa391339c667b9bce1af3f0455d9 (diff)
parent4d1484242d381404f6b827320dad3260370137c8 (diff)
downloadFreeBSD-src-5d8c8fc50b9836a3c4a9d975721d7682dd286965.zip
FreeBSD-src-5d8c8fc50b9836a3c4a9d975721d7682dd286965.tar.gz
Update to 9.8.4-P1.
Security Fixes Prevents named from aborting with a require assertion failure on servers with DNS64 enabled. These crashes might occur as a result of specific queries that are received. New Features * Elliptic Curve Digital Signature Algorithm keys and signatures in DNSSEC are now supported per RFC 6605. [RT #21918] Feature Changes * Improves OpenSSL error logging [RT #29932] * nslookup now returns a nonzero exit code when it is unable to get an answer. [RT #29492] Other critical bug fixes are included. Approved by: delphij (mentor) MFC after: 3 days Security: CVE-2012-5688 Sponsored by: DK Hostmaster A/S
Diffstat (limited to 'contrib/bind9/bin/check/check-tool.c')
-rw-r--r--contrib/bind9/bin/check/check-tool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/bind9/bin/check/check-tool.c b/contrib/bind9/bin/check/check-tool.c
index 422d9b1..2bf16a6 100644
--- a/contrib/bind9/bin/check/check-tool.c
+++ b/contrib/bind9/bin/check/check-tool.c
@@ -639,6 +639,9 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
{
isc_result_t result;
FILE *output = stdout;
+ const char *flags;
+
+ flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
if (debug) {
if (filename != NULL && strcmp(filename, "-") != 0)
@@ -649,7 +652,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
}
if (filename != NULL && strcmp(filename, "-") != 0) {
- result = isc_stdio_open(filename, "w+", &output);
+ result = isc_stdio_open(filename, flags, &output);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "could not open output "
OpenPOWER on IntegriCloud