diff options
author | Andreas Schneider <asn@samba.org> | 2014-09-11 10:59:20 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-12-18 06:47:40 +0100 |
commit | 1292d513c1274a714c22da0781428859249cee26 (patch) | |
tree | 6c6decf04c07dc3ed33734c43407efe24e440a1f /source4/scripting/bin | |
parent | e85ef1dbfef4b16c35cac80c0efc563d8cd1ba3e (diff) | |
download | samba-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-x | source4/scripting/bin/samba_dnsupdate | 7 |
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: |