From 8e7f8a2ab165ed0ab5c46e0131364fa91c309164 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 2 Aug 2013 18:53:56 +1000 Subject: [PATCH] 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 Reviewed-by: Kai Blin --- python/samba/netcmd/dns.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py index 137cd989f0c..de0c94d5166 100644 --- a/python/samba/netcmd/dns.py +++ b/python/samba/netcmd/dns.py @@ -955,6 +955,9 @@ class cmd_query(Command): versionopts=None): record_type = dns_type_flag(rtype) + if name.find('*') != -1: + raise CommandError('Wildcard searches not supported. To dump entire zone use "@"') + select_flags = 0 if authority: select_flags |= dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA -- 2.11.4.GIT