[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Tue Aug 4 11:42:04 UTC 2015
The branch, master has been updated
via 9c48dbd dns_server: Fix CNAME handling
via 3fbcd78 dns_server: Add NULL check
from 28de101 lib/util/debug.h uses va_list, needs stdarg.h
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9c48dbde06ac7d0c3cea52401ddf78e604e02b83
Author: Volker Lendecke <vl at samba.org>
Date: Sat Aug 1 17:59:14 2015 +0200
dns_server: Fix CNAME handling
recs[i].wtype is == DNS_TYPE_CNAME, and my understanding of the union is that
data.cname is filled. We get away with this, because ipv4 and ipv6 have the
same char * representation, but it's confusing.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ira Cooper <ira at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Tue Aug 4 13:41:17 CEST 2015 on sn-devel-104
commit 3fbcd78a75fc8312432dec38b7dfd1d6df80e8e0
Author: Volker Lendecke <vl at samba.org>
Date: Sat Aug 1 17:53:56 2015 +0200
dns_server: Add NULL check
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ira Cooper <ira at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source4/dns_server/dns_query.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c
index 4e3c6cc..3cafc23 100644
--- a/source4/dns_server/dns_query.c
+++ b/source4/dns_server/dns_query.c
@@ -91,6 +91,7 @@ static WERROR create_response_rr(const struct dns_name_question *question,
break;
case DNS_QTYPE_PTR:
ans[ai].rdata.ptr_record = talloc_strdup(ans, rec->data.ptr);
+ W_ERROR_HAVE_NO_MEMORY(ans[ai].rdata.ptr_record);
break;
case DNS_QTYPE_MX:
ans[ai].rdata.mx_record.preference = rec->data.mx.wPriority;
@@ -308,11 +309,7 @@ static WERROR handle_question(struct dns_server *dns,
/* First build up the new question */
new_q->question_type = question->question_type;
new_q->question_class = question->question_class;
- if (new_q->question_type == DNS_QTYPE_A) {
- new_q->name = talloc_strdup(new_q, recs[ri].data.ipv4);
- } else if (new_q->question_type == DNS_QTYPE_AAAA) {
- new_q->name = talloc_strdup(new_q, recs[ri].data.ipv6);
- }
+ new_q->name = talloc_strdup(new_q, recs[ri].data.cname);
if (new_q->name == NULL) {
TALLOC_FREE(new_q);
return WERR_NOMEM;
--
Samba Shared Repository
More information about the samba-cvs
mailing list