netcmd/dns.py, line 420, 428, 438
the parsing of arguments is done as this:
tmp = data.split(' ')
This syntax does not allow to have two spaces between the different values, thus the following line fails with error "ERROR: Data requires 4 elements - server, port, priority, weight" (look at the two space characters between server name and port):
samba-tool dns add dc1 ad.test.fr _kerberos._tcp SRV "dc2.ad.test 88 0 100 "
The aforementioned line should be :
tmp = data.split()
as this syntax allow one or more space between two arguments.
Created attachment 14849 [details]
patch fixing incorrect use of split(' ')
bug is present in master and former release. patch applies (with offset 1) on 4.9.4.
fix pushed to master https://lists.samba.org/archive/samba-technical/2019-February/132537.html
This bug was closed but neer made it to master due to a autobuild error with it. Autobuild was testing a DNS zone called "\n.COM" to be valid by our tests, this was causing this patch to fail. A DNS zone should obviously not start with a newline character though. I reomved that \n.COM test and added a test for multiple spaces instead and made a merge request: https://gitlab.com/samba-team/samba/merge_requests/1049
fixed in master with af7a0e3371e1ae219239a91cb665097abbd50f3e