From: Andrew Bartlett Date: Mon, 10 Apr 2017 05:13:46 +0000 (+1200) Subject: samba_dnsupate: Try to get ticket to the SOA, not the NS servers X-Git-Tag: ldb-1.1.31~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ce51a1895b97632ccfbacc40ce0fbb639e0432;p=thirdparty%2Fsamba.git samba_dnsupate: Try to get ticket to the SOA, not the NS servers Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 80a5a6f484d..28343bf17d5 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -137,10 +137,12 @@ def get_credentials(lp): if opts.use_file is not None: return - # Now confirm we can get a ticket to a DNS server - ans = check_one_dns_name(sub_vars['DNSDOMAIN'] + '.', 'NS') + # Now confirm we can get a ticket to the DNS server + ans = check_one_dns_name(sub_vars['DNSDOMAIN'] + '.', 'SOA') + + # Actually there is only one for i in range(len(ans)): - target_hostname = str(ans[i].target).rstrip('.') + target_hostname = str(ans[i].mname).rstrip('.') settings = {} settings["lp_ctx"] = lp settings["target_hostname"] = target_hostname