summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_dnsupdate
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-08-24 15:47:27 +1000
committerAndrew Tridgell <tridge@samba.org>2011-08-25 07:39:39 +1000
commit08b2aa08433d4e4be9764f926fdbec455df3a8ea (patch)
tree0bc7e8c370a1be62beca831b8026bc4e8860cab0 /source4/scripting/bin/samba_dnsupdate
parent345220b762af62b071faf9d9b352e928dfe1c375 (diff)
downloadsamba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.tar.gz
samba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.tar.bz2
samba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.zip
s4-dns: cope with duplicate entries in dns_update_list
this is needed for when DNSFOREST and DNSDOMAIN are the same Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'source4/scripting/bin/samba_dnsupdate')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 9609fe992b..26c1124fbd 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -390,6 +390,8 @@ sub_vars = get_subst_vars()
update_list = []
dns_list = []
+dup_set = set()
+
# read each line, and check that the DNS name exists
for line in file:
line = line.strip()
@@ -400,7 +402,9 @@ for line in file:
continue
if d.type == 'AAAA' and len(IP6s) == 0:
continue
- dns_list.append(d)
+ if str(d) not in dup_set:
+ dns_list.append(d)
+ dup_set.add(str(d))
# now expand the entries, if any are A record with ip set to $IP
# then replace with multiple entries, one for each interface IP