summaryrefslogtreecommitdiff
path: root/source4/dns_server/dns_update.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-02-28 17:01:27 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-03-02 00:24:50 +1100
commit78446b42b7bed565dff75db73e8efcd3835808c0 (patch)
treeb99d8394a4feb296432f64700671c97c4c5f7846 /source4/dns_server/dns_update.c
parente5409ad0ca0517118c261fa924221fd18afaf66d (diff)
downloadsamba-78446b42b7bed565dff75db73e8efcd3835808c0.tar.gz
samba-78446b42b7bed565dff75db73e8efcd3835808c0.tar.bz2
samba-78446b42b7bed565dff75db73e8efcd3835808c0.zip
s4-dns: Fix handling of TXT DNS Record
Diffstat (limited to 'source4/dns_server/dns_update.c')
-rw-r--r--source4/dns_server/dns_update.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/dns_server/dns_update.c b/source4/dns_server/dns_update.c
index 3fd612cfab..62cf9e555a 100644
--- a/source4/dns_server/dns_update.c
+++ b/source4/dns_server/dns_update.c
@@ -334,8 +334,15 @@ static WERROR dns_rr_to_dnsp(TALLOC_CTX *mem_ctx,
W_ERROR_HAVE_NO_MEMORY(r->data.mx.nameTarget);
break;
case DNS_QTYPE_TXT:
- r->data.txt = talloc_strdup(mem_ctx, rrec->rdata.txt_record.txt);
- W_ERROR_HAVE_NO_MEMORY(r->data.txt);
+ /* FIXME: This converts the TXT rr data into a single string.
+ * Since dns server does not reply to qtype TXT,
+ * this is not yet relevant.
+ */
+ r->data.txt.count = 1;
+ r->data.txt.str = talloc_array(mem_ctx, const char *, 1);
+ W_ERROR_HAVE_NO_MEMORY(r->data.txt.str);
+ r->data.txt.str[0] = talloc_strdup(mem_ctx, rrec->rdata.txt_record.txt);
+ W_ERROR_HAVE_NO_MEMORY(r->data.txt.str[0]);
break;
default:
DEBUG(0, ("Got a qytpe of %d\n", rrec->rr_type));