1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

netcmd/dns: Catch wildcard patterns when querying for name

DNS query should either be '@' to represent entire zone or a fixed string
and not wildcard search pattern.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Kai Blin <kai@samba.org>
This commit is contained in:
Amitay Isaacs 2013-08-02 18:53:56 +10:00
parent f62683956a
commit 8e7f8a2ab1

View File

@ -955,6 +955,9 @@ class cmd_query(Command):
versionopts=None): versionopts=None):
record_type = dns_type_flag(rtype) record_type = dns_type_flag(rtype)
if name.find('*') != -1:
raise CommandError('Wildcard searches not supported. To dump entire zone use "@"')
select_flags = 0 select_flags = 0
if authority: if authority:
select_flags |= dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA select_flags |= dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA