summaryrefslogtreecommitdiffstats
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-09-11 10:59:20 +0200
committerAndrew Bartlett <abartlet@samba.org>2014-12-18 06:47:40 +0100
commit1292d513c1274a714c22da0781428859249cee26 (patch)
tree6c6decf04c07dc3ed33734c43407efe24e440a1f /source4/scripting/bin
parente85ef1dbfef4b16c35cac80c0efc563d8cd1ba3e (diff)
downloadsamba-1292d513c1274a714c22da0781428859249cee26.tar.gz
samba-1292d513c1274a714c22da0781428859249cee26.tar.xz
samba-1292d513c1274a714c22da0781428859249cee26.zip
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>
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 427b5dc869..7f9406783d 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -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: