summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-08-29 14:19:22 +1200
committerAndrew Bartlett <abartlet@samba.org>2017-09-20 08:15:21 +0200
commit9e9a8d8f887a3b13d06a7cc71edad78c140bb0be (patch)
tree9ac9ca6df2fde01d15bcfabaec7a7ff6b2818583 /source4
parentc17470210792e6443bd3c28c18874645f1558494 (diff)
downloadsamba-9e9a8d8f887a3b13d06a7cc71edad78c140bb0be.tar.gz
s4-dnsserver: Check for too many DNS results
If we had this check in when the wildcard DNS tests were written, we would have noticed that the name needed to be escaped (see previous commit). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12994 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/dnsserver/dnsdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/rpc_server/dnsserver/dnsdb.c b/source4/rpc_server/dnsserver/dnsdb.c
index 15fe5657d3a..81a2d2070a0 100644
--- a/source4/rpc_server/dnsserver/dnsdb.c
+++ b/source4/rpc_server/dnsserver/dnsdb.c
@@ -657,6 +657,9 @@ WERROR dnsserver_db_delete_record(TALLOC_CTX *mem_ctx,
if (res->count == 0) {
return WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST;
}
+ if (res->count > 1) {
+ return WERR_DNS_ERROR_RCODE_SERVER_FAILURE;
+ }
el = ldb_msg_find_element(res->msgs[0], "dnsRecord");
if (el == NULL || el->num_values == 0) {