knot: update to 2.1.1

Signed-off-by: Daniel Salzman <daniel.salzman@nic.cz>
This commit is contained in:
Daniel Salzman
2016-02-11 17:31:08 +01:00
parent ac633e9f3f
commit 4a54847916
8 changed files with 200 additions and 169 deletions
-21
View File
@@ -1,21 +0,0 @@
diff --git a/src/libknot/dnssec/key.c b/src/libknot/dnssec/key.c
index 7dc0540..3e351bb 100644
--- a/src/libknot/dnssec/key.c
+++ b/src/libknot/dnssec/key.c
@@ -260,7 +260,15 @@ static int key_param_time(const void *save_to, char *value)
struct tm parsed = { 0 };
- if (!strptime(value, "%Y%m%d%H%M%S", &parsed)) {
+ if (strlen(value) != 14) {
+ return KNOT_EINVAL;
+ }
+
+ char *v = value;
+ char buf[32] = "";
+ int ret = sprintf(buf, "%.4s %.2s %.2s %.2s %.2s %.2s",
+ v, v + 4, v + 6, v + 8, v + 10, v + 12);
+ if (ret != 19 || !strptime(buf, "%Y %m %d %H %M %S", &parsed)) {
return KNOT_EINVAL;
}
+25
View File
@@ -0,0 +1,25 @@
diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
index 9a4af53..f9b45bf 100644
--- a/src/zscanner/tests/unittests.in
+++ b/src/zscanner/tests/unittests.in
@@ -1,15 +1,14 @@
#!/bin/sh
-SOURCE=@top_srcdir@/src/zscanner/tests
-BUILD=@top_builddir@/src/zscanner/tests
+SOURCE="."
+BUILD="/tmp/knot-test"
+mkdir -p "$BUILD"
-. @top_srcdir@/libtap/tap/libtap.sh
-
-cd "$BUILD"
+. ../tap/libtap.sh
TMPDIR=$(test_tmpdir)
TESTS_DIR="$SOURCE"/data
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
+ZSCANNER_TOOL=./zscanner-tool
plan 71
+9 -24
View File
@@ -1,28 +1,13 @@
diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in
index 956e8a9..a068e67 100644
index e07c8a7..ecc13ad 100644
--- a/samples/knot.sample.conf.in
+++ b/samples/knot.sample.conf.in
@@ -14,7 +14,7 @@ system {
@@ -9,7 +9,7 @@ server:
# Listen on all configured IPv6 interfaces.
listen: ::@53
# User for running the server.
- # user: knot:knot
+ user: knot:knot
# User for running server
# May also specify user.group (e.g. knot.knot)
- user knot.knot;
+ user root.root;
# Directory for storing run-time data
# e.g. PID file and control sockets
@@ -63,11 +63,11 @@ zones {
# storage "@storage_dir@";
#
# Example master zone
-# example.com {
-# file "@config_dir@/example.com.zone";
+ example.com {
+ file "example.com.zone";
# xfr-out slave0;
# notify-out slave0;
-# }
+ }
#
# Example slave zone
# example.net {
log:
# Log info and more serious events to syslog.
+15
View File
@@ -0,0 +1,15 @@
diff --git a/libtap/tap/files.c b/libtap/tap/files.c
index 0c24075..d33db6c 100644
--- a/libtap/tap/files.c
+++ b/libtap/tap/files.c
@@ -27,6 +27,10 @@
#include <sys/types.h>
#include <unistd.h>
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
char *test_mkdtemp(void)
{
char *tmpdir = getenv("TMPDIR");
-41
View File
@@ -1,41 +0,0 @@
diff --git a/src/zscanner/tests/TESTS b/src/zscanner/tests/TESTS
index c88aef1..4e2148f 100644
--- a/src/zscanner/tests/TESTS
+++ b/src/zscanner/tests/TESTS
@@ -18,10 +18,8 @@
05-2_TTL
05-3_TTL
05-4_TTL
-06-0_INCLUDE
06-1_INCLUDE
06-2_INCLUDE
-06-3_INCLUDE
06-4_INCLUDE
06-5_INCLUDE
06-6_INCLUDE
diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
index 846f351..272856c 100644
--- a/src/zscanner/tests/unittests.in
+++ b/src/zscanner/tests/unittests.in
@@ -1,9 +1,9 @@
#!/bin/sh
-SOURCE=@top_srcdir@/src/zscanner/tests
-BUILD=@top_builddir@/src/zscanner/tests
+SOURCE="."
+BUILD="."
-. @top_srcdir@/libtap/tap/libtap.sh
+. ../tap/libtap.sh
cd "$BUILD"
@@ -11,7 +11,7 @@ TMPDIR=$(test_tmpdir)
TESTS_DIR="$SOURCE"/data
ZSCANNER_TOOL="$BUILD"/zscanner-tool
-plan 71
+plan 69
mkdir -p "$TMPDIR"/includes/
for a in 1 2 3 4 5 6; do