From: Andrew Tridgell Date: Fri, 5 Mar 2010 00:45:10 +0000 (+1100) Subject: s4-dns: use samba.external to pull in the dns.resolver library X-Git-Tag: samba-3.6.0pre1~4783 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3ca7a4696cadbb74f41dd71ef9336445682d406;p=thirdparty%2Fsamba.git s4-dns: use samba.external to pull in the dns.resolver library --- diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index d8ad20047ea..2e9c469adff 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