[SCM] Samba Shared Repository - branch master updated

Björn Baumbach bbaumbach at samba.org
Tue Jan 14 11:59:02 UTC 2020


The branch, master has been updated
       via  de768710e16 tests/DNS: add MX/SRV record tests with multiple spaces
       via  af7a0e3371e samba-tool: fix adding of dns SRV/MX/SOA records
       via  89ed960b1da tests/DNS: 
.COM shouldn't be a valid DNS record
      from  b07eff31de4 net_ads_gpo: remove old '#if 0' blocks

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit de768710e1677c591bf1b360a5de1321ad3a4d91
Author: Björn Jacke <bj at sernet.de>
Date:   Mon Jan 13 13:02:29 2020 +0100

    tests/DNS: add MX/SRV record tests with multiple spaces
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13788
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Björn Baumbach <bb at samba.org>
    
    Autobuild-User(master): Björn Baumbach <bb at sernet.de>
    Autobuild-Date(master): Tue Jan 14 11:58:20 UTC 2020 on sn-devel-184

commit af7a0e3371e1ae219239a91cb665097abbd50f3e
Author: Björn Jacke <bj at sernet.de>
Date:   Mon Jan 13 00:21:41 2020 +0100

    samba-tool: fix adding of dns SRV/MX/SOA records
    
    Thanks to Denis Cardon for finding
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13788
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Björn Baumbach <bb at samba.org>

commit 89ed960b1da48ddcc459514871963b87503fd9ad
Author: Björn Jacke <bj at sernet.de>
Date:   Mon Jan 13 12:49:42 2020 +0100

    tests/DNS: \n.COM shouldn't be a valid DNS record
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13788
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Björn Baumbach <bb at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/netcmd/dns.py              | 6 +++---
 python/samba/tests/samba_tool/dnscmd.py | 9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index d9fda0b93cd..6cf8d40b2aa 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -417,14 +417,14 @@ def data_to_dns_record(record_type, data):
     elif record_type == dnsp.DNS_TYPE_NS:
         rec = NSRecord(data)
     elif record_type == dnsp.DNS_TYPE_MX:
-        tmp = data.split(' ')
+        tmp = data.split()
         if len(tmp) != 2:
             raise CommandError('Data requires 2 elements - mail_server, preference')
         mail_server = tmp[0]
         preference = int(tmp[1])
         rec = MXRecord(mail_server, preference)
     elif record_type == dnsp.DNS_TYPE_SRV:
-        tmp = data.split(' ')
+        tmp = data.split()
         if len(tmp) != 4:
             raise CommandError('Data requires 4 elements - server, port, priority, weight')
         server = tmp[0]
@@ -433,7 +433,7 @@ def data_to_dns_record(record_type, data):
         weight = int(tmp[3])
         rec = SRVRecord(server, port, priority=priority, weight=weight)
     elif record_type == dnsp.DNS_TYPE_SOA:
-        tmp = data.split(' ')
+        tmp = data.split()
         if len(tmp) != 7:
             raise CommandError('Data requires 7 elements - nameserver, email, serial, '
                                'refresh, retry, expire, minimumttl')
diff --git a/python/samba/tests/samba_tool/dnscmd.py b/python/samba/tests/samba_tool/dnscmd.py
index e1459fee9ac..356b2c46d05 100644
--- a/python/samba/tests/samba_tool/dnscmd.py
+++ b/python/samba/tests/samba_tool/dnscmd.py
@@ -47,7 +47,6 @@ class DnsCmdTestCase(SambaToolCmdTest):
                     "1.EXAMPLE.COM",
                     "%sEXAMPLE.COM" % ("1." * 100),
                     "EXAMPLE",
-                    "\n.COM",
                     "!@#$%^&*()_",
                     "HIGH\xFFBYTE",
                     "@.EXAMPLE.COM",
@@ -58,14 +57,16 @@ class DnsCmdTestCase(SambaToolCmdTest):
                    "",
                    "SAMDOM..EXAMPLE.COM"]
 
-        good_mx = ["SAMDOM.EXAMPLE.COM 65530"]
+        good_mx = ["SAMDOM.EXAMPLE.COM 65530",
+                   "SAMDOM.EXAMPLE.COM     0"]
         bad_mx = ["SAMDOM.EXAMPLE.COM -1",
                   "SAMDOM.EXAMPLE.COM",
                   " ",
                   "SAMDOM.EXAMPLE.COM 1 1",
                   "SAMDOM.EXAMPLE.COM SAMDOM.EXAMPLE.COM"]
 
-        good_srv = ["SAMDOM.EXAMPLE.COM 65530 65530 65530"]
+        good_srv = ["SAMDOM.EXAMPLE.COM 65530 65530 65530",
+                    "SAMDOM.EXAMPLE.COM     1     1     1"]
         bad_srv = ["SAMDOM.EXAMPLE.COM 0 65536 0",
                    "SAMDOM.EXAMPLE.COM 0 0 65536",
                    "SAMDOM.EXAMPLE.COM 65536 0 0"]
@@ -450,7 +451,7 @@ class DnsCmdTestCase(SambaToolCmdTest):
             self.assertCmdSuccess(result, out, err, "Failed to add "
                                   "record %s with type 'SRV'." % record)
 
-            split = record.split(' ')
+            split = record.split()
             new_bit = str(int(split[3]) + 1)
             new_record = '%s %s %s %s' % (split[0], split[1], split[2], new_bit)
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list