summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-05 11:45:10 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-05 11:54:36 +1100
commitf3ca7a4696cadbb74f41dd71ef9336445682d406 (patch)
tree3876874b1af878ae0b819be438fa18daaecae109 /source4/scripting
parent8c7cf499abf880cd4915e1b831298feb8990245b (diff)
downloadsamba-f3ca7a4696cadbb74f41dd71ef9336445682d406.tar.gz
samba-f3ca7a4696cadbb74f41dd71ef9336445682d406.tar.bz2
samba-f3ca7a4696cadbb74f41dd71ef9336445682d406.zip
s4-dns: use samba.external to pull in the dns.resolver library
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index d8ad20047e..2e9c469adf 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -21,7 +21,6 @@
import getopt
import os
import sys
-import dns.resolver
import tempfile
# ensure we get messages out immediately, so they get in the samba logs,
@@ -39,6 +38,9 @@ import ldb
from samba import glue
from samba.auth import system_session
from samba.samdb import SamDB
+import samba.external
+
+resolver = samba.external.samba_external_dns_resolver()
default_ttl = 900
@@ -141,8 +143,8 @@ def check_dns_name(d):
if opts.verbose:
print "Looking for DNS entry %s as %s" % (d, normalised_name)
try:
- ans = dns.resolver.query(normalised_name, d.type)
- except dns.resolver.NXDOMAIN:
+ ans = resolver.query(normalised_name, d.type)
+ except resolver.NXDOMAIN:
return False
if d.type == 'A':
# we need to be sure that our IP is there