From f3ca7a4696cadbb74f41dd71ef9336445682d406 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 5 Mar 2010 11:45:10 +1100 Subject: s4-dns: use samba.external to pull in the dns.resolver library --- source4/scripting/bin/samba_dnsupdate | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/scripting/bin/samba_dnsupdate') 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 -- cgit