summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-04-26 22:23:53 +0200
committerYves-Alexis Perez <corsac@debian.org>2013-04-26 22:23:53 +0200
commit0d59784a3b5235490fe3c62c6346d19eee6f6b40 (patch)
tree98fba92dc097e93ca01ade14773ae31f33ca6693
parente8f63514e9b56f6a2f977a56438d59ccab45bdca (diff)
downloadvyos-strongswan-0d59784a3b5235490fe3c62c6346d19eee6f6b40.tar.gz
vyos-strongswan-0d59784a3b5235490fe3c62c6346d19eee6f6b40.zip
02_fix-printf-dnssec-script added backported from upstream, fix printf() statements.
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/02_fix-printf-dnssec-script.patch91
-rw-r--r--debian/patches/series1
3 files changed, 96 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 50412cf8b..f5f3ebf18 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-strongswan (5.0.2-1) UNRELEASED; urgency=low
+strongswan (5.0.3-1) UNRELEASED; urgency=low
* New upstream release.
* debian/patches:
@@ -7,6 +7,8 @@ strongswan (5.0.2-1) UNRELEASED; urgency=low
- 03_Pass-lo-as-faked-tundev-to-NM-as-it-now-needs-a-vali removed,
included upstream.
- 04-Fixed-IPv6-source-address-lookup dropped, included upstream.
+ - 02_fix-printf-dnssec-script added backported from upstream, fix printf()
+ statements.
* debian/rules:
- --enable-smartcard, --with-default-pkcs11 and --enable-nat-transport not
valid anymore for ./configure, remove them.
@@ -30,7 +32,7 @@ strongswan (5.0.2-1) UNRELEASED; urgency=low
* debian/strongswan-starter.* remove references to pluto.
* debian/po: update potfiles for new phrasing.
- -- Yves-Alexis Perez <corsac@debian.org> Thu, 07 Feb 2013 13:27:53 +0100
+ -- Yves-Alexis Perez <corsac@debian.org> Fri, 26 Apr 2013 14:57:54 +0200
strongswan (4.6.4-6) unstable; urgency=low
diff --git a/debian/patches/02_fix-printf-dnssec-script.patch b/debian/patches/02_fix-printf-dnssec-script.patch
new file mode 100644
index 000000000..1015a08ad
--- /dev/null
+++ b/debian/patches/02_fix-printf-dnssec-script.patch
@@ -0,0 +1,91 @@
+From 1a185ae14b5073d0d5358ff5e2a98d2ff07d7558 Mon Sep 17 00:00:00 2001
+From: Andreas Steffen <andreas.steffen@strongswan.org>
+Date: Mon, 8 Apr 2013 22:21:14 +0200
+Subject: [PATCH] fixed printf statements
+
+---
+ configure.in | 2 +-
+ scripts/dnssec.c | 37 ++++++++++++++++++++++++++++---------
+ 2 files changed, 29 insertions(+), 10 deletions(-)
+
+--- a/scripts/dnssec.c
++++ b/scripts/dnssec.c
+@@ -16,25 +16,47 @@
+ #include <stdio.h>
+
+ #include <library.h>
++#include <utils/debug.h>
++
++/**
++ * Define debug level
++ */
++static level_t dbg_level = 1;
++
++static void dbg_dnssec(debug_t group, level_t level, char *fmt, ...)
++{
++ if ((level <= dbg_level) || level <= 1)
++ {
++ va_list args;
++
++ va_start(args, fmt);
++ vfprintf(stderr, fmt, args);
++ fprintf(stderr, "\n");
++ va_end(args);
++ }
++}
+
+ int main(int argc, char *argv[])
+ {
+ resolver_t *resolver;
+ resolver_response_t *response;
+ enumerator_t *enumerator;
++ chunk_t rdata;
+ rr_set_t *rrset;
+ rr_t *rr;
+- chunk_t chunk;
+
+ library_init(NULL);
+ atexit(library_deinit);
++
++ dbg = dbg_dnssec;
++
+ if (!lib->plugins->load(lib->plugins, NULL, PLUGINS))
+ {
+ return 1;
+ }
+ if (argc != 2)
+ {
+- fprintf(stderr, "usage: %s <name>\n", argv[0]);
++ fprintf(stderr, "usage: dnssec <name>\n");
+ return 1;
+ }
+
+@@ -82,9 +104,7 @@ int main(int argc, char *argv[])
+ enumerator = rrset->create_rr_enumerator(rrset);
+ while (enumerator->enumerate(enumerator, &rr))
+ {
+- printf(" name: ");
+- printf(rr->get_name(rr));
+- printf("\n");
++ printf(" name: %s\n", rr->get_name(rr));
+ }
+
+ enumerator = rrset->create_rrsig_enumerator(rrset);
+@@ -93,13 +113,10 @@ int main(int argc, char *argv[])
+ printf(" RRSIGs for the RRset:\n");
+ while (enumerator->enumerate(enumerator, &rr))
+ {
+- printf(" name: ");
+- printf(rr->get_name(rr));
+- printf("\n RDATA: ");
+- chunk = rr->get_rdata(rr);
+- chunk = chunk_to_hex(chunk, NULL, TRUE);
+- printf(chunk.ptr);
+- printf("\n");
++ rdata = rr->get_rdata(rr);
++
++ printf(" name: %s\n", rr->get_name(rr));
++ printf(" RDATA: %#B\n", &rdata);
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 2cf256b6c..938b8a0ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01_fix-manpages.patch
+02_fix-printf-dnssec-script.patch