1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-30 06:50:24 +03:00

samba_dnsupdate: Allow the tool to work in 'make test'.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2014-09-11 10:59:20 +02:00 committed by Andrew Bartlett
parent e85ef1dbfe
commit 1292d513c1

View File

@ -207,7 +207,10 @@ def check_dns_name(d):
return True
return False
resolver = dns.resolver.Resolver()
resolv_conf = os.getenv('RESOLV_WRAPPER_CONF')
if not resolv_conf:
resolv_conf = '/etc/resolv.conf'
resolver = dns.resolver.Resolver(filename=resolv_conf, configure=True)
if d.nameservers != []:
resolver.nameservers = d.nameservers
@ -387,7 +390,7 @@ def call_nsupdate(d, op="add"):
try:
cmd = nsupdate_cmd[:]
cmd.append(tmpfile)
env = {}
env = os.environ
if krb5conf:
env["KRB5_CONFIG"] = krb5conf
if ccachename: