[PATCH 22/31] samba_dnsupdate: Allow the tool to work in 'make test'.
Andreas Schneider
asn at samba.org
Wed Dec 3 07:45:18 MST 2014
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source4/scripting/bin/samba_dnsupdate | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index c2ee3ec..c8d110a 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -206,7 +206,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)
try:
if getattr(d, 'nameservers', None):
@@ -383,7 +386,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:
--
2.1.3
More information about the samba-technical
mailing list