Remove unused patches
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
1321c082e2
commit
ae46f2a59d
@ -1,80 +0,0 @@
|
||||
From de7c59d25d9fd2464543d649951b2ae47c2a839b Mon Sep 17 00:00:00 2001
|
||||
From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9>
|
||||
Date: Wed, 21 Aug 2013 13:31:09 +0000
|
||||
Subject: [PATCH] - Fix#520: Errors found by static analysis from Tomas
|
||||
Hozza(redhat).
|
||||
|
||||
git-svn-id: http://unbound.nlnetlabs.nl/svn/trunk@2942 be551aaa-1e26-0410-a405-d3ace91eadb9
|
||||
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
||||
---
|
||||
libunbound/libworker.c | 3 +++
|
||||
testcode/streamtcp.c | 2 +-
|
||||
util/tube.c | 2 +-
|
||||
validator/autotrust.c | 6 +++++-
|
||||
4 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libunbound/libworker.c b/libunbound/libworker.c
|
||||
index dd3316d..8f2aa48 100644
|
||||
--- a/libunbound/libworker.c
|
||||
+++ b/libunbound/libworker.c
|
||||
@@ -198,7 +198,10 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
|
||||
}
|
||||
numports = cfg_condense_ports(cfg, &ports);
|
||||
if(numports == 0) {
|
||||
+ int locked = !w->is_bg || w->is_bg_thread;
|
||||
libworker_delete(w);
|
||||
+ if(locked)
|
||||
+ lock_basic_unlock(&ctx->cfglock);
|
||||
return NULL;
|
||||
}
|
||||
w->back = outside_network_create(w->base, cfg->msg_buffer_size,
|
||||
diff --git a/testcode/streamtcp.c b/testcode/streamtcp.c
|
||||
index dbdf140..06a18e4 100644
|
||||
--- a/testcode/streamtcp.c
|
||||
+++ b/testcode/streamtcp.c
|
||||
@@ -121,9 +121,9 @@ write_q(int fd, int udp, SSL* ssl, ldns_buffer* buf, uint16_t id,
|
||||
exit(1);
|
||||
}
|
||||
qinfo.qname = memdup(ldns_rdf_data(rdf), ldns_rdf_size(rdf));
|
||||
+ if(!qinfo.qname) fatal_exit("out of memory");
|
||||
(void)dname_count_size_labels(qinfo.qname, &qinfo.qname_len);
|
||||
ldns_rdf_deep_free(rdf);
|
||||
- if(!qinfo.qname) fatal_exit("out of memory");
|
||||
|
||||
/* qtype and qclass */
|
||||
qinfo.qtype = ldns_get_rr_type_by_name(strtype);
|
||||
diff --git a/util/tube.c b/util/tube.c
|
||||
index 28c51d7..fde8496 100644
|
||||
--- a/util/tube.c
|
||||
+++ b/util/tube.c
|
||||
@@ -368,7 +368,7 @@ int tube_read_msg(struct tube* tube, uint8_t** buf, uint32_t* len,
|
||||
return 0;
|
||||
}
|
||||
d = 0;
|
||||
- while(d != (ssize_t)*len) {
|
||||
+ while(d < (ssize_t)*len) {
|
||||
if((r=read(fd, (*buf)+d, (size_t)((ssize_t)*len)-d)) == -1) {
|
||||
log_err("tube msg read failed: %s", strerror(errno));
|
||||
(void)fd_set_nonblock(fd);
|
||||
diff --git a/validator/autotrust.c b/validator/autotrust.c
|
||||
index 1e24b4c..dc7cbf6 100644
|
||||
--- a/validator/autotrust.c
|
||||
+++ b/validator/autotrust.c
|
||||
@@ -976,9 +976,13 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
||||
char* fname = tp->autr->file;
|
||||
char tempf[2048];
|
||||
log_assert(tp->autr);
|
||||
+ if(!env) {
|
||||
+ log_err("autr_write_file: Module environment is NULL.");
|
||||
+ return;
|
||||
+ }
|
||||
/* unique name with pid number and thread number */
|
||||
snprintf(tempf, sizeof(tempf), "%s.%d-%d", fname, (int)getpid(),
|
||||
- env&&env->worker?*(int*)env->worker:0);
|
||||
+ env->worker?*(int*)env->worker:0);
|
||||
verbose(VERB_ALGO, "autotrust: write to disk: %s", tempf);
|
||||
out = fopen(tempf, "w");
|
||||
if(!out) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Naur unbound-1.4.20-orig/util/data/msgencode.c unbound-1.4.20/util/data/msgencode.c
|
||||
--- unbound-1.4.20-orig/util/data/msgencode.c 2012-04-10 05:16:39.000000000 -0400
|
||||
+++ unbound-1.4.20/util/data/msgencode.c 2013-05-21 15:47:01.435609420 -0400
|
||||
@@ -659,7 +659,7 @@
|
||||
}
|
||||
}
|
||||
/* roundrobin offset. using query id for random number */
|
||||
- rr_offset = RRSET_ROUNDROBIN?id:0;
|
||||
+ rr_offset = RRSET_ROUNDROBIN ? ntohs(id) : 0;
|
||||
|
||||
/* insert answer section */
|
||||
if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer,
|
@ -1,86 +0,0 @@
|
||||
From 2af92efb1f128ef43313e890182ff23e94276dca Mon Sep 17 00:00:00 2001
|
||||
From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9>
|
||||
Date: Fri, 19 Jul 2013 10:46:16 +0000
|
||||
Subject: [PATCH] - streamtcp man page, contributed by Tomas Hozza.
|
||||
|
||||
git-svn-id: http://unbound.nlnetlabs.nl/svn/trunk@2924 be551aaa-1e26-0410-a405-d3ace91eadb9
|
||||
---
|
||||
testcode/streamtcp.1 | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 66 insertions(+)
|
||||
create mode 100644 testcode/streamtcp.1
|
||||
|
||||
diff --git a/testcode/streamtcp.1 b/testcode/streamtcp.1
|
||||
new file mode 100644
|
||||
index 0000000..7c738d9
|
||||
--- /dev/null
|
||||
+++ b/testcode/streamtcp.1
|
||||
@@ -0,0 +1,66 @@
|
||||
+.TH "unbound\-streamtcp" "1" "Mar 21, 2013" "NLnet Labs" "unbound"
|
||||
+.\"
|
||||
+.\" unbound-streamtcp.1 -- unbound DNS lookup utility
|
||||
+.\"
|
||||
+.SH "NAME"
|
||||
+.LP
|
||||
+.B unbound\-streamtcp
|
||||
+\- unbound DNS lookup utility
|
||||
+.SH "SYNOPSIS"
|
||||
+.LP
|
||||
+.B unbound\-streamtcp
|
||||
+.RB [ \-unsh ]
|
||||
+.RB [ \-f
|
||||
+.IR ipaddr[@port] ]
|
||||
+.I name
|
||||
+.I type
|
||||
+.I class
|
||||
+.SH "DESCRIPTION"
|
||||
+.LP
|
||||
+.B unbound\-streamtcp
|
||||
+sends a DNS Query of the given \fBtype\fR and \fBclass\fR for the given \fBname\fR
|
||||
+to the DNS server over TCP and displays the response.
|
||||
+.P
|
||||
+If the server to query is not given using the \fB\-f\fR option then localhost
|
||||
+(127.0.0.1) is used. More queries can be given on one commandline, they
|
||||
+are resolved in sequence.
|
||||
+.P
|
||||
+The available options are:
|
||||
+.TP
|
||||
+.I name
|
||||
+This name is resolved (looked up in the DNS).
|
||||
+.TP
|
||||
+.I type
|
||||
+Specify the type of data to lookup.
|
||||
+.TP
|
||||
+.I class
|
||||
+Specify the class to lookup for.
|
||||
+.TP
|
||||
+.B \-u
|
||||
+Use UDP instead of TCP. No retries are attempted.
|
||||
+.TP
|
||||
+.B \-n
|
||||
+Do not wait for the answer.
|
||||
+.TP
|
||||
+.B \-s
|
||||
+Use SSL.
|
||||
+.TP
|
||||
+.B \-h
|
||||
+Print program usage.
|
||||
+.TP
|
||||
+.B \-f \fIipaddr[@port]
|
||||
+Specify the server to send the queries to. If not specified localhost (127.0.0.1) is used.
|
||||
+.SH "EXAMPLES"
|
||||
+.LP
|
||||
+Some examples of use.
|
||||
+.P
|
||||
+$ unbound\-streamtcp www.example.com A IN
|
||||
+.P
|
||||
+$ unbound\-streamtcp \-f 192.168.1.1 www.example.com SOA IN
|
||||
+.P
|
||||
+$ unbound\-streamtcp \-f 192.168.1.1@1234 153.1.168.192.in\-addr.arpa. PTR IN
|
||||
+.SH "EXIT CODE"
|
||||
+The unbound\-streamtcp program exits with status code 1 on error,
|
||||
+0 on no error.
|
||||
+.SH "AUTHOR"
|
||||
+This manual page was written by Tomas Hozza <thozza@redhat.com>.
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user