diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-08-29 14:19:22 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-09-20 08:15:21 +0200 |
commit | 9e9a8d8f887a3b13d06a7cc71edad78c140bb0be (patch) | |
tree | 9ac9ca6df2fde01d15bcfabaec7a7ff6b2818583 /source4 | |
parent | c17470210792e6443bd3c28c18874645f1558494 (diff) | |
download | samba-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.c | 3 |
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) { |