samba-tool:dns: DNS names are case insensitive
authorAmitay Isaacs <amitay@gmail.com>
Thu, 12 Jan 2012 04:11:12 +0000 (15:11 +1100)
committerAmitay Isaacs <amitay@samba.org>
Thu, 12 Jan 2012 05:43:01 +0000 (06:43 +0100)
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Jan 12 06:43:01 CET 2012 on sn-devel-104

source4/scripting/python/samba/netcmd/dns.py

index 74b649ee1e8391836d38d0d79ae15418e99a0f37..2ab412933170514f58840bcba9043cbe6c41e78a 100644 (file)
@@ -491,13 +491,13 @@ def dns_record_match(dns_conn, server, zone, name, record_type, data):
             if rec.data == data:
                 found = True
         elif record_type == dnsp.DNS_TYPE_PTR:
-            if rec.data.str.rstrip('.') == data.rstrip('.'):
+            if rec.data.str.rstrip('.').lower() == data.rstrip('.').lower():
                 found = True
         elif record_type == dnsp.DNS_TYPE_CNAME:
-            if rec.data.str.rstrip('.') == data.rstrip('.'):
+            if rec.data.str.rstrip('.').lower() == data.rstrip('.').lower():
                 found = True
         elif record_type == dnsp.DNS_TYPE_NS:
-            if rec.data.str.rstrip('.') == data.rstrip('.'):
+            if rec.data.str.rstrip('.').lower() == data.rstrip('.').lower():
                 found = True
         if found:
             rec_match = rec